labscript.outputs.StaticDigitalQuantity
- class StaticDigitalQuantity(*args, **kwargs)[source]
Bases:
DigitalQuantity
Base class for
StaticDigitalOut
.It can also be used internally by other, more complex, output types.
- __init__(*args, **kwargs)[source]
Instatiantes the static digital quantity.
Defines an internal tracking variable of the static output value and calls
Output.__init__()
.- Parameters:
*args – Passed to
Output.__init__()
.**kwargs – Passed to
Output.__init__()
.
Methods
__init__
(*args, **kwargs)Instatiantes the static digital quantity.
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
(*args, **kwargs)Defines the
raw_output
attribute.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.
Enforces no change times.
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
()Command a static high output.
go_low
()Command a static low output.
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)Since output is static, does nothing.
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.
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.
Value of output if no constant value is commanded.
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
The value of the static output.
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.
- description = 'static digital quantity'
Brief description of the device.
- get_change_times()[source]
Enforces no change times.
- Returns:
An empty list, as expected by the parent pseudoclock.
- Return type:
- go_high()[source]
Command a static high output.
- Raises:
LabscriptError – If output has already been set low.
- go_low()[source]
Command a static low output.
- Raises:
LabscriptError – If output has already been set high.