qcodes_contrib_drivers.drivers.Andor package

Submodules

qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx module

Qcodes driver for Andor iDus 4xx cameras.

Tested with a Andor iDus 416. A typical workflow would look something like this:

ccd = AndorIDus4xx('ccd')
ccd.acquisition_mode('kinetics')
ccd.read_mode('random track')
ccd.preamp_gain(1.)
ccd.number_accumulations(2)
ccd.number_kinetics(10)
ccd.random_track_settings((2, [20, 30, 40, 40]))
# The following time parameters are computed to a closest valid
# value by the SDK. Setting all to zero would hence result in the
# shortest possible acquisition time. These values should be set
# last since they depend on other settings.
ccd.exposure_time(0)
ccd.accumulation_cycle_time(0)
ccd.kinetic_cycle_time(0)
# Acquire data
data = ccd.ccd_data()
data.shape  # (10, 2, 2000)
# The shape of the ccd_data parameter is automatically adjusted to
# the acquisition and read modes
ccd.acquisition_mode('single scan')
ccd.read_mode('full vertical binning')
data = ccd.ccd_data()
data.shape  # (2000,)

TODO (thangleiter, 23/11/11):

  • Triggering

  • Handle shutter modes

  • Multiple cameras

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.AcquiredPixelsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Returns the shape of a single frame for the current settings.

class AcquiredPixels(horizontal, vertical)[source]

Bases: NamedTuple

horizontal: int

Alias for field number 0

vertical: int

Alias for field number 1

