Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
dtg5334.DTG5334 Class Reference

Tektronix DTG 5334. More...

Inheritance diagram for dtg5334.DTG5334:
Inheritance graph
[legend]
Collaboration diagram for dtg5334.DTG5334:
Collaboration graph
[legend]

Public Member Functions

def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Required tasks to be 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 load_waveform (self, load_dict)
 Loads a waveform to the specified channel of the pulsing device. More...
 
def load_sequence (self, sequence_name)
 Loads a sequence to the channels of the device in order to be ready for playback. More...
 
def get_loaded_assets (self)
 Retrieve the currently loaded asset names for each active channel of the device. More...
 
def clear_all (self)
 Clears all loaded waveforms from the pulse generators RAM/workspace. 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)
 Device has no analog channels.
 
def set_analog_level (self, amplitude=None, offset=None)
 Device has no analog channels.
 
def get_digital_level (self, low=None, high=None)
 Retrieve the digital low and high level of the provided/all 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 write_waveform (self, name, analog_samples, digital_samples, is_first_chunk, is_last_chunk, total_number_of_samples)
 
def write_sequence (self, name, sequence_parameters)
 Write a new sequence on the device memory. More...
 
def get_waveform_names (self)
 Retrieve the names of all uploaded waveforms on the device. More...
 
def get_sequence_names (self)
 Retrieve the names of all uploaded sequence on the device. More...
 
def delete_waveform (self, waveform_name)
 Delete the waveform with name "waveform_name" from the device memory. More...
 
def delete_sequence (self, sequence_name)
 Delete the sequence with name "sequence_name" from the device memory. More...
 
def get_interleave (self)
 Check whether Interleave is ON or OFF in AWG. More...
 
def set_interleave (self, state=False)
 Turns the interleave of an AWG on or off. More...
 
def write (self, command)
 Sends a command string to the device. More...
 
def query (self, question)
 Asks the device a 'question' and receive and return an answer from it. More...
 
def reset (self)
 Reset the device. More...
 
def has_sequence_mode (self)
 Asks the pulse generator whether sequence mode exists. More...
 
- Public Member Functions inherited from core.module.BaseMixin
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...
 
- Public Member Functions inherited from core.module.ModuleMeta
def __new__ (cls, name, bases, attrs)
 Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More...
 

Public Attributes

 current_loaded_assets
 
 dtg
 
 connected
 
 current_loaded_asset_type
 
 waveform_names
 
 sequence_names
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Static Public Attributes

 visa_address = ConfigOption('visa_address', missing='error')
 
dictionary ch_map
 
dictionary modules_map
 
dictionary stb_values
 

Detailed Description

Tektronix DTG 5334.

Example config for copy-paste:

pulser_dtg: module 'dtg.dtg5334.DTG5334' visa_address 'GPIB0::12::INSTR'

Member Function Documentation

◆ clear_all()

def dtg5334.DTG5334.clear_all (   self)

Clears all loaded waveforms from the pulse generators RAM/workspace.

Returns
int: error code (0:OK, -1:error)

◆ delete_sequence()

def dtg5334.DTG5334.delete_sequence (   self,
  sequence_name 
)

Delete the sequence with name "sequence_name" from the device memory.

Parameters
strsequence_name: The name of the sequence to be deleted Optionally a list of sequence names can be passed.
Returns
list: a list of deleted sequence names.

◆ delete_waveform()

def dtg5334.DTG5334.delete_waveform (   self,
  waveform_name 
)

Delete the waveform with name "waveform_name" from the device memory.

Parameters
strwaveform_name: The name of the waveform to be deleted Optionally a list of waveform names can be passed.
Returns
list: a list of deleted waveform names.

◆ get_active_channels()

def dtg5334.DTG5334.get_active_channels (   self,
  ch = None 
)

Get the active channels of the pulse generator hardware.

Parameters
listch: optional, if specific analog or digital channels are needed to be asked without obtaining all the channels.
Returns
dict: where keys denoting the channel string and items boolean expressions whether channel are active or not.

