labscript.inputs.AnalogIn

class AnalogIn(name, parent_device, connection, scale_factor=1.0, units='Volts', **kwargs)[source]

Bases: Device

Analog Input for use with all devices that have an analog input.

__init__(name, parent_device, connection, scale_factor=1.0, units='Volts', **kwargs)[source]

Instantiates an Analog Input.

Parameters:
  • name (str) – python variable to assign this input to.

  • parent_device (IntermediateDevice) – Device input is connected to.

  • scale_factor (float, optional) – Factor to scale the recorded values by.

  • units (str, optional) – Units of the input.

  • **kwargs – Keyword arguments passed to Device.__init__().

Methods

__init__(name, parent_device, connection[, ...])

Instantiates an Analog Input.

acquire(label, start_time, end_time[, ...])

Command an acquisition for this input.

add_device(device)

Adds a child device to this device.

generate_code(hdf5_file)

Generate hardware instructions for device and children, then save to h5 file.

get_all_children()

Get all children devices for this device.

get_all_outputs()

Get all children devices that are outputs.

get_properties([location])

Get all properties in location.

get_property(name[, location])

Method to get a property of this device already set using Device.set_property().

init_device_group(hdf5_file)

Creates the device group in the shot file.

quantise_to_pseudoclock(times)

Quantises times to the resolution of the controlling pseudoclock.

set_properties(properties_dict, property_names)

Add one or a bunch of properties packed into properties_dict

set_property(name, value[, location, overwrite])

Method to set a property for this device.

Attributes

allowed_children

Defines types of devices that are allowed to be children of this device.

description

Brief description of the device.

parent_clock_line

Stores the clocking clockline, which may be itself.

pseudoclock_device

Stores the clocking pseudoclock, which may be itself.

t0

The earliest time output can be commanded from this device at the start of the experiment.

acquire(label, start_time, end_time, wait_label='', scale_factor=None, units=None)[source]

Command an acquisition for this input.

Parameters:
  • label (str) – Unique label for the acquisition. Used to identify the saved trace.

  • start_time (float) – Time, in seconds, when the acquisition should start.

  • end_time (float) – Time, in seconds, when the acquisition should end.

  • wait_label (str, optional) –

  • scale_factor (float) – Factor to scale the saved values by.

  • units – Units of the input, consistent with the unit conversion class.

Returns:

Duration of the acquistion, equivalent to end_time - start_time.

Return type:

float

description = 'Analog Input'

Brief description of the device.