get_raw() AcquiredPixels[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.AcquisitionTimings(exposure_time: float, accumulation_cycle_time: float, kinetic_cycle_time: float)[source]

Bases: NamedTuple

Timings computed by the SDK.

accumulation_cycle_time: float

Alias for field number 1

exposure_time: float

Alias for field number 0

kinetic_cycle_time: float

Alias for field number 2

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.AndorIDus4xx(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Instrument driver for the Andor iDus 4xx family CCDs.

Parameters:
  • name – Instrument name.

  • dll_path – Path to the atmcd64.dll file. If not set, a default path is used.

  • camera_id – ID for the desired CCD.

  • min_temperature – The minimum temperature of operation for the CCD. Defaults to the value the model supports. Note that that might apply for water cooling only.

serial_number

Serial number of the CCD.

head_model

Head model of the CCD.

firmware_version

Firmware version of the CCD.

firmware_build

Firmware build of the CCD.

acquisition_mode_capabilities

Available acquisition modes.

read_mode_capabilities

Available read modes.

trigger_mode_capabilities

Available trigger modes.

pixel_mode_capabilities

Bit-depth and color mode.

feature_capabilities

Available camera and SDK features.

abort_acquisition() None[source]

This function aborts the current acquisition if one is active.

arm() None[source]

Arm the CCD for acquisition.

This method ensures the camera is not yet acquiring, frees the internal memory, and finally prepares it for acquisition using the current acquisition timings.

While not required, calling this method ahead of acquisition reduces the overhead when actually starting it.

cancel_wait()[source]

This function restarts a thread which is sleeping within the wait_for_acquisition() function.

The sleeping thread will return from wait_for_acquisition() with a value not equal to DRV_SUCCESS.

close() None[source]

Irreversibly stop this instrument and free its resources.

Subclasses should override this if they have other specific resources to close.

cool_down(setpoint: int | None = None, target: Literal['stabilized', 'reached'] = 'reached', show_progress: bool = True) None[source]

Turn the cooler on and wait for the temperature to stabilize.

Parameters:
  • setpoint – The target temperature. Required if set_temperature is not initialized.

  • target – Finish if temperature is reached or reached and stabilized.

  • show_progress – Show a progressbar. The default is True.

free_internal_memory() None[source]

The FreeInternalMemory function will deallocate any memory used internally to store the previously acquired data.

Note that once this function has been called, data from last acquisition cannot be retrived.

freeze_acquisition_settings() dict[str, Any][source]
get_acquisition_timings() AcquisitionTimings[source]

The current acquisition timing parameters actually used by the device.

This method also updates the caches of the corresponding parameters. This can be used to ensure they are snapshotted correctly when measuring.

Docstring of the dll function:

This function will return the current “valid” acquisition timing information.

This function should be used after all the acquisitions settings have been set, e.g. set_exposure_time(), set_kinetic_cycle_time(), and set_read_mode() etc. The values returned are the actual times used in subsequent acquisitions.

This function is required as it is possible to set the exposure time to 20ms, accumulate cycle time to 30ms and then set the readout mode to full image. As it can take 250ms to read out an image it is not possible to have a cycle time of 30ms.

returns:
  • float exposure* – valid exposure time in seconds

  • float accumulate* – valid accumulate cycle time in seconds

  • float kinetic* – valid kinetic cycle time in seconds

get_idn() Dict[str, str | None][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.

Returns:

A dict containing vendor, model, serial, and firmware.

prepare_acquisition() None[source]

This function reads the current acquisition setup and allocates and configures any memory that will be used during the acquisition.

The function call is not required as it will be called automatically by the start_acquisition() function if it has not already been called externally.

However for long kinetic series acquisitions the time to allocate and configure any memory can be quite long which can result in a long delay between calling start_acquisition() and the acquisition actually commencing. For iDus, there is an additional delay caused by the camera being set-up with any new acquisition parameters. Calling prepare_acquisition() first will reduce this delay in the start_acquisition() call.

send_software_trigger() None[source]

This function sends an event to the camera to take an acquisition when in Software Trigger mode. Not all cameras have this mode available to them. To check if your camera can operate in this mode check the GetCapabilities function for the Trigger Mode AC_TRIGGERMODE_CONTINUOUS. If this mode is physically possible and other settings are suitable (IsTriggerModeAvailable) and the camera is acquiring then this command will take an acquisition.

Notes

The settings of the camera must be as follows:
  • ReadOut mode is full image

  • RunMode is Run Till Abort

  • TriggerMode is 10

start_acquisition() None[source]

This function starts an acquisition.

The status of the acquisition can be monitored via get_status().

warm_up(target: int = 15, show_progress: bool = True) None[source]

Turn the cooler off and wait for the temperature to reach target.

Parameters:
  • target (int, optional) – The target temperature. Defaults to 15C.

  • show_progress (bool, optional) – Show a progressbar. The default is True.

yield_till_abort() Iterator[ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]

Yields data from the CCD until aborted.

This method uses ‘run-till-abort’ mode to continuously acquire data. To use it in the main thread, simply iterate over it:

for data in ccd.yield_till_abort():
    ...

A concurrent application could look something like this:

import queue
import threading

def put(queue: queue.Queue, stop_flag: threading.Event):
    gen = ccd.yield_till_abort()
    while not stop_flag.is_set():
        queue.put(next(gen))

queue = queue.Queue()
stop_flag = threading.Event()
thread = threading.Thread(target=put, args=(queue, stop_flag))
thread.start()

# queue is continuously filled with data.
current_data = queue.get()

# Stop the data streaming:
stop_flag.set()

# Optionally cancel waiting for the next acquisition:
ccd.cancel_wait()

Note

Each iteration of this method yields a single frame of data. However, since it is technically a time-series, the yielded data has a time axis of size 1 so that for read_mode('full vertical binning') for example the shape is (1, horizontal_pixels).

property background_is_valid: bool
class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.CCDData(name: str, *, vals: Validator[Any] | None = None, setpoints: Sequence[ParameterBase] | None = None, snapshot_get: bool = False, snapshot_value: bool = False, **kwargs: Any)[source]

Bases: ParameterWithSetpoints

Parameter class for data taken with an Andor CCD.

The data is saved in an integer array with dynamic shape depending on the acquisition and readout modes.

  • If the acquisition mode is a kinetic series, the first axis is a TimeAxis with size the number of frames, otherwise it is empty.

  • The last axes correspond to the image dimensions, which may be 1d or 2d depending on the readout mode. If 2d, the y-axis (vertical dimension) is stored first.

Note

In 2d mode, the last two axes are switched around compared to the rest of this driver.

get_raw() ndarray[tuple[Any, ...], dtype[int32]][source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

register_delegate(delegate: CCDDataDelegateParameter)[source]
property setpoints: Sequence[ParameterBase]

Sequence of parameters to use as setpoints for this parameter.

Getter:

Returns a list of parameters currently used for setpoints.

Setter:

Sets the parameters to be used as setpoints from a sequence. The combined shape of the parameters supplied must be consistent with the data shape of the data returned from get on the parameter.

property vals: Validator | None

The first validator of the parameter. None if no validators are set for this parameter.

Getter:

Returns the first validator or None if no validators.

Setter:

Sets the first validator. Set to None to remove the first validator.

Raises:

RuntimeError – If removing the first validator when more than one validator is set.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.CCDDataDelegateParameter(name: str, source: CCDData, **kwargs: Any)[source]

Bases: DelegateParameter, ParameterWithSetpoints

A DelegateParameter that can be used as a ParameterWithSetpoints.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.DetectorPixelsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Stores the detector size in pixels.

class DetectorPixels(horizontal, vertical)[source]

Bases: NamedTuple

horizontal: int

Alias for field number 0

vertical: int

Alias for field number 1

get_raw() DetectorPixels[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.DetectorSizeParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Stores the detector size in microns.

class DetectorSize(horizontal, vertical)[source]

Bases: NamedTuple

horizontal: float

Alias for field number 0

vertical: float

Alias for field number 1

get_raw() DetectorSize[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.FastKineticsSettingsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Represents fast kinetics settings.

class FastKineticsSettings(exposed_rows, series_length, time, mode, hbin, vbin, offset)[source]

Bases: NamedTuple

exposed_rows: int

Alias for field number 0

hbin: int

Alias for field number 4

mode: int

Alias for field number 3

offset: int

Alias for field number 6

series_length: int

Alias for field number 1

time: float

Alias for field number 2

vbin: int

Alias for field number 5

get_raw() FastKineticsSettings | None[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

set_raw(val: FastKineticsSettings)[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.ImageSettingsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Represents the settings for image acquisition.

class ImageSettings(hbin, vbin, hstart, hend, vstart, vend)[source]

Bases: NamedTuple

hbin: int

Alias for field number 0

hend: int

Alias for field number 3

hstart: int

Alias for field number 2

vbin: int

Alias for field number 1

vend: int

Alias for field number 5

vstart: int

Alias for field number 4

get_raw() ImageSettings | None[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

set_raw(val: ImageSettings)[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.MultiTrackSettingsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Represents the settings for multi-track acquisition.

When setting, a sequence of three numbers (number, height, and offset).

When getting, a tuple of three numbers (number, height, offset) is again returned. In addition, the CCD calculates the gap between tracks and the offset from the bottom row. These are stored as properties of the parameter, i.e., accessible through gap and bottom, respectively.

class MultiTrackSettings(number, height, offset)[source]

Bases: NamedTuple

height: int

Alias for field number 1

number: int

Alias for field number 0

offset: int

Alias for field number 2

get_raw() MultiTrackSettings | None[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

set_raw(val: Tuple[int, int, int])[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

property bottom: int | None

The bottom row as computed by the CCD.

property gap: int | None

The gap between rows as computed by the CCD.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.ParameterWithSetSideEffect(name: str, set_side_effect: Callable[[Any], None], **kwargs: Any)[source]

Bases: Parameter

A Parameter allowing for side effects on set events.

Parameters:

set_side_effect – A callable that is run before every set event. Receives the set value as sole argument.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.PersistentDelegateParameter(name: str, source: Parameter | None, *args: Any, **kwargs: Any)[source]

Bases: DelegateParameter

A delegate parameter with an independent cache.

cache: _CacheProtocol
class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.PixelAxis(name: str, dimension: Literal[0, 1], instrument: AndorIDus4xx, **kwargs: Any)[source]

Bases: Parameter

A parameter that enumerates the pixels along an axis.

If acquisition is in ‘image’ mode, getting this parameter returns the center pixels of subpixels binned together, e.g. for the horizontal axis:

px = [hstart + i * hbin + hbin // 2
      for i in range((hend - hstart) // hbin + 1)]

Otherwise, simply enumerates the number of pixels starting from 1.

If you have a calibration of horizontal pixels to, for example in a spectrograph, wavelength at hand, set this parameter’s get_parser and unit.

get_raw() ndarray[tuple[Any, ...], dtype[int64]][source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.PixelSizeParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Stores the pixel size in microns.

class PixelSize(horizontal, vertical)[source]

Bases: NamedTuple

horizontal: float

Alias for field number 0

vertical: float

Alias for field number 1

get_raw() PixelSize[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.RandomTrackSettingsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Represents the settings for random-track acquisition.

class RandomTrackSettings(number_tracks, areas)[source]

Bases: NamedTuple

areas: Sequence[int]

Alias for field number 1

number_tracks: int

Alias for field number 0

get_raw() RandomTrackSettings | None[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

set_raw(val: RandomTrackSettings)[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.SingleTrackSettingsParameter(name: str, names: Sequence[str], shapes: Sequence[Sequence[int]], instrument: InstrumentBase | None = None, labels: Sequence[str] | None = None, units: Sequence[str] | None = None, setpoints: Sequence[Sequence[Any]] | None = None, setpoint_names: Sequence[Sequence[str]] | None = None, setpoint_labels: Sequence[Sequence[str]] | None = None, setpoint_units: Sequence[Sequence[str]] | None = None, docstring: str | None = None, snapshot_get: bool = True, snapshot_value: bool = False, snapshot_exclude: bool = False, metadata: Mapping[Any, Any] | None = None, **kwargs: Any)[source]

Bases: MultiParameter

Represents the settings for single-track acquisition.

class SingleTrackSettings(centre, height)[source]

Bases: NamedTuple

centre: int

Alias for field number 0

height: int

Alias for field number 1

get_raw() SingleTrackSettings | None[source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

set_raw(val: SingleTrackSettings)[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

class qcodes_contrib_drivers.drivers.Andor.Andor_iDus4xx.TimeAxis(name: str, instrument: InstrumentBase | None = None, label: str | None = None, unit: str | None = None, get_cmd: str | Callable[..., Any] | Literal[False] | None = None, set_cmd: str | Callable[..., Any] | Literal[False] | None = False, initial_value: float | str | None = None, max_val_age: float | None = None, vals: Validator[Any] | None = None, docstring: str | None = None, initial_cache_value: float | str | None = None, bind_to_instrument: bool = True, **kwargs: Any)[source]

Bases: Parameter

A parameter that holds the start of each exposure window.

If the acquisition mode is a kinetic series, the size corresponds to number_kinetics(), otherwise it’s always 1.

get_raw() ndarray[tuple[Any, ...], dtype[float64]][source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

qcodes_contrib_drivers.drivers.Andor.DU401 module

class qcodes_contrib_drivers.drivers.Andor.DU401.Andor_DU401(*args: Any, **kwargs: Any)[source]

Bases: AndorIDus4xx

filter_mode = self.add_parameter( "filter_mode", DelegateParameter, source=self.cosmic_ray_filter_mode )

Deprecated. Use cosmic_ray_filter_mode instead.

spectrum = self.add_parameter( "spectrum", get_cmd=self._get_spectrum, shape=(1, self.x_pixels), label="spectrum" )

ccd_data instead.

Type:

Deprecated. Use attr

qcodes_contrib_drivers.drivers.Andor.post_processing module

Interface to the Andor dll post-processing functions.

Functions are implemented as classes so that parameters are persistent when snapshotted.

class qcodes_contrib_drivers.drivers.Andor.post_processing.CountConversionMode(value)[source]

Bases: IntEnum

electrons = 1
photons = 2
class qcodes_contrib_drivers.drivers.Andor.post_processing.CountConvert(baseline: 'int', mode: 'CountConversionMode', em_gain: 'int', quantum_efficiency: 'float', sensitivity: 'float' = 0.0, atmcd64d: 'andor_sdk.atmcd64d | None' = None)[source]

Bases: PostProcessingFunction

atmcd64d: atmcd64d | None = None
baseline: int
em_gain: int
mode: CountConversionMode
quantum_efficiency: float
sensitivity: float = 0.0
class qcodes_contrib_drivers.drivers.Andor.post_processing.Identity[source]

Bases: PostProcessingFunction

Returns a copy of the input image.

class qcodes_contrib_drivers.drivers.Andor.post_processing.NoiseFilter(baseline: int, mode: NoiseFilterMode, threshold: float, atmcd64d: atmcd64d | None = None)[source]

Bases: PostProcessingFunction

This function will apply a filter to the input image and return the processed image in the output buffer.

The filter applied is chosen by the user by setting Mode to a permitted value.

Parameters:
  • Baseline (int) – The baseline associated with the image.

  • Mode (int) –

    The mode to use to process the data. Valid options are:

    1

    Use Median Filter

    2

    Use Level Above Filter

    3

    Use Interquartile Range Filter

    4

    Use Noise Threshold Filter

  • Threshold (float) – This is the Threshold multiplier for the Median, Interquartile and Noise Threshold filters. For the Level Above filter this is Threshold count above the baseline.

atmcd64d: atmcd64d | None = None
baseline: int
mode: NoiseFilterMode
threshold: float
class qcodes_contrib_drivers.drivers.Andor.post_processing.NoiseFilterMode(value)[source]

Bases: IntEnum

interquartile_range = 3

For each pixel, the Median and Interquartile values of a 3x3 square centred on the pixel concerned are calculated. A pixel is replaced with the median value the 3x3 array centered on the pixel concerned if the pixel is greater than the median plus the interquartile ranges times a given multiplication factor (defined by the user) AND six or more of the nearest neighbours (contained within the 3x3 array) are below the threshold.

level_above = 2

The user defines the threshold based on the number of counts above the baseline. Spurious noise events are defined as those pixels in the image which are above this threshold. A pixel is replaced with the median value of a 3x3 array centered on the pixel concerned if the pixel is above the threshold AND six or more of the nearest neighbours (contained within the 3x3 array) are below the threshold.

median = 1

Each pixel is measured relative to the median value of its nearest neighbor pixels. A pixel is replaced with the median value of a 3x3 array centered on the pixel concerned if the pixel value is greater than the median by a given multiplation factor (defined by the user).

noise_threshold = 4

The Standard Deviation’s of 10x10 pixel sub images from the whole image are first calculated. The mean of the lowest 10% of these standard deviations defines the Image Noise. A pixel is replaced with the median value of the 3x3 array centered on the pixel concerned if the pixel is greater than the median plus the Image Noise times a given multiplication factor (defined by the user) AND six or more of the nearest neighbours (contained within the 3x3 array) are below the threshold.

class qcodes_contrib_drivers.drivers.Andor.post_processing.PhotonCounting(thresholds: tuple[int, int], atmcd64d: atmcd64d | None = None)[source]

Bases: PostProcessingFunction

This function will convert the input image data to photons and return the processed image in the output buffer.

Parameters:

Threshold (float *) – The Thresholds used to define a photon (min and max)

atmcd64d: atmcd64d | None = None
thresholds: tuple[int, int]

Module contents