If no parameter (or None) is passed to this method all channel states will be returned.

◆ get_constraints()

def dtg5334.DTG5334.get_constraints (   self)

Retrieve the hardware constrains from the Pulsing device.

Returns
constraints object: object with pulser constraints as attributes.

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

◆ get_digital_level()

def dtg5334.DTG5334.get_digital_level (   self,
  low = None,
  high = None 
)

Retrieve the digital low and high level of the provided/all channels.

Parameters
listlow: optional, if the low value (in Volt) of a specific channel is desired.
listhigh: optional, if the high value (in Volt) of a specific channel is desired.
Returns
: (dict, dict): tuple of two dicts, with keys being the channel descriptor strings (i.e. 'd_ch1', 'd_ch2') and items being the values for those channels. Both low and high value of a channel is denoted in volts.
Note
Do not return a saved low and/or high value but instead retrieve the current low and/or high value directly from the device.

◆ get_interleave()

def dtg5334.DTG5334.get_interleave (   self)

Check whether Interleave is ON or OFF in AWG.

Returns
bool: True: ON, False: OFF

Will always return False for pulse generator hardware without interleave.

◆ get_loaded_assets()

def dtg5334.DTG5334.get_loaded_assets (   self)

Retrieve the currently loaded asset names for each active channel of the device.

Returns
(dict, str): Dictionary with keys being the channel number and values being the respective asset loaded into the channel, string describing the asset type ('waveform' or 'sequence')

◆ get_sample_rate()

def dtg5334.DTG5334.get_sample_rate (   self)

Get the sample rate of the pulse generator hardware.

Returns
float: The current sample rate of the device (in Hz)

Do not return a saved sample rate from an attribute, but instead retrieve the current sample rate directly from the device.

◆ get_sequence_names()

def dtg5334.DTG5334.get_sequence_names (   self)

Retrieve the names of all uploaded sequence on the device.

Returns
list: List of all uploaded sequence name strings in the device workspace.

◆ get_status()

def dtg5334.DTG5334.get_status (   self)

Retrieves the status of the pulsing hardware.

Returns
(int, dict): tuple with an integer value of the current status and a corresponding dictionary containing status description for all the possible status variables of the pulse generator hardware.

◆ get_waveform_names()

def dtg5334.DTG5334.get_waveform_names (   self)

Retrieve the names of all uploaded waveforms on the device.

Returns
list: List of all uploaded waveform name strings in the device workspace.

◆ has_sequence_mode()

def dtg5334.DTG5334.has_sequence_mode (   self)

Asks the pulse generator whether sequence mode exists.

Returns
: bool, True for yes, False for no.

◆ load_sequence()

def dtg5334.DTG5334.load_sequence (   self,
  sequence_name 
)

Loads a sequence to the channels of the device in order to be ready for playback.

For devices that have a workspace (i.e. AWG) this will load the sequence from the device workspace into the channels. For a device without mass memory this will make the waveform/pattern that has been previously written with self.write_waveform ready to play.

Parameters
sequence_namedict|list, a dictionary with keys being one of the available channel index and values being the name of the already written waveform to load into the channel. Examples {1: rabi_ch1, 2: rabi_ch2} or {1: rabi_ch2, 2: rabi_ch1} If just a list of waveform names if given, the channel association will be invoked from the channel suffix '_ch1', '_ch2' etc.
Returns
dict: Dictionary containing the actually loaded waveforms per channel.

◆ load_waveform()

def dtg5334.DTG5334.load_waveform (   self,
  load_dict 
)

Loads a waveform to the specified channel of the pulsing device.

For devices that have a workspace (i.e. AWG) this will load the waveform from the device workspace into the channel. For a device without mass memory this will make the waveform/pattern that has been previously written with self.write_waveform ready to play.

