labscript.outputs.Trigger

class Trigger(name, parent_device, connection, trigger_edge_type='rising', **kwargs)[source]

Bases: DigitalOut

Customized version of DigitalOut that tracks edge type.

__init__(name, parent_device, connection, trigger_edge_type='rising', **kwargs)[source]

Instantiates a DigitalOut object that tracks the trigger edge type.

Parameters:
  • name (str) – python variable name to assign the quantity to.

  • parent_device (IntermediateDevice) – Device this quantity is attached to.

  • trigger_edge_type (str, optional) – Allowed values are 'rising' and 'falling'.

  • **kwargs – Passed to Output.__init__().

Methods

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

Instantiates a DigitalOut object that tracks the trigger edge type.

add_device(device)

Adds a child device to this device.

add_instruction(time, instruction[, units])

Adds a hardware instruction to the device instruction list.

apply_calibration(value, units)

Apply the calibration defined by the unit conversion class, if present.

disable(t)

Commands the output to disable.

do_checks(trigger_times)

Basic error checking to ensure the user's instructions make sense.

enable(t)

Commands the output to enable.

expand_timeseries(all_times, flat_all_times_len)

This function evaluates the ramp functions in self.timeseries at the time points in all_times, and creates an array of output values at those times.

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_change_times()

If this function is being called, it means that the parent Pseudoclock has requested a list of times that this output changes state.

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().

get_ramp_times()

If this is being called, then it means the parent Pseuedoclock has asked for a list of the output ramp start and stop times.

go_high(t)

Commands the output to go high.

go_low(t)

Commands the output to go low.

init_device_group(hdf5_file)

Creates the device group in the shot file.

instruction_to_string(instruction)

Gets a human readable description of an instruction.

make_timeseries(change_times)

If this is being called, then it means the parent Pseudoclock has asked for a list of this output's states at each time in change_times.

offset_instructions_from_trigger(trigger_times)

Subtracts self.trigger_delay from all instructions at or after each trigger_time.

quantise_to_pseudoclock(times)

Quantises times to the resolution of the controlling pseudoclock.

repeat_pulse_sequence(t, duration, ...)

This function only works if the DigitalQuantity is on a fast clock

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.

trigger(t, duration)

Command a trigger pulse.

Attributes

allowed_children

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

allowed_states

clock_limit

Returns the parent clock line's clock limit.

default_value

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.

scale_factor

t0

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

trigger_delay

The earliest time output can be commanded from this device after a trigger.

wait_delay

The earliest time output can be commanded from this device after a wait.

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

allowed_children = [<class 'labscript.core.TriggerableDevice'>]

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

Type:

list

description = 'trigger device'

Brief description of the device.

trigger(t, duration)[source]

Command a trigger pulse.

Parameters:
  • t (float) – Time, in seconds, for the trigger edge to occur.

  • duration (float) – Duration of the trigger, in seconds.