microcalorimetry.measurements.rfsweep ===================================== .. py:module:: microcalorimetry.measurements.rfsweep .. autoapi-nested-parse:: This module contains functions for running and executing RF sweeps on the microcalorimeter. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: microcalorimetry.measurements.rfsweep.run microcalorimetry.measurements.rfsweep.parse microcalorimetry.measurements.rfsweep.reduce_initial_power microcalorimetry.measurements.rfsweep.reorder_runlist microcalorimetry.measurements.rfsweep.review_runlist Package Contents ---------------- .. py:function:: 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) Run a microcalorimetry RF Sweep experiment. :param output_directory: Directory to output from. The default is None. :type output_directory: Path :param configs: Config files for experiment settings / instruments. The default is None. :type configs: list[Path], optional :param settings: 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. :type settings: list[Path], optional :param sensor_master_list: Master list of sensors and resitance/sensitivity values to use for sanity checking config files. :type sensor_master_list: configs.RFSensorMasterList, :param name: Name of measurement. The default is None. :type name: str, optional :param no_confirm: If True, skips any confirmations that may be asked when starting the run. :type no_confirm: bool, optional :param dry_run: 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. :type dry_run: bool, optional :param validate: If true, attempts to validate configuration files. The default is True. :type validate: bool, optional .. !! processed by numpydoc !! .. py:function:: 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]] Parse an RF sweep. :param data_records: Path(s) to metadata files (or directories their directories) containing rfsweep runs. :type data_records: list[Folder] :param DUT_power_analysis: 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_override : float Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None. fast_off_analysis : bool 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. coeffs : Path 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_delay : float 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_function : str 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_window : list[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. } :type DUT_power_analysis: dict, optional :param calorimeter_power_analysis: 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_override : float Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None. coeffs : Path 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. } :type calorimeter_power_analysis: dict :param make_plots: Makes review plots if True. The default is True. :type make_plots: bool, optional :param plot_segments_indexes: 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]. :type plot_segments_indexes: list[int] :param plot_all_segments_analysis: If True, plot every single segment's review charts and ignore plot_segment_indexes. :type plot_all_segments_analysis: bool :param dataframe_results: If provided, saves a csv of intermediate calculated values to the specified path. :type dataframe_results: SaveAsPath, optional :param linear_bolo_eff: 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. :type linear_bolo_eff: bool, optional :param include_time_std: 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. :type include_time_std: bool, optional :param extra_configs: Path to a .csv file that can be used to overload fields in an existing config file. :type extra_configs: Path, optional :param monitor_power_analysis: 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_override : float Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None. fast_off_analysis : bool 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. coeffs : Path 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_delay : float 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_function : str 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_window : list[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. } :type monitor_power_analysis: dict, optional :param RF_source_power_analysis: 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_override : float Override the defined stats window to change the window of samples averaged over to determine off/on values. The default is None. } :type RF_source_power_analysis: dict, optional :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. .. !! processed by numpydoc !! .. py:function:: reduce_initial_power(runlist: pathlib.Path, output_path: microcalorimetry._tkquick.gui_dtypes.SaveAsPath, reduce_by_dB: float, decimals: int = 4) Reduce a runlist's initial power setting. :param runlist: Path to runlist to modify. :type runlist: Path :param reduce_by_dB: How much to reduce the initial power by. Negative values will increase the initial power. :type reduce_by_dB: float :param output_path: If None, uses the same name as input file with '_min{num}dB.csv' :type output_path: SaveAsPath, optional :param decimals: Number of decimals to use for frequency points. Default is 4. :type decimals: int, optional .. !! processed by numpydoc !! .. py:function:: 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) Reorder a runlist. Can modify the number of and size of segments, and reorder frequencies. :param runlist: Frequency list to reorder. :type runlist: Path :param output_path: Directory to output runfile. The default is the same path as the input file with '_reordered' appended to the name. :type output_path: SaveAsPath, optional :param segment_size: Number of steps per segment (maximum). The default is 10. :type segment_size: int, optional :param off_step_length: How many steps each off period should be. Typically 2, the default is 2. :type off_step_length: int, optional :param freq_ordering: 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. } :type freq_ordering: str, optional :param make_plots: Generate review plots of runlist. The default is True. :type make_plots: bool, optional .. !! processed by numpydoc !! .. py:function:: review_runlist(runlist: pathlib.Path) -> list[matplotlib.pyplot.Figure] Review a runlist for an rf sweep measurement. :param runlist: Path to runlist. :type runlist: Path :returns: **plots** -- List of review charts. :rtype: list[plt.Figures] .. !! processed by numpydoc !!