Parameters
load_dictdict|list, a dictionary with keys being one of the available channel index and values being the name of the already written waveform to load into the channel. Examples {1: rabi_ch1, 2: rabi_ch2} or {1: rabi_ch2, 2: rabi_ch1} If just a list of waveform names if given, the channel association will be invoked from the channel suffix '_ch1', '_ch2' etc.
Returns
dict: Dictionary containing the actually loaded waveforms per channel.

◆ pulser_off()

def dtg5334.DTG5334.pulser_off (   self)

Switches the pulsing device off.

Returns
int: error code (0:OK, -1:error)

◆ pulser_on()

def dtg5334.DTG5334.pulser_on (   self)

Switches the pulsing device on.

Returns
int: error code (0:OK, -1:error)

◆ query()

def dtg5334.DTG5334.query (   self,
  question 
)

Asks the device a 'question' and receive and return an answer from it.

Parameters
stringquestion: string containing the command
Returns
string: the answer of the device to the 'question' in a string

◆ reset()

def dtg5334.DTG5334.reset (   self)

Reset the device.

Returns
int: error code (0:OK, -1:error)

◆ set_digital_level()

def dtg5334.DTG5334.set_digital_level (   self,
  low = None,
  high = None 
)

Set low and/or high value of the provided digital channel.

Parameters
dictlow: dictionary, with key being the channel descriptor string (i.e. 'd_ch1', 'd_ch2') and items being the low values (in volt) for the desired channel.
dicthigh: dictionary, with key being the channel descriptor string (i.e. 'd_ch1', 'd_ch2') and items being the high values (in volt) for the desired channel.
Returns
(dict, dict): tuple of two dicts where first dict denotes the current low value and the second dict the high value for ALL digital channels. Keys are the channel descriptor strings (i.e. 'd_ch1', 'd_ch2')

If nothing is passed then the command will return the current voltage levels.

Note
After setting the high and/or low values of the device, use the actual set return values for further processing.

◆ set_interleave()

def dtg5334.DTG5334.set_interleave (   self,
  state = False 
)

Turns the interleave of an AWG on or off.

Parameters
boolstate: The state the interleave should be set to (True: ON, False: OFF)
Returns
bool: actual interleave status (True: ON, False: OFF)

Unused for pulse generator hardware other than an AWG.

◆ set_sample_rate()

def dtg5334.DTG5334.set_sample_rate (   self,
  sample_rate 
)

Set the sample rate of the pulse generator hardware.

Parameters
floatsample_rate: The sampling rate to be set (in Hz)
Returns
float: the sample rate returned from the device (in Hz).
Note
After setting the sampling rate of the device, use the actually set return value for further processing.

◆ write()

def dtg5334.DTG5334.write (   self,
  command 
)

Sends a command string to the device.

Parameters
stringcommand: string containing the command
Returns
int: error code (0:OK, -1:error)

◆ write_sequence()

def dtg5334.DTG5334.write_sequence (   self,
  name,
  sequence_parameters 
)

Write a new sequence on the device memory.

Parameters
namestr, the name of the waveform to be created/append to
sequence_parametersdict, dictionary containing the parameters for a sequence
Returns
: int, number of sequence steps written (-1 indicates failed process)

Member Data Documentation

◆ ch_map

dictionary dtg5334.DTG5334.ch_map
static
Initial value:
= {
'd_ch1': ('A', 1),
'd_ch2': ('A', 2),
'd_ch3': ('B', 1),
'd_ch4': ('B', 2),
'd_ch5': ('C', 1),
'd_ch6': ('C', 2),
'd_ch7': ('D', 1),
'd_ch8': ('D', 2)
}

◆ modules_map

dictionary dtg5334.DTG5334.modules_map
static
Initial value:
= {
-1: 'No module',
1: 'DTGM10',
2: 'DTGM20',
3: 'DTGM30',
4: 'DTGM31',
5: 'DTGM31',
6: 'DTGM32'
}

◆ stb_values

dictionary dtg5334.DTG5334.stb_values
static
Initial value:
= {
0: 'Wat'
}

The documentation for this class was generated from the following file: