microcalorimetry.measurements.rfsweep

This module contains functions for running and executing RF sweeps on the microcalorimeter.

Functions

run(output_dir, configs, settings, sensor_master_list)

Run a microcalorimetry RF Sweep experiment.

parse(→ tuple[dict[rmellipse.uobjects.RMEMeas], ...)

Parse an RF sweep.

reduce_initial_power(runlist, output_path, reduce_by_dB)

Reduce a runlist's initial power setting.

reorder_runlist(runlist, output_path[, segment_size, ...])

Reorder a runlist.

review_runlist(→ list[matplotlib.pyplot.Figure])

Review a runlist for an rf sweep measurement.

Package Contents

microcalorimetry.measurements.rfsweep.run(output_dir: str, configs: list[pathlib.Path], settings: list[pathlib.Path], sensor_master_list: run.configs, name: str = 'rf_sweep', no_confirm: bool = False, dry_run: bool = False, validate: bool = True)[source]

Run a microcalorimetry RF Sweep experiment.

Parameters:
  • output_directory (Path) – Directory to output from. The default is None.

  • configs (list[Path], optional) – Config files for experiment settings / instruments. The default is None.

  • settings (list[Path], optional) – Run settings files, looped over for experiment. The default is None. Each index i of a configs file corresponds to a index i of the configs file.

  • sensor_master_list (configs.RFSensorMasterList,) – Master list of sensors and resitance/sensitivity values to use for sanity checking config files.

  • name (str, optional) – Name of measurement. The default is None.

  • no_confirm (bool, optional) – If True, skips any confirmations that may be asked when starting the run.

  • dry_run (bool, optional) – If true, will try to load the configurations without actually running anything to do a dry-check - can be used to validate some basic type validation of the configuration.

  • validate (bool, optional) – If true, attempts to validate configuration files. The default is True.

microcalorimetry.measurements.rfsweep.parse(data_records: list[microcalorimetry._tkquick.gui_dtypes.Folder], DUT_power_analysis: dict, calorimeter_power_analysis: dict, make_plots: bool = True, plot_segments_indexes: list[int] = [0, -1], plot_all_segments_analysis: bool = False, dataframe_results: microcalorimetry._tkquick.gui_dtypes.SaveAsPath = None, linear_bolo_eff: bool = False, include_time_std: bool = True, extra_configs: microcalorimetry.configs.DictLike = None, monitor_power_analysis: dict = None, RF_source_power_analysis: dict = None) → tuple[dict[rmellipse.uobjects.RMEMeas], list[matplotlib.pyplot.Figure]][source]

Parse an RF sweep.

Parameters:
  • data_records (list[Folder]) – Path(s) to metadata files (or directories their directories) containing rfsweep runs.

  • DUT_power_analysis (dict, optional) –

    Set the analysis settings for the DUT. Format —— { instr_timing_tolerance : float

    Max expected misalignment of instrument’s time column to determine when RF is turned off. Default is 5.

    stats_window_overridefloat

    Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None.

    fast_off_analysisbool

    Whether or not to use fast analysis. Only matters for thermoelectric sensors power sensors (which may or may not use the fast off analysis). The default is False.

    coeffsPath

    Provided a path to thermoelectric fit coefficients you want to use. Must be provided for thermoelectric power sensors. Overrides the coefficients defined in the signal config of the measurement.

    V_off_delayfloat

    Relative time from RF being turned off to on to use for the V off measurement. Only relevant if fast analysis is being used.

    V_off_functionstr

    What V Off fit function to use, only required if doing a fast fit. Options Format ————– { lin_plus_exp

    Fit fast off measurements to a line + an exponential.

    linear

    Fit fast off measurements to a line.

    single_sample

    Treat all fast off measurements in window as realizations of the same measurement and average over them.

    }

    V_off_fit_time_windowlist[float]

    Relative time window from RF being turned on to fit to. For example, [1, 2] would fit between 1 and 2 seconds after RF power is turned off.

    }

  • calorimeter_power_analysis (dict) –

    Set the analysis settings for the calorimeter. Format —— { instr_timing_tolerance : float

    Max expected misalignment of instrument’s time column to determine when RF is turned off. Default is 5.

    stats_window_overridefloat

    Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None.

    coeffsPath

    Provided a path to thermoelectric fit coefficients you want to use. Must be provided for thermoelectric power sensors. Overrides the coefficients defined in the signal config of the measurement.

    }

  • make_plots (bool, optional) – Makes review plots if True. The default is True.

  • plot_segments_indexes (list[int]) – What segment of each run to plot. Each interger represents the index of every segment for every run in order of runs. For example, index 0 is the first segment of the first run Index -1 is the last segment of the last run. The default is [0, -1].

  • plot_all_segments_analysis (bool) – If True, plot every single segment’s review charts and ignore plot_segment_indexes.

  • dataframe_results (SaveAsPath, optional) – If provided, saves a csv of intermediate calculated values to the specified path.

  • linear_bolo_eff (bool, optional) – If true, will utilize the lineraized version of the effective efficiency of a bolometer sensor regardless of whether or not a microcalorimeter’s sensitivity model is present.

  • include_time_std (bool, optional) – It True, includes standard deviation of stable samples used to calculate the value of a particular column as an uncertainty mechanism. The default is True.

  • extra_configs (Path, optional) – Path to a .csv file that can be used to overload fields in an existing config file.

  • monitor_power_analysis (dict, optional) –

    Set the analysis settings for the monitor. Format —— { instr_timing_tolerance : float

    Max expected misalignment of instrument’s time column to determine when RF is turned off. Default is 5.

    stats_window_overridefloat

    Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None.

    fast_off_analysisbool

    Whether or not to use fast analysis. Only matters for thermoelectric sensors power sensors (which may or may not use the fast off analysis). The default is False.

    coeffsPath

    Provided a path to thermoelectric fit coefficients you want to use. Must be provided for thermoelectric power sensors. Overrides the coefficients defined in the signal config of the measurement.

    V_off_delayfloat

    Relative time from RF being turned off to on to use for the V off measurement. Only relevant if fast analysis is being used.

    V_off_functionstr

    What V Off fit function to use, only required if doing a fast fit. Options Format ————– { lin_plus_exp

    Fit fast off measurements to a line + an exponential.

    linear

    Fit fast off measurements to a line.

    single_sample

    Treat all fast off measurements in window as realizations of the same measurement and average over them.

    }

    V_off_fit_time_windowlist[float]

    Relative time window from RF being turned on to fit to. For example, [1, 2] would fit between 1 and 2 seconds after RF power is turned off.

    }

  • RF_source_power_analysis (dict, optional) –

    Set the analysis settings for the RF Source. Format —— { instr_timing_tolerance : float

    Max expected misalignment of instrument’s time column to determine when RF is turned off. Default is 5.

    stats_window_overridefloat

    Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None.

    }

Returns:

  • parsed_rf (dict[RMEMeas]) – Dictionary of RFSweep datasets in a parsed RF sweep configuration.

  • figures (list[plt.Figure]) – Dictionary of RFSweep datasets in a parsed RF sweep configuration.

microcalorimetry.measurements.rfsweep.reduce_initial_power(runlist: pathlib.Path, output_path: microcalorimetry._tkquick.gui_dtypes.SaveAsPath, reduce_by_dB: float, decimals: int = 4)[source]

Reduce a runlist’s initial power setting.

Parameters:
  • runlist (Path) – Path to runlist to modify.

  • reduce_by_dB (float) – How much to reduce the initial power by. Negative values will increase the initial power.

  • output_path (SaveAsPath, optional) – If None, uses the same name as input file with ‘_min{num}dB.csv’

  • decimals (int, optional) – Number of decimals to use for frequency points. Default is 4.

microcalorimetry.measurements.rfsweep.reorder_runlist(runlist: pathlib.Path, output_path: microcalorimetry._tkquick.gui_dtypes.SaveAsPath, segment_size: int = 10, off_step_length: int = 2, freq_ordering: str = 'interleave', make_plots: bool = True)[source]

Reorder a runlist.

Can modify the number of and size of segments, and reorder frequencies.

Parameters:
  • runlist (Path) – Frequency list to reorder.

  • output_path (SaveAsPath, optional) – Directory to output runfile. The default is the same path as the input file with ‘_reordered’ appended to the name.

  • segment_size (int, optional) – Number of steps per segment (maximum). The default is 10.

  • off_step_length (int, optional) – How many steps each off period should be. Typically 2, the default is 2.

  • freq_ordering (str, optional) –

    Determines how frequencies are sorted before being split into segments. Options Format ————– { monotonic_increasing

    Sort frequencies monitonically increasing (e.g. 1,2,3,5,6).

    interleave_increasing

    Sort frequencies into 2 monitonically increasing, interleaved lists. For example: 1,2,3,4,5,6 becomes 1,3,5,2,4,6.

    }

  • make_plots (bool, optional) – Generate review plots of runlist. The default is True.

microcalorimetry.measurements.rfsweep.review_runlist(runlist: pathlib.Path) → list[matplotlib.pyplot.Figure][source]

Review a runlist for an rf sweep measurement.

Parameters:

runlist (Path) – Path to runlist.

Returns:

plots – List of review charts.

Return type:

list[plt.Figures]