Qudi
|
A hardware module for the Tektronix AWG5000 series for generating waveforms and sequences thereof. More...
Public Member Functions | |
def | __init__ (self, config, kwargs) |
def | on_activate (self) |
Initialisation performed during activation of the module. | |
def | on_deactivate (self) |
Deinitialisation performed during deactivation of the module. | |
def | get_constraints (self) |
Retrieve the hardware constrains from the Pulsing device. More... | |
def | pulser_on (self) |
Switches the pulsing device on. More... | |
def | pulser_off (self) |
Switches the pulsing device off. More... | |
def | upload_asset (self, asset_name=None) |
Upload an already hardware conform file to the device. More... | |
def | load_asset (self, asset_name, load_dict=None) |
Loads a sequence or waveform to the specified channel of the pulsing device. More... | |
def | get_loaded_asset (self) |
Retrieve the currently loaded asset name of the device. More... | |
def | clear_all (self) |
Clears the loaded waveform from the pulse generators RAM. More... | |
def | get_status (self) |
Retrieves the status of the pulsing hardware. More... | |
def | get_sample_rate (self) |
Get the sample rate of the pulse generator hardware. More... | |
def | set_sample_rate (self, sample_rate) |
Set the sample rate of the pulse generator hardware. More... | |
def | get_analog_level (self, amplitude=None, offset=None) |
Retrieve the analog amplitude and offset of the provided channels. More... | |
def | set_analog_level (self, amplitude=None, offset=None) |
Set amplitude and/or offset value of the provided analog channel. More... | |
def | get_digital_level (self, low=None, high=None) |
Retrieve the digital low and high level of the provided channels. More... | |
def | set_digital_level (self, low=None, high=None) |
Set low and/or high value of the provided digital channel. More... | |
def | get_active_channels (self, ch=None) |
Get the active channels of the pulse generator hardware. More... | |
def | set_active_channels (self, ch=None) |
def | get_uploaded_asset_names (self) |
Retrieve the names of all uploaded assets on the device. More... | |
def | get_saved_asset_names (self) |
Retrieve the names of all sampled and saved assets on the host PC. More... | |
def | delete_asset (self, asset_name) |
Delete all files associated with an asset with the passed asset_name from the device memory. More... | |
def | set_asset_dir_on_device (self, dir_path) |
Change the directory where the assets are stored on the device. More... | |
def | get_asset_dir_on_device (self) |
Ask for the directory where the assets are stored on the device. More... | |
def | has_sequence_mode (self) |
Asks the pulse generator whether sequence mode exists. More... | |
def | get_interleave (self) |
Check whether Interleave is on in AWG. More... | |
def | set_interleave (self, state=False) |
Turns the interleave of an AWG on or off. More... | |
def | tell (self, command) |
Send a command string to the AWG. More... | |
def | ask (self, question) |
Asks the device a 'question' and receive an answer from it. More... | |
def | reset (self) |
Reset the device. More... | |
def | set_lowpass_filter (self, a_ch, cutoff_freq) |
Set a lowpass filter to the analog channels ofawg the AWG. More... | |
def | set_jump_timing (self, synchronous=False) |
Sets control of the jump timing in the AWG. More... | |
def | set_mode (self, mode) |
Change the output mode of the AWG5000 series. More... | |
def | get_sequencer_mode (self, output_as_int=False) |
Asks the AWG which sequencer mode it is using. More... | |
![]() | |
def | __init__ (self, manager, name, config=None, callbacks=None, kwargs) |
Initialise Base class object and set up its state machine. More... | |
def | log (self) |
Returns a logger object. | |
def | is_module_threaded (self) |
Returns whether the module shall be started in a thread. | |
def | on_activate (self) |
Method called when module is activated. More... | |
def | on_deactivate (self) |
Method called when module is deactivated. More... | |
def | getStatusVariables (self) |
Return a dict of variable names and their content representing the module state for saving. More... | |
def | setStatusVariables (self, variableDict) |
Give a module a dict of variable names and their content representing the module state. More... | |
def | getConfiguration (self) |
Return the configration dictionary for this module. More... | |
def | get_connector (self, connector_name) |
Return module connected to the given named connector. More... | |
![]() | |
def | __new__ (cls, name, bases, attrs) |
Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More... | |
Public Attributes | |
connected | |
sequence_mode | |
current_loaded_asset | |
soc | |
input_buffer | |
asset_directory | |
host_waveform_directory | |
awg_model | |
status_dic | |
![]() | |
module_state | |
connectors | |
Static Public Attributes | |
ip_address = ConfigOption('awg_ip_address', missing='error') | |
port = ConfigOption('awg_port', missing='error') | |
ftp_root_directory = ConfigOption('ftp_root_dir', 'C:\\inetpub\\ftproot', missing='warn') | |
user = ConfigOption('ftp_login', 'anonymous', missing='warn') | |
passwd = ConfigOption('ftp_passwd', 'anonymous@', missing='warn') | |
default_sample_rate = ConfigOption('default_sample_rate', missing='warn') | |
A hardware module for the Tektronix AWG5000 series for generating waveforms and sequences thereof.
Unstable and in construction, Alexander Stark
Example config for copy-paste:
pulser_awg5000: module 'awg.tektronix_awg5002c.AWG5002C' awg_ip_address '10.42.0.211' awg_port 3000 # the port number as integer timeout 20
def tektronix_awg5002c.AWG5002C.ask | ( | self, | |
question | |||
) |
Asks the device a 'question' and receive an answer from it.
string | question: string containing the command |
def tektronix_awg5002c.AWG5002C.clear_all | ( | self | ) |
Clears the loaded waveform from the pulse generators RAM.
Delete all waveforms and sequences from Hardware memory and clear the visual display. Unused for digital pulse generators without sequence storage capability (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.delete_asset | ( | self, | |
asset_name | |||
) |
Delete all files associated with an asset with the passed asset_name from the device memory.
str | asset_name: The name of the asset to be deleted Optionally a list of asset names can be passed. |
Unused for digital pulse generators without sequence storage capability (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.get_active_channels | ( | self, | |
ch = None |
|||
) |
Get the active channels of the pulse generator hardware.
list | ch: optional, if specific analog or digital channels are needed to be asked without obtaining all the channels. |
Example for an possible input (order is not important): ch = ['a_ch2', 'd_ch2', 'a_ch1', 'd_ch5', 'd_ch1'] then the output might look like {'a_ch2': True, 'd_ch2': False, 'a_ch1': False, 'd_ch5': True, 'd_ch1': False}
If no parameters are passed to this method all channels will be asked for their setting.
def tektronix_awg5002c.AWG5002C.get_analog_level | ( | self, | |
amplitude = None , |
|||
offset = None |
|||
) |
Retrieve the analog amplitude and offset of the provided channels.
list | amplitude: optional, if a specific amplitude value (in Volt peak to peak, i.e. the full amplitude) of a channel is desired. |
list | offset: optional, if a specific high value (in Volt) of a channel is desired. |
If no entries provided then the levels of all channels where simply returned. If no analog channels provided, return just an empty dict. Example of a possible input: amplitude = [1,4], offset =[1,3] to obtain the amplitude of channel 1 and 4 and the offset {1: -0.5, 4: 2.0} {} since no high request was performed.
The major difference to digital signals is that analog signals are always oscillating or changing signals, otherwise you can use just digital output. In contrast to digital output levels, analog output levels are defined by an amplitude (here total signal span, denoted in Voltage peak to peak) and an offset (a value around which the signal oscillates, denoted by an (absolute) voltage).
In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!
def tektronix_awg5002c.AWG5002C.get_asset_dir_on_device | ( | self | ) |
Ask for the directory where the assets are stored on the device.
Unused for digital pulse generators without changeable file structure (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.get_constraints | ( | self | ) |
Retrieve the hardware constrains from the Pulsing device.
Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller.
SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!!
If you are not sure about the meaning, look in other hardware files to get an impression. If still additional constraints are needed, then they have to be added to the PulserConstraints class.
Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter.
PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_list>, <descriptor_str>: <channel_list>, ...}
If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros).
def tektronix_awg5002c.AWG5002C.get_digital_level | ( | self, | |
low = None , |
|||
high = None |
|||
) |
Retrieve the digital low and high level of the provided channels.
list | low: optional, if a specific low value (in Volt) of a channel is desired. |
list | high: optional, if a specific high value (in Volt) of a channel is desired. |
If no entries provided then the levels of all channels where simply returned. If no digital channels provided, return just an empty dict.
Example of a possible input: low = [1,4] to obtain the low voltage values of digital channel 1 an 4. A possible answer might be {1: -0.5, 4: 2.0} {} since no high request was performed.
The major difference to analog signals is that digital signals are either ON or OFF, whereas analog channels have a varying amplitude range. In contrast to analog output levels, digital output levels are defined by a voltage, which corresponds to the ON status and a voltage which corresponds to the OFF status (both denoted in (absolute) voltage)
In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!
def tektronix_awg5002c.AWG5002C.get_interleave | ( | self | ) |
Check whether Interleave is on in AWG.
Unused for pulse generator hardware other than an AWG. The AWG 5000 Series does not have an interleave mode and this method exists only for compability reasons.
def tektronix_awg5002c.AWG5002C.get_loaded_asset | ( | self | ) |
Retrieve the currently loaded asset name of the device.
def tektronix_awg5002c.AWG5002C.get_sample_rate | ( | self | ) |
Get the sample rate of the pulse generator hardware.
Do not return a saved sample rate in a class variable, but instead retrieve the current sample rate directly from the device.
def tektronix_awg5002c.AWG5002C.get_saved_asset_names | ( | self | ) |
Retrieve the names of all sampled and saved assets on the host PC.
This is no list of the file names.
def tektronix_awg5002c.AWG5002C.get_sequencer_mode | ( | self, | |
output_as_int = False |
|||
) |
Asks the AWG which sequencer mode it is using.
def tektronix_awg5002c.AWG5002C.get_status | ( | self | ) |
Retrieves the status of the pulsing hardware.
def tektronix_awg5002c.AWG5002C.get_uploaded_asset_names | ( | self | ) |
Retrieve the names of all uploaded assets on the device.
Unused for digital pulse generators without sequence storage capability (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.has_sequence_mode | ( | self | ) |
Asks the pulse generator whether sequence mode exists.
def tektronix_awg5002c.AWG5002C.load_asset | ( | self, | |
asset_name, | |||
load_dict = None |
|||
) |
Loads a sequence or waveform to the specified channel of the pulsing device.
str | asset_name: The name of the asset to be loaded |
dict | load_dict: a dictionary with keys being one of the available channel numbers and items being the name of the already sampled waveform/sequence files. Examples {1: rabi_Ch1, 2: rabi_Ch2} {1: rabi_Ch2, 2: rabi_Ch1} This parameter is optional. If none is given then the channel association is invoked from the sequence generation, i.e. the filename appendix (_Ch1, _Ch2 etc.) |
Unused for digital pulse generators without sequence storage capability (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.pulser_off | ( | self | ) |
Switches the pulsing device off.
def tektronix_awg5002c.AWG5002C.pulser_on | ( | self | ) |
Switches the pulsing device on.
def tektronix_awg5002c.AWG5002C.reset | ( | self | ) |
Reset the device.
def tektronix_awg5002c.AWG5002C.set_analog_level | ( | self, | |
amplitude = None , |
|||
offset = None |
|||
) |
Set amplitude and/or offset value of the provided analog channel.
dict | amplitude: dictionary, with key being the channel and items being the amplitude values (in Volt peak to peak, i.e. the full amplitude) for the desired channel. |
dict | offset: dictionary, with key being the channel and items being the offset values (in absolute volt) for the desired channel. |
If nothing is passed then the command will return two empty dicts.
The major difference to digital signals is that analog signals are always oscillating or changing signals, otherwise you can use just digital output. In contrast to digital output levels, analog output levels are defined by an amplitude (here total signal span, denoted in Voltage peak to peak) and an offset (a value around which the signal oscillates, denoted by an (absolute) voltage).
In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!
def tektronix_awg5002c.AWG5002C.set_asset_dir_on_device | ( | self, | |
dir_path | |||
) |
Change the directory where the assets are stored on the device.
string | dir_path: The target directory |
Unused for digital pulse generators without changeable file structure (PulseBlaster, FPGA).
def tektronix_awg5002c.AWG5002C.set_digital_level | ( | self, | |
low = None , |
|||
high = None |
|||
) |
Set low and/or high value of the provided digital channel.
dict | low: dictionary, with key being the channel and items being the low values (in volt) for the desired channel. |
dict | high: dictionary, with key being the channel and items being the high values (in volt) for the desired channel. |
If nothing is passed then the command will return two empty dicts.
The major difference to analog signals is that digital signals are either ON or OFF, whereas analog channels have a varying amplitude range. In contrast to analog output levels, digital output levels are defined by a voltage, which corresponds to the ON status and a voltage which corresponds to the OFF status (both denoted in (absolute) voltage)
In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!
def tektronix_awg5002c.AWG5002C.set_interleave | ( | self, | |
state = False |
|||
) |
Turns the interleave of an AWG on or off.
bool | state: The state the interleave should be set to (True: ON, False: OFF) |
Unused for pulse generator hardware other than an AWG. The AWG 5000 Series does not have an interleave mode and this method exists only for compability reasons.
def tektronix_awg5002c.AWG5002C.set_jump_timing | ( | self, | |
synchronous = False |
|||
) |
Sets control of the jump timing in the AWG.
bool | synchronous: if True the jump timing will be set to synchornous, otherwise the jump timing will be set to asynchronous. |
If the Jump timing is set to asynchornous the jump occurs as quickly as possible after an event occurs (e.g. event jump tigger), if set to synchornous the jump is made after the current waveform is output. The default value is asynchornous.
def tektronix_awg5002c.AWG5002C.set_lowpass_filter | ( | self, | |
a_ch, | |||
cutoff_freq | |||
) |
Set a lowpass filter to the analog channels ofawg the AWG.
int | a_ch: To which channel to apply, either 1 or 2. |
cutoff_freq | Cutoff Frequency of the lowpass filter in Hz. |
def tektronix_awg5002c.AWG5002C.set_mode | ( | self, | |
mode | |||
) |
Change the output mode of the AWG5000 series.
str | mode: Options for mode (case-insensitive): continuous 'C' triggered 'T' gated 'G' sequence 'S' |
def tektronix_awg5002c.AWG5002C.set_sample_rate | ( | self, | |
sample_rate | |||
) |
Set the sample rate of the pulse generator hardware.
float | sample_rate: The sampling rate to be set (in Hz) |
def tektronix_awg5002c.AWG5002C.tell | ( | self, | |
command | |||
) |
Send a command string to the AWG.
command | string containing the command |
def tektronix_awg5002c.AWG5002C.upload_asset | ( | self, | |
asset_name = None |
|||
) |
Upload an already hardware conform file to the device.
Does NOT load into channels.
str | name: name of the ensemble/sequence to be uploaded |
If nothing is passed, method will be skipped.