mjolnir.instruments.logical_instruments#
Classes
|
Abstracts all instruments that are part of the detection path. |
|
Abstracts all instruments that are part of the excitation path. |
|
A logical grouping of instruments that behaves like an Instrument. |
|
An abstraction of a DUT. |
|
|
|
An abstraction of a membrane exciton trap sample. |
- class mjolnir.instruments.logical_instruments.DetectionPath(*args, **kwargs)[source]#
Bases:
LogicalInstrumentAbstracts all instruments that are part of the detection path.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- active_detection_path#
The currently active detection path.
- active_grating#
The currently active grating.
- bandwidth#
The wavelength bandwidth of the monochromator.
- property ccd_calibration_handler: CcdCalibrationHandler#
The
CCDCalibrationHandler.
- ccd_calibration_max_age#
Oldest CCD calibration age.
- ccd_calibration_oldest_datetime#
Oldest CCD calibration date.
- ccd_calibration_update_mode#
The CCD calibration update mode.
‘full’ performs a sweep of the laser’s wavelength to obtain a calibration function wavelength(pixel).
‘fast’ only measures the central wavelength.
‘dirty’ simply uses the current calibration and shifts it by the change in wavelength.
None does not perform any recalibration.
- ccd_horizontal_axis_scale#
Set the unit of calibration for the horizontal axis of the CCD.
- central_wavelength#
The spectrometer grating central wavelength.
- initialize_ccd(logical_station, cool=True, temperature=-70, block=True, target='reached', cooler_mode='maintain', horizontal_axis='energy', oldest_calibration_datetime=None, show_progress=True, **calibration_kwargs)[source]#
Initialize the CCD.
- Parameters:
logical_station (Station) – The station hosting the logical instruments.
cool (bool) – Turn on the thermoelectric cooler of the CCD.
temperature (float) – The target temperature when cooling the CCD.
block (bool) – Block the interpreter during cooling.
target (Literal['reached', 'stabilized']) – The cooling target to reach.
cooler_mode (Literal['maintain', 'return']) – The CCD cooler mode.
horizontal_axis (Literal['wavelength', 'energy']) – Calibrate the CCD pixels in terms of wavelength or energy.
oldest_calibration_datetime (datetime | None) – Oldest CCD calibration date to accept before recalibrating.
show_progress (bool) – Show a progressbar during cooling.
**calibration_kwargs – Kwargs passed on to
CCDCalibrationHandler.
- initialize_spectrometer(detection_path='ccd', grating=600, central_wavelength=815.0, entrance_slit_width=50)[source]#
Initialize the spectrometer.
- class mjolnir.instruments.logical_instruments.ExcitationPath(*args, **kwargs)[source]#
Bases:
LogicalInstrumentAbstracts all instruments that are part of the excitation path.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- acquire_laser_lock(wavelength, max_attempts=10, show_progress=True)[source]#
Acquire the laser wavelength-lock.
- active_light_source#
The currently active light source.
- disable_laser(shutter='close')[source]#
Turn of the pump laser and chiller.
- Parameters:
shutter (str)
- initialize_laser(shutter='close', block=True, show_progress=True, wavelength=None)[source]#
Initialize the lasers.
- initialize_power(logical_station, oldest_calibration_datetime=None, update_calibration=False, averaging_time=0.001, **calibration_kwargs)[source]#
Initialize the power calibration.
- Parameters:
logical_station (Station) – The station hosting the logical instruments.
oldest_calibration_datetime (datetime | None) – Oldest allowed datetime for the calibration. Defaults to the value of
power_calibration_oldest_datetime.update_calibration (bool | Literal['full', 'fast']) – Update the calibration on initalization.
averaging_time (float) – The power meter’s averaging time to set.
**calibration_kwargs – Kwargs passed on to
PowerCalibrationHandler.
- initialize_rejection_feedback(logical_station, **kwargs)[source]#
Initialize the excitation rejection handler.
- Parameters:
logical_station – The station hosting the logical instruments.
**kwargs – See
RejectionFeedbackHandler.
- power#
The power at the optical head.
The setter inverts the power calibration handled by
power_calibration_handler.
- power_at_sample#
The power at the sample.
- power_at_sample_avg#
A tuple of (mean, std) of average power at the sample.
- property power_calibration_handler: PowerCalibrationHandler#
The power calibration handler.
- power_calibration_max_age#
Oldest power calibration age.
- power_calibration_oldest_datetime#
Oldest power calibration date.
- power_calibration_strategy#
The power calibration update strategy.
Only applies to calibration mode ‘full’.
‘sequential’ performs a equidistant sweep between bounds.
‘adaptive’ uses
adaptiveto perform adaptive sampling.
- power_calibration_tolerance#
Relative tolerance of power setting.
Used to determine whether power is satisfactorily close to the desired value.
- power_calibration_update_mode#
The power calibration update mode.
‘full’ performs a sweep of the ND-filter’s angle to obtain a calibration function power(angle).
‘fast’ uses noisy optimization to minimize the difference between the current power and the setpoint.
- power_n_avg#
Number of samples to average power over.
- rejection_feedback#
If active excitation rejection is on.
- property rejection_feedback_handler: RejectionFeedbackHandler#
The excitation rejection handler.
- wait_for_power_to_settle(slope=0.01, n_samples=None)[source]#
Block the interpreter until the power readings stabilize.
- wavelength#
The cw-laser’s wavelength.
- wavelength_constant_power#
The cw-laser’s wavelength, where on each set the power is retuned either to the value of the previous point, or to the value of
wavelength_constant_power_setpoint.
- wavelength_constant_power_setpoint#
The power setpoint used for
wavelength_constant_power.
- class mjolnir.instruments.logical_instruments.LogicalInstrument(*args, **kwargs)[source]#
Bases:
InstrumentA logical grouping of instruments that behaves like an Instrument.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- close(close_physical_instruments=False)[source]#
Overrides instrument close to offer the possibility to close child instruments.
- Parameters:
close_physical_instruments (bool)
- Return type:
None
- get_idn()[source]#
Parse a standard VISA
*IDN?response into an ID dict.Even though this is the VISA standard, it applies to various other types as well, such as IPInstruments, so it is included here in the Instrument base class.
Override this if your instrument does not support
*IDN?or returns a nonstandard IDN string. This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.
- class mjolnir.instruments.logical_instruments.Sample(*args, **kwargs)[source]#
Bases:
LogicalInstrumentAn abstraction of a DUT.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- bob: BreakoutBox | None#
- initialize_dac(reset_voltages=False, output_range=None, output_filter=None, measurement_range=None, dc_slew_rate_V_per_s=None, step=None, step_delay=None)[source]#
Initialize the QDAC-II connected to the device.
- Parameters:
reset_voltages (bool) – Set voltages to zero before doing anything.
output_range (Literal['low', 'high'] | float) – Output range of the DAC channels.
output_filter (Literal['dc', 'med', 'high'] | None) – Output filter of the DAC channels.
measurement_range (Literal['low', 'high'] | None) – Measurement range of the DAC channels.
dc_slew_rate_V_per_s (float | None) – Slew rate in V/s of the DAC channels.
step (float | None) – Voltage step size for each set.
step_delay (float | None) – Delay after each step.
- class mjolnir.instruments.logical_instruments.Trap(*args, station, parameters=None, channels=None, grouped_parameter_names=None, grouped_parameter_class=<class 'qcodes.parameters.grouped_parameter.GroupedParameter'>, grouped_parameter_kwargs=None, initial_values=None, set_initial_values_on_load=False, setters=None, units=None, metadata=None, **kwargs)[source]#
Bases:
DelegateInstrumentChannel- Parameters:
station (Station)
parameters (None | (Mapping[str, Sequence[str]] | Mapping[str, str]))
channels (None | (Mapping[str, Mapping[str, Any]] | Mapping[str, str]))
grouped_parameter_names (None | Mapping[str, Sequence[str] | str | None])
grouped_parameter_class (None | type[ParameterBase])
grouped_parameter_kwargs (None | Mapping[str, Any])
initial_values (Mapping[str, Any] | None)
set_initial_values_on_load (bool)
metadata (Mapping[Any, Any] | None)
- class mjolnir.instruments.logical_instruments.TrapSample(*args, **kwargs)[source]#
Bases:
SampleAn abstraction of a membrane exciton trap sample.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- blocking_ramps#
Replace the dc_constant_V param with one that waits for the voltage to settle at a given threshold.