Sequence Classes - ACBJayichLab/NV_ABJ GitHub Wiki
Intro
There are three main aspects to the generation of a functional sequence. The devices that are in use, any subsets of the sequence, and the actual sequence.
Sequence Devices
This is a class allows you to add basic information about a device from a sequence. The list of editable properties are below
address:int # A unique integer for the device name or None if we are to ignore the device in the sequence
device_label:str # The name that will be used for labeling and graphing
delayed_to_on_s:float = 0 # How many seconds it takes to turn on must be greater than or equal to zero
device_status:bool = False # False indicates an off device when updating the devices True will be on
You can make a device by calling the SequenceDevice class which is a default class installed with the NV_ABJ package. Defining a device may look something line bellow
dev0 = SequenceDevice(0,"device 0",10e-9)
This is creating a device names dev0 that is connected to the 0 bit address, has a name of "device 0" and takes 10ns to turn on from off. We can then also define a device with keywords
dev0 = SequenceDevice(address=0,
device_label="device 0",
delayed_to_on_s=10e-9)
If we want to toggle the state of a device we can define that devices status which is either off(False) or on(True)
Indicating the device should be on
dev0.device_status = True
This will not turn the device on you will then need to call your pulse generators instance of update_device(device_list) which will look at the devices passed to it and turn them on or off respectively. This is done in this way so we can have a return to normal operations after running a sequence if that is green laser aom on and microwaves on or a different configuration. There should also be a locking feature on all pulse generators where if the code believes a sequence is running you will have to stop the pulse sequence from the pulse generators class before you can update the devices.