labscript.outputs.AnalogOut
- class AnalogOut(name, parent_device, connection, limits=None, unit_conversion_class=None, unit_conversion_parameters=None, default_value=None, **kwargs)[source]
Bases:
AnalogQuantityAnalog Output class for use with all devices that support timed analog outputs.
- __init__(name, parent_device, connection, limits=None, unit_conversion_class=None, unit_conversion_parameters=None, default_value=None, **kwargs)
Instantiate an Output.
- Parameters:
name (str) – python variable name to assign the Output to.
parent_device (
IntermediateDevice) – Parent device the output is connected to.connection (str) – Channel of parent device output is connected to.
limits (tuple, optional) –
(min,max)allowed for the output.unit_conversion_class (
labscript_utils:labscript_utils.unitconversions, optional) – Unit concersion class to use for the output.unit_conversion_parameters (dict, optional) – Dictonary or kwargs to pass to the unit conversion class.
default_value (float, optional) – Default value of the output if no output is commanded.
**kwargs – Passed to
Device.__init__().
- Raises:
LabscriptError – Limits tuple is invalid or unit conversion class units don’t line up.
Methods
__init__(name, parent_device, connection[, ...])Instantiate an Output.
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.
constant(t, value[, units])Sets the output to a constant value at time
t.customramp(t, duration, function, *args, ...)Define a custom function for the output.
do_checks(trigger_times)Basic error checking to ensure the user's instructions make sense.
exp_ramp(t, duration, initial, final, samplerate)Exponential ramp whose rate of change is set by an asymptotic value (zero argument).
exp_ramp_t(t, duration, initial, final, ...)Exponential ramp whose rate of change is set by the time_constant.
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.
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.
piecewise_accel_ramp(t, duration, initial, ...)Changes the output so that the second derivative follows one period of a triangle wave.
quantise_to_pseudoclock(times)Quantises
timesto the resolution of the controlling pseudoclock.ramp(t, duration, initial, final, samplerate)Command the output to perform a linear ramp.
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.
sine(t, duration, amplitude, angfreq, phase, ...)Command the output to perform a sinusoidal modulation.
sine4_ramp(t, duration, initial, final, ...)Command the output to perform an increasing ramp defined by one half period of a quartic sine wave.
sine4_reverse_ramp(t, duration, initial, ...)Command the output to perform a decreasing ramp defined by one half period of a quartic sine wave.
sine_ramp(t, duration, initial, final, ...)Command the output to perform a ramp defined by one half period of a squared sine wave.
square_wave(t, duration, amplitude, ...[, ...])A standard square wave.
square_wave_levels(t, duration, level_0, ...)A standard square wave.
Attributes
allowed_childrenDefines types of devices that are allowed to be children of this device.
allowed_statesclock_limitReturns the parent clock line's clock limit.
default_valueBrief description of the device.
parent_clock_lineStores the clocking clockline, which may be itself.
pseudoclock_deviceStores the clocking pseudoclock, which may be itself.
scale_factort0The earliest time output can be commanded from this device at the start of the experiment.
trigger_delayThe earliest time output can be commanded from this device after a trigger.
wait_delayThe earliest time output can be commanded from this device after a wait.
- description = 'analog output'
Brief description of the device.