microcalorimetry.configs

Module for defining configuration objects.

Configuration objects are either:

  • Objects that inherit from DataModelContainer, and hold either a datset itsself or a file pointer to the dataset

  • Objects that inherit from SerialDictionary, which JSON compatable dictionary objects that can be instantiate from a file pointer or the dictionary itself.

Supported serialization formats are:

  • JSON

  • YAML (restricted to a JSON compatable subset using pyyaml’s safe_load method)

  • ExperimentParameters (spreadsheet editable JSON like object defined in Rocky Mountain Instruments)

  • HDF5 Group Saveable Dictionaries (A generic object serialization format defined in Rocky Mountain Ellipse)

Each configuration object has a corresponding JSON schema that can be used to provide validation.

Classes

SerialDictionary

A typed dictionary defined by a JSON schema that can be laoded from a file.

DataModelContainer

Stores a pointer to or a data-set itself.

S11

Stores a DataModel that represents an S11 measurement.

RFSweep

Stores a pointer to a DataModel representing RFSweep data.

DCSweep

Stores a pointer to a DataModel representing DCSweep calorimeter data.

ThermoelectricFitCoefficients

DataModel that contains fit coefficients for a thermoelectric sensor.

ParsedRFSweep

Dictionary of parsed RFSweep data measured in a microcalorimeter.

ParsedDCSweep

Dictionary of parsed DCSweep data measured in a microcalorimeter.

CorrectionFactorModelInputs

Mapping of all the measurement inputs required for computing a correction factor.

RFSweepParserConfig

Defines settings for parsing output data of a parser.

Functions

load_config(obj[, schema])

Validate a JSON like-object and/or load it from a file.

Module Contents

microcalorimetry.configs.load_config(obj: Any | str | pathlib.Path | list[pathlib.Path | str], schema: dict | pathlib.Path = None)[source]

Validate a JSON like-object and/or load it from a file.

Parameters:
objAny | str | Path

Any object to validate, or a file path to that object.

schemadict | Path, optional

Schema or path to a jsonschema in .json format. by default None

Returns:
_type_

_description_

class microcalorimetry.configs.SerialDictionary(obj: dict | str | pathlib.Path | zip | list[pathlib.Path | str], schema: dict | pathlib.Path)[source]

Bases: dict

A typed dictionary defined by a JSON schema that can be laoded from a file.

Initialize self. See help(type(self)) for accurate signature.

class microcalorimetry.configs.DataModelContainer(*data_or_path, attrs=None, parent=None, **data_or_path_key_value_pair)[source]

Bases: rmellipse.utils.GroupSaveable

Stores a pointer to or a data-set itself.

SCHEMA
load() rmellipse.uobjects.RMEMeas[source]

Load data from self.

classmethod try_from(obj: Any)[source]

Try to turn obj into a DataModel, and return obj if it already is.

Parameters:
objAny

Any object you think should already be a data model but you aren’t quite sure.

class microcalorimetry.configs.S11(*data_or_path, **data_or_path_kwargs)[source]

Bases: DataModelContainer

Stores a DataModel that represents an S11 measurement.

SCHEMA
load() rmellipse.uobjects.RMEMeas[source]

Load an S11 file from supported formats into an RMEMeas object.

Supported file formats:

  • Microwave Uncertainty Framework .meas files in the touchstone s2p format.

  • RMEMeas group saveable objects formats.

  • .dut files (NIST calibrations service file format)

Parameters:
pathPath

Path to the file to be loaded in (.meas, .h5/hdf5, or .dut)

Returns:
RMEMeas

RMEMeas data in the S1P data in the s1p_c format.

class microcalorimetry.configs.RFSweep(*data_or_path, **data_or_path_kwargs)[source]

Bases: DataModelContainer

Stores a pointer to a DataModel representing RFSweep data.

SCHEMA
class microcalorimetry.configs.DCSweep(*data_or_path, **data_or_path_kwargs)[source]

Bases: DataModelContainer

Stores a pointer to a DataModel representing DCSweep calorimeter data.

SCHEMA
class microcalorimetry.configs.ThermoelectricFitCoefficients(*data_or_path, **data_or_path_kwargs)[source]

Bases: DataModelContainer

DataModel that contains fit coefficients for a thermoelectric sensor.

class microcalorimetry.configs.ParsedRFSweep(d: dict | pathlib.Path | zip)[source]

Bases: SerialDictionary

Dictionary of parsed RFSweep data measured in a microcalorimeter.

Initialize self. See help(type(self)) for accurate signature.

SCHEMA
class microcalorimetry.configs.ParsedDCSweep(d: dict | pathlib.Path | zip)[source]

Bases: SerialDictionary

Dictionary of parsed DCSweep data measured in a microcalorimeter.

Initialize self. See help(type(self)) for accurate signature.

SCHEMA
class microcalorimetry.configs.CorrectionFactorModelInputs(obj: dict | pathlib.Path | zip)[source]

Bases: SerialDictionary

Mapping of all the measurement inputs required for computing a correction factor.

Maps each every combination of reflective and load standard sensor used in a series of correction factor measurement, to the neccesary RF sweep measurements, reflection coefficients, and measurement of the splitter’s port to port mismatch.

Initialize self. See help(type(self)) for accurate signature.

SCHEMA
class microcalorimetry.configs.RFSweepParserConfig(obj: dict | pathlib.Path)[source]

Bases: SerialDictionary

Defines settings for parsing output data of a parser.

Initialize self. See help(type(self)) for accurate signature.

SCHEMA