IVs
IV curves are fundamental to TES calibration and characterization of detector properties. An IV curve is taken by applying a strong bias to drive TES’s into their normal regime, and then by slowly lowering the bias voltage in steps allowing the TES to pass through the normal, in-transition, and superconducting states.
Through IVs we are able to obtain TES resistance, which is essential for biasing detectors into their transition, along with the bias power, and an estimate of the DC responsivity.
Though the current response we measure is relative, we can use the fact that the TES current in both the normal and superconducting branches are linear with bias-current, with a y-intercept of 0 to back out the real current at each point in the transition.
Taking IVs
After you have a bias-group map from the take_bgmap function, you can
start taking IVs. To take an IV, use the take_iv function.
import sodetlib.operations as ops
iva = ops.take_iv(S, cfg)
To take a good IV it important that:
The detectors start off properly overbiased.
Each step allows detectors to settle for a good measurement. The default runs in high-current-mode to avoid the bias-line filter, with wait-times of 0.1 sec to achieve this.
Steps in bias voltage are small enough to avoid tracking phase-skips. Large jumps in squid current will mess up the tracking algorithm which may offset the response by a multiple of \(2 \pi\). This is difficult to correct for reliably in analysis so it is important for current steps to be small.
The default parameters of the take_iv function were chosen to satisfy these conditions,
however depending on your assembly you may need to tweak the parameters such as
overbias_voltage, overbias_wait, bias_high, bias_step, and
wait_time. See the API for the take_iv function for more details.
The take_iv function returns an instance of the IVAnalysis class,
containing all the important information about the run-conditions of the IV,
and the analysis products if run_analysis is set to True.
By default, this function will save the output file-path of the IVAnalysis object
to the device config under the key iv_file.
This can easily be loaded again by running:
from sodetlib.operations.iv import IVAnalysis
iva = IVAnalysis.load(cfg.dev.exp['iv_file'])
Using the analyze_iv function, you can re-analyze the iv object, or pass
it to the plot_channel_iv function to plot the analysis products of a
given readout-channel.
Note
Though the IV can be run in either high or low-current mode, the voltage
biases specified in the take_iv keyword arguments, and the voltage
bias values in the IVAnalysis object are all in low-current-mode
units, so that biases can be easily compared and used without knowing
which mode the IV was taken in.
Note
The bias-group map file is important for IVs in order to know the detector polarity, or whether the detector response increases or decreases as you increase the bias voltage. This is important so we can assume the IV curves are oriented the correct way in the analysis and not upside-down.
API
- sodetlib.operations.iv.take_iv(S, cfg, **kwargs)
Takes an IV.
This function requires an accurate bias-group-map, so be sure to run
take_bgmapbefore this.- Parameters:
S (SmurfControl) – pysmurf instance
cfg (DetConfig) – detconfig instance
bias_groups (list, int) – List of bias groups to run on. Defaults to all 12.
overbias_voltage (float) – Voltage to use to overbias detectors
overbias_wait (float) – Time (sec) to wait at overbiased voltage
high_current_mode (bool) – If True, will run IV in high-current-mode. This is highly recommended to avoid the bias-line filter.
cool_wait (float) – Amout of time to wait at the first bias step after overbiasing.
cool_voltage (float) – TES bias voltage to sit at during the cool_wait time while the cryostat cools
biases (np.ndarray, optional) – array of biases to use for IV. This should be in units of Low-Current-Mode volts. If you are running in high-current-mode this will automatically be adjusted for you!!
bias_high (float) – Upper limit for biases if not manually set. (to be used in np.arange) This should be in units of Low-Current-Mode volts. If you are running in high-current-mode this will automatically be adjusted for you!!
bias_low (float) – Lower limit for biases if not manually set. (to be used in np.arange) This should be in units of Low-Current-Mode volts. If you are running in high-current-mode this will automatically be adjusted for you!!
bias_step (float) – Step size for biases if not manually set. (to be used in np.arange) This should be in units of Low-Current-Mode volts. If you are running in high-current-mode this will automatically be adjusted for you!!
wait_time (float) – Amount of time to wait at each bias point.
run_analysis (bool) – If True, will automatically run analysis, save it, and update device cfg. (unless otherwise specified in analysis_kwargs)
show_plots (bool) – If true, will show summary plots
run_serially (bool) – If True, will run IV sweeps in serial, running each of the specified bias groups independently instead of all together.
serial_wait_time (float) – Time to sleep between serial IV sweeps (sec)
g3_tag (string (optional)) – If not None, overrides default tag “oper,iv” sent to g3 file.
analysis_kwargs (dict) – Keyword arguments to pass to analysis
- Returns:
iva – IVAnalysis object. Will be already analyzed if run_analysis=True.
- Return type:
- class sodetlib.operations.iv.IVAnalysis(S=None, cfg=None, run_kwargs=None, sid=None, start_times=None, stop_times=None)
IVAnalysis is the object used to hold take_iv information and analysis products. When instantiating from scratch, all keyword arguments must be specified. (This is not true if you are loading from an existing file using the load function).
- Parameters:
S (SmurfControl) – Pysmurf instance
cfg (DetConfig) – DetConfig instance
run_kwargs (dict) – Dictionary of keyword arguments passed to the take_iv function.
sid (int) – Session id from the IV stream session
start_times (np.ndarray) – Array of start_times of each bias point
stop_times (np.ndarray) – Array of stop_times of each bias point
- meta
Dictionary of pysmurf and sodetlib metadata during the IV.
- Type:
dict
- biases_cmd
Array of commanded biases voltages (in low-current-mode units)
- Type:
np.ndarray
- nbiases
Number of bias points commanded throughout the IV
- Type:
int
- bias_groups
Array containing the bias-groups included in this IV
- Type:
np.ndarray
- am
AxisManager containing TOD from the IV (this is not saved to disk, but can be loaded with the _load_am function)
- Type:
AxisManager
- nchans
Number of channels included in the IV
- Type:
int
- bands
Array of shape (nchans) containing the smurf-band of each channel
- Type:
np.ndarray
- channels
Array of shape (nchans) containing the smurf-channel of each channel
- Type:
np.ndarray
- v_bias
Array of shape (nbiases) containing the bias voltage at each bias point (in low-current-mode Volts)
- Type:
np.ndarray
- i_bias
Array of shape (nbiases) containing the commanded bias-current at each step (Amps)
- Type:
np.ndarray
- resp
Array of shape (nchans, nbiases) containing the squid response (Amps) at each bias point
- Type:
np.ndarray
- R
Array of shape (nchans, nbiases) containing the TES Resistance of each channel at each bias point
- Type:
np.ndarray
- p_tes
Array of shape (nchans, nbiases) containing the electrical power on the TES (W) of each channel at each bias point
- Type:
np.ndarray
- v_tes
Array of shape (nchans, nbiases) containing the voltage across the TES for each channel at each bias point (V)
- Type:
np.ndarray
- i_tes
Array of shape (nchans, nbiases) containing the current across the TES for each channel at each bias point (Amps)
- Type:
np.ndarray
- R_n
Array of shape (nchans) containing the normal resistance (Ohms) of the TES
- Type:
np.ndarray
- R_L
Array of shape (nchans) containing the non-TES resistance (Ohms). Should be shunt resistance + parasitic resistance
- Type:
np.ndarray
- p_sat
Array of shape (nchans) containing the electrical power (W) at which Rfrac crosses the 90% threshold (or whatever arg is passed to the analysis fn). Note that this is only truly the saturation power in the absence of optical power.
- Type:
np.ndarray
- si
Array of shape (nchans, nbiases) containing the responsivity (1/V) of the TES for each bias-step
- Type:
np.ndarray
- idxs
- Array of shape (nchans, 3) containing:
Last index of the SC branch
First index off the normal branch
Index at which p_tes crosses the 90% thresh
- Type:
np.ndarray
- bgmap
Array of shape (nchans) containing bias-group assignment of each channel in the IV. This is not calculated with the IV but pulled in from the device cfg, so it’s important you run the take_bgmap function to generate the bias-group map before running the IV.
- Type:
np.ndarray
- polarity
Array of shape (nchans) containing the polarity of each channel (also from the bias-map file in the device cfg). This tells you if the TES current changes in the same direction or opposite direction of the bias current.
- Type:
np.ndarray
Biasing Detectors into Transition
Once you have your bias-group mapping and your IV file, you are able to bias detectors into their transition. There are two functions that you may use to do this:
Biasing to Rfrac Range
The function bias_to_rfrac_range will take in a range of Rfrac values,
and use the IV analysis objects to determine the bias voltages which maximize
the number of detectors which fall in that range. By default, this range is set
to (0.3, 0.6) based on the target operating resistances for SO MF detectors.
import sodetlib.operations as ops
ops.bias_to_rfrac_range(S, cfg)
The overbiasing options overbias_voltage and overbias_wait can be
specified as keyword arguments.
The function will also base the determination only on channels that have
“reasonable” values for their normal resistance. The range of acceptable
Rn’s can be set using the Rn_range parameter, and defaults to
(5e-3, 12e-3).
Biasing to Rfrac
The function bias_to_rfrac is a lot like the function
bias_to_rfrac_range, except that it takes a single Rfrac value (defaulting
to 0.5), and determines the bias-voltage by taking the median of what voltage
is required for each channel to achieve that Rfrac.
Checking Resistances
After biasing it is important to verify that the detectors are at the correct
values of Rfrac so you can confidently take data. This can be done by with the
Take Bias Steps function, and then plotting the estimated resistances
stored in the bsa.R0 variable.
API
- sodetlib.operations.bias_dets.bias_to_rfrac(S, cfg, rfrac=None, bias_groups=None, iva=None, overbias=True, Rn_range=(0.005, 0.012), math_only=False)
Biases detectors in their superconducting transitions to a specified fraction of their normal resistance (“rfrac”). This function will choose TES bias voltages for each bias-group that either (a) are the median bias voltage achieving the specified rfrac value, or (b) maximizes the number of channels that will be placed in the allowable rfrac range.
- Parameters:
S (SmurfControl) – Pysmurf instance
cfg (DetConfig) – Detconfig instance
rfrac (float or 2-tuple) – If float, target rfrac value. If tuple, range of allowable rfracs.
bias_groups (list, optional) – Bias groups to bias. Defaults to active bgs in device cfg.
iva (IVAnalysis, optional) – IVAnalysis object. If this is passed, will use it to determine bias voltages. Defaults to using value in device cfg.
overbias_voltage (float) – Voltage to use to overbias detectors
overbias_wait (float) – Time (sec) to wait at overbiased voltage
Rn_range (tuple) – A “reasonable” range for the TES normal resistance. This will be cut on when determining which IVs should be used to determine the optimal bias-voltage.
math_only (bool) – If this is set, will not actually over-bias voltages, and will just return the target biases.
- Returns:
biases – Array of Smurf bias voltages. Note that this includes all smurf bias lines (all 15 of them), but only voltages for the requested bias-groups will have been modified.
- Return type:
np.ndarray
- sodetlib.operations.bias_dets.bias_to_rfrac_range(S, cfg, rfrac=None, bias_groups=None, iva=None, overbias=True, Rn_range=(0.005, 0.012), math_only=False)
Biases detectors in their superconducting transitions to a specified fraction of their normal resistance (“rfrac”). This function will choose TES bias voltages for each bias-group that either (a) are the median bias voltage achieving the specified rfrac value, or (b) maximizes the number of channels that will be placed in the allowable rfrac range.
- Parameters:
S (SmurfControl) – Pysmurf instance
cfg (DetConfig) – Detconfig instance
rfrac (float or 2-tuple) – If float, target rfrac value. If tuple, range of allowable rfracs.
bias_groups (list, optional) – Bias groups to bias. Defaults to active bgs in device cfg.
iva (IVAnalysis, optional) – IVAnalysis object. If this is passed, will use it to determine bias voltages. Defaults to using value in device cfg.
overbias_voltage (float) – Voltage to use to overbias detectors
overbias_wait (float) – Time (sec) to wait at overbiased voltage
Rn_range (tuple) – A “reasonable” range for the TES normal resistance. This will be cut on when determining which IVs should be used to determine the optimal bias-voltage.
math_only (bool) – If this is set, will not actually over-bias voltages, and will just return the target biases.
- Returns:
biases – Array of Smurf bias voltages. Note that this includes all smurf bias lines (all 15 of them), but only voltages for the requested bias-groups will have been modified.
- Return type:
np.ndarray