cryores.instruments package
Subpackages
Submodules
cryores.instruments.base module
- class cryores.instruments.base.LogOrLinear(value)
Bases:
Enum
An enumeration.
- LINEAR = 'linear'
- LOG = 'log'
- class cryores.instruments.base.SParameters(value)
Bases:
Enum
An enumeration.
- S11 = 'S11'
- S12 = 'S12'
- S21 = 'S21'
- S22 = 'S22'
- class cryores.instruments.base.VnaInstrument
Bases:
ABC
This describes a “contract” for interfacing with a VNA instrument.
Each of the following methods that are labeled with @abc.abstractmethod should be filled in in a separate class that actually implements the interaction with a VNA instrument.
We assume that the instrument starts in factory mode for consistency. Alternatively, the “init_device” method should make a best effort at putting it into a deterministically consistent state.
- abstract get_parameters() Dict[str, Any]
Returns device configuration parameters.
- abstract init_device()
Initialize the device into a consistent, reproducible state.
- initialized_data_frame() DataFrame
Helper function to return an empty dataframe.
- abstract sweep(frequency_start: Value, frequency_end: Value, npoints: int, power: Value, averages: int = 1, log_or_linear: LogOrLinear = LogOrLinear.LOG) DataFrame
Sweep frequencies and return data results.
- Parameters
averages – The number of sweeps to run.
power –
resolution_bandwidth – Resolution bandwidth, typically for internal IF filters.
- Returns
Frequency_GHz
S21_Amp_dB
S21_Phase_rad
- Return type
Pandas Dataframe with the following columns
cryores.instruments.fake module
- class cryores.instruments.fake.FakeVna(peak_frequency_GHz: Optional[float] = None)
Bases:
VnaInstrument
A Fake VNA.
- get_parameters() Dict[str, Any]
Returns device configuration parameters.
- init_device()
No initialize required.
- set_device_parameter(parameter: float)
Set a device-specific parameter.
- sweep(frequency_start: Value, frequency_end: Value, npoints: int, power: Value, averages: int = 1, log_or_linear: LogOrLinear = LogOrLinear.LOG) DataFrame
Sweep frequencies and return data results.
- Parameters
averages – The number of sweeps to run.
power –
resolution_bandwidth – Resolution bandwidth, typically for internal IF filters.
- Returns
Frequency_GHz
S21_Amp_dB
S21_Phase_rad
- Return type
Pandas Dataframe with the following columns