Tektronix Drivers¶
Classes:
|
Deprecated alias for backwards compatibility |
|
Deprecated alias for backwards compatibility |
|
Class to hold a channel of the AWG. |
|
This is the QCoDeS driver for the Tektronix AWG5014 Arbitrary Waveform Generator. |
|
The QCoDeS driver for Tektronix AWG5208 |
|
Base class for QCoDeS drivers for Tektronix AWG70000 series AWG's. |
|
The QCoDeS driver for Tektronix AWG70001A series AWG's. |
|
The QCoDeS driver for Tektronix AWG70001B series AWG's. |
|
The QCoDeS driver for Tektronix AWG70002A series AWG's. |
|
The QCoDeS driver for Tektronix AWG70002B series AWG's. |
|
QCoDeS driver for Tektronix DPO5000 Digital Oscilloscopes |
|
QCoDeS driver for Tektronix DPO7000 Digital Oscilloscopes |
|
QCoDeS driver for Tektronix DPO70000 Digital Oscilloscopes |
|
The main channel module for the oscilloscope. |
|
This submodule sets and retrieves information regarding the data source for the "CURVE?" query, which is used when retrieving waveform data. |
|
This module controls the horizontal axis of the scope |
|
The measurement submodule |
|
A measurement parameter does not only return the instantaneous value of a measurement, but can also return some statistics. |
|
|
|
Submodule for trigger setup. |
|
This submodule retrieves data from waveform sources, e.g. channels. |
|
With this sub module we can query waveform formatting data. |
|
QCoDeS driver for Tektronix DSA70000 Digital Oscilloscopes |
|
QCoDeS driver for Tektronix MSO5000 Digital Oscilloscopes |
|
QCoDeS driver for Tektronix MSO70000 Digital Oscilloscopes |
|
This is the QCoDeS driver for the Tektronix 2012B oscilloscope. |
|
Exceptions:
Raise this exception if we are in a wrong mode to perform an action |
- class qcodes.instrument_drivers.tektronix.TekronixDPOTrigger(**kwargs)[source]¶
Bases:
TektronixDPOTrigger
Deprecated alias for backwards compatibility
- class qcodes.instrument_drivers.tektronix.TekronixDPOWaveform(**kwargs)[source]¶
Bases:
TektronixDPOWaveform
Deprecated alias for backwards compatibility
- class qcodes.instrument_drivers.tektronix.Tektronix70000AWGChannel(parent: Instrument, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]¶
Bases:
InstrumentChannel
Class to hold a channel of the AWG.
- Parameters:
parent – The Instrument instance to which the channel is to be attached.
name – The name used in the DataSet
channel – The channel number, either 1 or 2.
**kwargs – Forwarded to base class.
Attributes:
Parameter state
Parameter fgen_amplitude
Parameter fgen_offset
Parameter fgen_frequency
Parameter fgen_dclevel
Parameter fgen_signalpath
Parameter fgen_period
Parameter fgen_phase
Parameter fgen_symmetry
Parameter fgen_type
Parameter awg_amplitude
Parameter offset
Parameter assigned_asset
Parameter resolution
Methods:
setWaveform
(name)Select a waveform from the waveform list to output on this channel
setSequenceTrack
(seqname, tracknr)Assign a track from a sequence to this channel.
Clear assigned assets on this channel
- state: Parameter = self.add_parameter( "state", label=f"Channel {channel} state", get_cmd=f"OUTPut{channel}:STATe?", set_cmd=f"OUTPut{channel}:STATe {{}}", vals=vals.Ints(0, 1), get_parser=int, )¶
Parameter state
- fgen_amplitude: Parameter = self.add_parameter( "fgen_amplitude", label=f"Channel {channel} {fg} amplitude", get_cmd=f"FGEN:CHANnel{channel}:AMPLitude?", set_cmd=f"FGEN:CHANnel{channel}:AMPLitude {{}}", unit="V", vals=vals.Numbers(0, _chan_amps[self.model]), get_parser=float, )¶
Parameter fgen_amplitude
- fgen_offset: Parameter = self.add_parameter( "fgen_offset", label=f"Channel {channel} {fg} offset", get_cmd=f"FGEN:CHANnel{channel}:OFFSet?", set_cmd=f"FGEN:CHANnel{channel}:OFFSet {{}}", unit="V", vals=vals.Numbers(0, 0.250), # depends on ampl. get_parser=float, )¶
Parameter fgen_offset
- fgen_frequency: Parameter = self.add_parameter( "fgen_frequency", label=f"Channel {channel} {fg} frequency", get_cmd=f"FGEN:CHANnel{channel}:FREQuency?", set_cmd=partial(self._set_fgfreq, channel), unit="Hz", get_parser=float, )¶
Parameter fgen_frequency
- fgen_dclevel: Parameter = self.add_parameter( "fgen_dclevel", label=f"Channel {channel} {fg} DC level", get_cmd=f"FGEN:CHANnel{channel}:DCLevel?", set_cmd=f"FGEN:CHANnel{channel}:DCLevel {{}}", unit="V", vals=vals.Numbers(-0.25, 0.25), get_parser=float, )¶
Parameter fgen_dclevel
- fgen_signalpath: Parameter = self.add_parameter( "fgen_signalpath", label=f"Channel {channel} {fg} signal path", set_cmd=f"FGEN:CHANnel{channel}:PATH {{}}", get_cmd=f"FGEN:CHANnel{channel}:PATH?", val_mapping=_fg_path_val_map[self.root_instrument.model], )¶
Parameter fgen_signalpath
- fgen_period: Parameter = self.add_parameter( "fgen_period", label=f"Channel {channel} {fg} period", get_cmd=f"FGEN:CHANnel{channel}:PERiod?", unit="s", get_parser=float, )¶
Parameter fgen_period
- fgen_phase: Parameter = self.add_parameter( "fgen_phase", label=f"Channel {channel} {fg} phase", get_cmd=f"FGEN:CHANnel{channel}:PHASe?", set_cmd=f"FGEN:CHANnel{channel}:PHASe {{}}", unit="degrees", vals=vals.Numbers(-180, 180), get_parser=float, )¶
Parameter fgen_phase
- fgen_symmetry: Parameter = self.add_parameter( "fgen_symmetry", label=f"Channel {channel} {fg} symmetry", set_cmd=f"FGEN:CHANnel{channel}:SYMMetry {{}}", get_cmd=f"FGEN:CHANnel{channel}:SYMMetry?", unit="%", vals=vals.Numbers(0, 100), get_parser=float, )¶
Parameter fgen_symmetry
- fgen_type: Parameter = self.add_parameter( "fgen_type", label=f"Channel {channel} {fg} type", set_cmd=f"FGEN:CHANnel{channel}:TYPE {{}}", get_cmd=f"FGEN:CHANnel{channel}:TYPE?", val_mapping={ "SINE": "SINE", "SQUARE": "SQU", "TRIANGLE": "TRI", "NOISE": "NOIS", "DC": "DC", "GAUSSIAN": "GAUSS", "EXPONENTIALRISE": "EXPR", "EXPONENTIALDECAY": "EXPD", "NONE": "NONE", }, )¶
Parameter fgen_type
- awg_amplitude: Parameter = self.add_parameter( "awg_amplitude", label=f"Channel {channel} AWG peak-to-peak amplitude", set_cmd=f"SOURCe{channel}:VOLTage {{}}", get_cmd=f"SOURce{channel}:VOLTage?", unit="V", get_parser=float, vals=vals.Numbers(0.250, _chan_amps[self.model]), )¶
Parameter awg_amplitude
- offset: Parameter = self.add_parameter( "offset", label=f"Channel {channel} Offset for DC Output paths", set_cmd=f"SOURce{channel}:VOLTage:LEVel:IMMediate:OFFSet {{}}", get_cmd=f"SOURce{channel}:VOLTage:LEVel:IMMediate:OFFSet?", unit="V", get_parser=float, vals=vals.Numbers(-2.0, 2.0), )¶
Parameter offset
- assigned_asset: Parameter = self.add_parameter( "assigned_asset", label=(f"Waveform/sequence assigned to channel {self.channel}"), get_cmd=f"SOURCE{self.channel}:CASSet?", get_parser=_parse_string_response, )¶
Parameter assigned_asset
- resolution: Parameter = self.add_parameter( "resolution", label=f"Channel {channel} bit resolution", get_cmd=f"SOURce{channel}:DAC:RESolution?", set_cmd=f"SOURce{channel}:DAC:RESolution {{}}", vals=vals.Enum(*_chan_resolutions[self.model]), get_parser=int, docstring=_chan_resolution_docstrings[self.model], )¶
Parameter resolution
- setWaveform(name: str) None [source]¶
Select a waveform from the waveform list to output on this channel
- Parameters:
name – The name of the waveform
- setSequenceTrack(seqname: str, tracknr: int) None [source]¶
Assign a track from a sequence to this channel.
- Parameters:
seqname – Name of the sequence in the sequence list
tracknr – Which track to use (1 or 2)
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixAWG5014(name: str, address: str, *, num_channels: int = 4, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
VisaInstrument
This is the QCoDeS driver for the Tektronix AWG5014 Arbitrary Waveform Generator.
The driver makes some assumptions on the settings of the instrument:
The output channels are always in Amplitude/Offset mode
The output markers are always in High/Low mode
Todo
Implement support for cable transfer function compensation
Implement more instrument functionality in the driver
Remove double functionality
Remove inconsistensies between the name of a parameter and the name of the same variable in the tektronix manual
In the future, we should consider the following:
Removing test_send??
That sequence element (SQEL) parameter functions exist but no corresponding parameters.
Initializes the AWG5014.
- Parameters:
name – name of the instrument
address – GPIB or ethernet address as used by VISA
num_channels – number of channels on the device
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
Parameter state
Parameter run_mode
Parameter clock_source
Parameter ref_source
Parameter DC_output
This command sets the sequence length.
Parameter sequence_pos
Parameter trigger_mode
Parameter trigger_impedance
Parameter trigger_level
Parameter trigger_slope
Parameter trigger_source
Parameter event_polarity
Parameter event_impedance
Parameter event_level
Parameter event_jump_timing
Parameter clock_freq
Parameter setup_filename
Methods:
newlinestripper
(string)This query returns the run state of the arbitrary waveform generator or the sequencer.
start
()Convenience function, identical to self.run()
run
()This command initiates the output of a waveform or a sequence.
stop
()This command stops the output of a waveform or a sequence.
This command generates a trigger event.
get_folder_contents
([print_contents])This query returns the current contents and state of the mass storage media (on the AWG Windows machine).
This query returns the current directory of the file system on the arbitrary waveform generator.
set_current_folder_name
(file_path)Set the current directory of the file system on the arbitrary waveform generator.
change_folder
(folder)Duplicate of self.set_current_folder_name
Set the current directory of the file system on the arbitrary waveform generator to C: (the 'root' location in Windows).
create_and_goto_dir
(folder)Set the current directory of the file system on the arbitrary waveform generator.
Set the state of all channels to be ON.
Set the state of all channels to be OFF.
This command generates a trigger event.
This command generates a forced event.
set_sqel_event_target_index
(element_no, index)This command sets the target index for the sequencer's event jump operation.
set_sqel_goto_target_index
(element_no, ...)This command sets the target index for the GOTO command of the sequencer.
set_sqel_goto_state
(element_no, goto_state)This command sets the GOTO state of the sequencer for the specified sequence element.
set_sqel_loopcnt_to_inf
(element_no[, state])This command sets the infinite looping state for a sequence element.
get_sqel_loopcnt
([element_no])This query returns the loop count (number of repetitions) of a sequence element.
set_sqel_loopcnt
(loopcount[, element_no])This command sets the loop count.
set_sqel_waveform
(waveform_name, channel[, ...])This command sets the waveform for a sequence element on the specified channel.
get_sqel_waveform
(channel[, element_no])This query returns the waveform for a sequence element on the specified channel.
set_sqel_trigger_wait
(element_no[, state])This command sets the wait trigger state for an element.
get_sqel_trigger_wait
(element_no)This query returns the wait trigger state for an element.
set_sqel_event_jump_target_index
(element_no, ...)Duplicate of set_sqel_event_target_index
set_sqel_event_jump_type
(element_no, jtar_state)This command sets the event jump target type for the jump for the specified sequence element.
This query returns the type of the arbitrary waveform generator's sequencer.
This function is used to generate a config file, that is used when generating sequence files, from existing settings in the awg.
Function to query if the current channel settings that have been changed from their default value and put them in a dictionary that can easily be written into an awg file, so as to prevent said awg file from falling back to default values.
returns from the channel index and marker index from a marker descriptor string e.g. '1M1'->(1,1).
send_awg_file
(filename, awg_file[, verbose])Writes an .awg-file onto the disk of the AWG.
load_awg_file
(filename)Loads an .awg-file from the disc of the AWG into the AWG memory.
make_awg_file
(waveforms, m1s, m2s, nreps, ...)make_send_and_load_awg_file
(waveforms, m1s, ...)Makes an .awg-file, sends it to the AWG and loads it.
make_and_save_awg_file
(waveforms, m1s, m2s, ...)Makes an .awg-file and saves it locally.
This function retrieves and returns data from the error and event queues.
Delete all user-defined waveforms in the list in a single action.
Duplicate of self.get_folder_contents
send_DC_pulse
(DC_channel_number, set_level, ...)Sets the DC level on the specified channel, waits a while and then resets it to what it was before.
Assert if the AWG is ready.
send_waveform_to_list
(w, m1, m2, wfmname)Send a single complete waveform directly to the "User defined" waveform list (prepend it).
clear_message_queue
([verbose])Function to clear up (flush) the VISA message queue of the AWG instrument.
- AWG_FILE_FORMAT_HEAD: ClassVar[dict[str, str]] = {'CLOCK_SOURCE': 'h', 'COUPLING': 'h', 'DIVIDER_RATE': 'h', 'EVENT_INPUT_IMPEDANCE': 'h', 'EVENT_INPUT_POLARITY': 'h', 'EVENT_INPUT_THRESHOLD': 'd', 'EXTERNAL_REFERENCE_TYPE': 'h', 'HOLD_REPETITION_RATE': 'h', 'INTERLEAVE': 'h', 'INTERLEAVE_ADJ_AMPLITUDE': 'd', 'INTERLEAVE_ADJ_PHASE': 'd', 'INTERNAL_TRIGGER_RATE': 'd', 'JUMP_TIMING': 'h', 'REFERENCE_CLOCK_FREQUENCY_SELECTION': 'h', 'REFERENCE_MULTIPLIER_RATE': 'h', 'REFERENCE_SOURCE': 'h', 'REPETITION_RATE': 'd', 'RUN_MODE': 'h', 'RUN_STATE': 'h', 'SAMPLING_RATE': 'd', 'TRIGGER_INPUT_IMPEDANCE': 'h', 'TRIGGER_INPUT_POLARITY': 'h', 'TRIGGER_INPUT_SLOPE': 'h', 'TRIGGER_INPUT_THRESHOLD': 'd', 'TRIGGER_SOURCE': 'h', 'WAIT_VALUE': 'h', 'ZEROING': 'h'}¶
- AWG_FILE_FORMAT_CHANNEL: ClassVar[dict[str, str]] = {'ANALOG_AMPLITUDE_N': 'd', 'ANALOG_DIRECT_OUTPUT_N': 'h', 'ANALOG_FILTER_N': 'h', 'ANALOG_HIGH_N': 'd', 'ANALOG_LOW_N': 'd', 'ANALOG_METHOD_N': 'h', 'ANALOG_OFFSET_N': 'd', 'CHANNEL_SKEW_N': 'd', 'CHANNEL_STATE_N': 'h', 'DC_OUTPUT_LEVEL_N': 'd', 'DELAY_IN_POINTS_N': 'd', 'DELAY_IN_TIME_N': 'd', 'DIGITAL_AMPLITUDE_N': 'd', 'DIGITAL_HIGH_N': 'd', 'DIGITAL_LOW_N': 'd', 'DIGITAL_METHOD_N': 'h', 'DIGITAL_OFFSET_N': 'd', 'EXTERNAL_ADD_N': 'h', 'MARKER1_AMPLITUDE_N': 'd', 'MARKER1_HIGH_N': 'd', 'MARKER1_LOW_N': 'd', 'MARKER1_METHOD_N': 'h', 'MARKER1_OFFSET_N': 'd', 'MARKER1_SKEW_N': 'd', 'MARKER2_AMPLITUDE_N': 'd', 'MARKER2_HIGH_N': 'd', 'MARKER2_LOW_N': 'd', 'MARKER2_METHOD_N': 'h', 'MARKER2_OFFSET_N': 'd', 'MARKER2_SKEW_N': 'd', 'OUTPUT_WAVEFORM_NAME_N': 's', 'PHASE_DELAY_INPUT_METHOD_N': 'h', 'PHASE_N': 'd'}¶
- default_timeout: float | None = 180¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- run_mode: Parameter = self.add_parameter( "run_mode", get_cmd="AWGControl:RMODe?", set_cmd="AWGControl:RMODe " + "{}", vals=vals.Enum("CONT", "TRIG", "SEQ", "GAT"), get_parser=self.newlinestripper, )¶
Parameter run_mode
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", get_cmd="AWGControl:CLOCk:SOURce?", set_cmd="AWGControl:CLOCk:SOURce " + "{}", vals=vals.Enum("INT", "EXT"), get_parser=self.newlinestripper, )¶
Parameter clock_source
- ref_source: Parameter = self.add_parameter( "ref_source", label="Reference source", get_cmd="SOURce1:ROSCillator:SOURce?", set_cmd="SOURce1:ROSCillator:SOURce " + "{}", vals=vals.Enum("INT", "EXT"), get_parser=self.newlinestripper, )¶
Parameter ref_source
- DC_output: Parameter = self.add_parameter( "DC_output", label="DC Output (ON/OFF)", get_cmd="AWGControl:DC:STATe?", set_cmd="AWGControl:DC:STATe {}", vals=vals.Ints(0, 1), get_parser=int, )¶
Parameter DC_output
- sequence_length: Parameter = self.add_parameter( "sequence_length", label="Sequence length", get_cmd="SEQuence:LENGth?", set_cmd="SEQuence:LENGth " + "{}", get_parser=int, vals=vals.Ints(0, 8000), docstring=( """ This command sets the sequence length. Use this command to create an uninitialized sequence. You can also use the command to clear all sequence elements in a single action by passing 0 as the parameter. However, this action cannot be undone so exercise necessary caution. Also note that passing a value less than the sequence's current length will cause some sequence elements to be deleted at the end of the sequence. For example if self.get_sq_length returns 200 and you subsequently set sequence_length to 21, all sequence elements except the first 20 will be deleted. """ ), )¶
This command sets the sequence length. Use this command to create an uninitialized sequence. You can also use the command to clear all sequence elements in a single action by passing 0 as the parameter. However, this action cannot be undone so exercise necessary caution. Also note that passing a value less than the sequence’s current length will cause some sequence elements to be deleted at the end of the sequence. For example if self.get_sq_length returns 200 and you subsequently set sequence_length to 21, all sequence elements except the first 20 will be deleted.
- sequence_pos: Parameter = self.add_parameter( "sequence_pos", label="Sequence position", get_cmd="AWGControl:SEQuencer:POSition?", set_cmd="SEQuence:JUMP:IMMediate {}", vals=vals.PermissiveInts(1), set_parser=lambda x: int(round(x)), )¶
Parameter sequence_pos
- trigger_mode: Parameter = self.add_parameter( "trigger_mode", get_cmd="AWGControl:RMODe?", set_cmd="AWGControl:RMODe " + "{}", vals=vals.Enum("CONT", "TRIG", "SEQ", "GAT"), get_parser=self.newlinestripper, )¶
Parameter trigger_mode
- trigger_impedance: Parameter = self.add_parameter( "trigger_impedance", label="Trigger impedance", unit="Ohm", get_cmd="TRIGger:IMPedance?", set_cmd="TRIGger:IMPedance " + "{}", vals=vals.Enum(50, 1000), get_parser=float, )¶
Parameter trigger_impedance
- trigger_level: Parameter = self.add_parameter( "trigger_level", unit="V", label="Trigger level", get_cmd="TRIGger:LEVel?", set_cmd="TRIGger:LEVel " + "{:.3f}", vals=vals.Numbers(-5, 5), get_parser=float, )¶
Parameter trigger_level
- trigger_slope: Parameter = self.add_parameter( "trigger_slope", get_cmd="TRIGger:SLOPe?", set_cmd="TRIGger:SLOPe " + "{}", vals=vals.Enum("POS", "NEG"), get_parser=self.newlinestripper, )¶
Parameter trigger_slope
- trigger_source: Parameter = self.add_parameter( "trigger_source", get_cmd="TRIGger:SOURce?", set_cmd="TRIGger:SOURce " + "{}", vals=vals.Enum("INT", "EXT"), get_parser=self.newlinestripper, )¶
Parameter trigger_source
- event_polarity: Parameter = self.add_parameter( "event_polarity", get_cmd="EVENt:POL?", set_cmd="EVENt:POL " + "{}", vals=vals.Enum("POS", "NEG"), get_parser=self.newlinestripper, )¶
Parameter event_polarity
- event_impedance: Parameter = self.add_parameter( "event_impedance", label="Event impedance", unit="Ohm", get_cmd="EVENt:IMPedance?", set_cmd="EVENt:IMPedance " + "{}", vals=vals.Enum(50, 1000), get_parser=float, )¶
Parameter event_impedance
- event_level: Parameter = self.add_parameter( "event_level", label="Event level", unit="V", get_cmd="EVENt:LEVel?", set_cmd="EVENt:LEVel " + "{:.3f}", vals=vals.Numbers(-5, 5), get_parser=float, )¶
Parameter event_level
- event_jump_timing: Parameter = self.add_parameter( "event_jump_timing", get_cmd="EVENt:JTIMing?", set_cmd="EVENt:JTIMing {}", vals=vals.Enum("SYNC", "ASYNC"), get_parser=self.newlinestripper, )¶
Parameter event_jump_timing
- clock_freq: Parameter = self.add_parameter( "clock_freq", label="Clock frequency", unit="Hz", get_cmd="SOURce:FREQuency?", set_cmd="SOURce:FREQuency " + "{}", vals=vals.Numbers(1e6, 1.2e9), get_parser=float, )¶
Parameter clock_freq
- setup_filename: Parameter = self.add_parameter( "setup_filename", get_cmd="AWGControl:SNAMe?" )¶
Parameter setup_filename
- get_state() Literal['Idle', 'Waiting for trigger', 'Running'] [source]¶
This query returns the run state of the arbitrary waveform generator or the sequencer.
- Returns:
Either ‘Idle’, ‘Waiting for trigger’, or ‘Running’.
- Raises:
ValueError – if none of the three states above apply.
- run() str [source]¶
This command initiates the output of a waveform or a sequence. This is equivalent to pressing Run/Stop button on the front panel. The instrument can be put in the run state only when output waveforms are assigned to channels.
- Returns:
The output of self.get_state()
- force_trigger() None [source]¶
This command generates a trigger event. This is equivalent to pressing the Force Trigger button on front panel.
- get_folder_contents(print_contents: bool = True) str [source]¶
This query returns the current contents and state of the mass storage media (on the AWG Windows machine).
- Parameters:
print_contents – If True, the folder name and the query output are printed. Default: True.
- Returns:
A comma-seperated string of the folder contents.
- Return type:
- get_current_folder_name() str [source]¶
This query returns the current directory of the file system on the arbitrary waveform generator. The current directory for the programmatic interface is different from the currently selected directory in the Windows Explorer on the instrument.
- Returns:
A string with the full path of the current folder.
- set_current_folder_name(file_path: str) int [source]¶
Set the current directory of the file system on the arbitrary waveform generator. The current directory for the programmatic interface is different from the currently selected directory in the Windows Explorer on the instrument.
- Parameters:
file_path – The full path.
- Returns:
The number of bytes written to instrument
- goto_root() None [source]¶
Set the current directory of the file system on the arbitrary waveform generator to C: (the ‘root’ location in Windows).
- create_and_goto_dir(folder: str) str [source]¶
Set the current directory of the file system on the arbitrary waveform generator. Creates the directory if if doesn’t exist. Queries the resulting folder for its contents.
- Parameters:
folder – The path of the directory to set as current. Note: this function expects only root level directories.
- Returns:
A comma-seperated string of the folder contents.
- all_channels_on() None [source]¶
Set the state of all channels to be ON. Note: only channels with defined waveforms can be ON.
- force_trigger_event() None [source]¶
This command generates a trigger event. Equivalent to self.force_trigger.
- force_event() None [source]¶
This command generates a forced event. This is used to generate the event when the sequence is waiting for an event jump. This is equivalent to pressing the Force Event button on the front panel of the instrument.
- set_sqel_event_target_index(element_no: int, index: int) None [source]¶
This command sets the target index for the sequencer’s event jump operation. Note that this will take effect only when the event jump target type is set to INDEX.
- Parameters:
element_no – The sequence element number
index – The index to set the target to
- set_sqel_goto_target_index(element_no: int, goto_to_index_no: int) None [source]¶
This command sets the target index for the GOTO command of the sequencer. After generating the waveform specified in a sequence element, the sequencer jumps to the element specified as GOTO target. This is an unconditional jump. If GOTO target is not specified, the sequencer simply moves on to the next element. If the Loop Count is Infinite, the GOTO target which is specified in the element is not used. For this command to work, the goto state of the squencer must be ON and the sequence element must exist. Note that the first element of a sequence is taken to be 1 not 0.
- Parameters:
element_no – The sequence element number
goto_to_index_no – The target index number
- set_sqel_goto_state(element_no: int, goto_state: int) None [source]¶
This command sets the GOTO state of the sequencer for the specified sequence element.
- Parameters:
element_no – The sequence element number
goto_state – The GOTO state of the sequencer. Must be either 0 (OFF) or 1 (ON).
- set_sqel_loopcnt_to_inf(element_no: int, state: int = 1) None [source]¶
This command sets the infinite looping state for a sequence element. When an infinite loop is set on an element, the sequencer continuously executes that element. To break the infinite loop, issue self.stop()
- get_sqel_loopcnt(element_no: int = 1) str [source]¶
This query returns the loop count (number of repetitions) of a sequence element. Loop count setting for an element is ignored if the infinite looping state is set to ON.
- Parameters:
element_no – The sequence element number. Default: 1.
- set_sqel_loopcnt(loopcount: int, element_no: int = 1) None [source]¶
This command sets the loop count. Loop count setting for an element is ignored if the infinite looping state is set to ON.
- Parameters:
loopcount – The number of times the sequence is being output. The maximal possible number is 65536, beyond that: infinity.
element_no – The sequence element number. Default: 1.
- set_sqel_waveform(waveform_name: str, channel: int, element_no: int = 1) None [source]¶
This command sets the waveform for a sequence element on the specified channel.
- Parameters:
waveform_name – Name of the waveform. Must be in the waveform list (either User Defined or Predefined).
channel – The output channel (1-4)
element_no – The sequence element number. Default: 1.
- get_sqel_waveform(channel: int, element_no: int = 1) str [source]¶
This query returns the waveform for a sequence element on the specified channel.
- Parameters:
channel – The output channel (1-4)
element_no – The sequence element number. Default: 1.
- Returns:
The name of the waveform.
- set_sqel_trigger_wait(element_no: int, state: int = 1) str [source]¶
This command sets the wait trigger state for an element. Send a trigger signal in one of the following ways:
By using an external trigger signal.
By pressing the “Force Trigger” button on the front panel
By using self.force_trigger or self.force_trigger_event
- Parameters:
element_no – The sequence element number.
state – The wait trigger state. Must be either 0 (OFF) or 1 (ON). Default: 1.
- Returns:
The current state (after setting it).
- get_sqel_trigger_wait(element_no: int) str [source]¶
This query returns the wait trigger state for an element. Send a trigger signal in one of the following ways:
By using an external trigger signal.
By pressing the “Force Trigger” button on the front panel
By using self.force_trigger or self.force_trigger_event
- Parameters:
element_no – The sequence element number.
- Returns:
‘1’.
- Return type:
The current state. Example
- set_sqel_event_jump_target_index(element_no: int, jtar_index_no: int) None [source]¶
Duplicate of set_sqel_event_target_index
- set_sqel_event_jump_type(element_no: int, jtar_state: str) None [source]¶
This command sets the event jump target type for the jump for the specified sequence element. Generate an event in one of the following ways:
By connecting an external cable to instrument rear panel for external event.
By pressing the Force Event button on the front panel.
By using self.force_event
- Parameters:
element_no – The sequence element number
jtar_state – The jump target type. Must be either ‘INDEX’, ‘NEXT’, or ‘OFF’.
- get_sq_mode() str [source]¶
This query returns the type of the arbitrary waveform generator’s sequencer. The sequence is executed by the hardware sequencer whenever possible.
- Returns:
Either ‘HARD’ or ‘SOFT’ indicating that the instrument is in either hardware or software sequencer mode.
- Return type:
- generate_sequence_cfg() dict[str, float] [source]¶
This function is used to generate a config file, that is used when generating sequence files, from existing settings in the awg. Querying the AWG for these settings takes ~0.7 seconds
- generate_channel_cfg() dict[str, float | None] [source]¶
Function to query if the current channel settings that have been changed from their default value and put them in a dictionary that can easily be written into an awg file, so as to prevent said awg file from falling back to default values. (See
make_awg_file()
andAWG_FILE_FORMAT_CHANNEL()
) NOTE: This only works for settings changed via the corresponding QCoDeS parameter.- Returns:
A dict with the current setting for each entry in AWG_FILE_FORMAT_HEAD iff this entry applies to the AWG5014 AND has been changed from its default value.
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- static parse_marker_channel_name(name: str) _MarkerDescriptor [source]¶
returns from the channel index and marker index from a marker descriptor string e.g. ‘1M1’->(1,1)
- send_awg_file(filename: str, awg_file: bytes, verbose: bool = False) None [source]¶
Writes an .awg-file onto the disk of the AWG. Overwrites existing files.
- Parameters:
filename – The name that the file will get on the AWG.
awg_file – A byte sequence containing the awg_file. Usually the output of self.make_awg_file.
verbose – A boolean to allow/suppress printing of messages about the status of the filw writing. Default: False.
- load_awg_file(filename: str) None [source]¶
Loads an .awg-file from the disc of the AWG into the AWG memory. This may overwrite all instrument settings, the waveform list, and the sequence in the sequencer.
- Parameters:
filename – The filename of the .awg-file to load.
- make_awg_file(waveforms: Sequence[Sequence[ndarray]] | Sequence[ndarray], m1s: Sequence[Sequence[ndarray]] | Sequence[ndarray], m2s: Sequence[Sequence[ndarray]] | Sequence[ndarray], nreps: Sequence[int], trig_waits: Sequence[int], goto_states: Sequence[int], jump_tos: Sequence[int], channels: Sequence[int] | None = None, preservechannelsettings: bool = True) bytes [source]¶
- Parameters:
waveforms – A list of the waveforms to be packed. The list should be filled like so: [[wfm1ch1, wfm2ch1, …], [wfm1ch2, wfm2ch2], …] Each waveform should be a numpy array with values in the range -1 to 1 (inclusive). If you do not wish to send waveforms to channels 1 and 2, use the channels parameter.
m1s – A list of marker 1’s. The list should be filled like so: [[elem1m1ch1, elem2m1ch1, …], [elem1m1ch2, elem2m1ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
m2s – A list of marker 2’s. The list should be filled like so: [[elem1m2ch1, elem2m2ch1, …], [elem1m2ch2, elem2m2ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
nreps – List of integers specifying the no. of repetitions per sequence element. Allowed values: 0 to 65536. O corresponds to Infinite repetitions.
trig_waits – List of len(segments) of integers specifying the trigger wait state of each sequence element. Allowed values: 0 (OFF) or 1 (ON).
goto_states – List of len(segments) of integers specifying the goto state of each sequence element. Allowed values: 0 to 65536 (0 means next)
jump_tos – List of len(segments) of integers specifying the logic jump state for each sequence element. Allowed values: 0 (OFF) or 1 (ON).
channels (list) – List of channels to send the waveforms to. Example: [1, 3, 2]
preservechannelsettings (bool) – If True, the current channel settings are found from the parameter history and added to the .awg file. Else, channel settings are not written in the file and will be reset to factory default when the file is loaded. Default: True.
- make_send_and_load_awg_file(waveforms: Sequence[Sequence[ndarray]], m1s: Sequence[Sequence[ndarray]], m2s: Sequence[Sequence[ndarray]], nreps: Sequence[int], trig_waits: Sequence[int], goto_states: Sequence[int], jump_tos: Sequence[int], channels: Sequence[int] | None = None, filename: str = 'customawgfile.awg', preservechannelsettings: bool = True) None [source]¶
Makes an .awg-file, sends it to the AWG and loads it. The .awg-file is uploaded to C:\Users\OEM\Documents. The waveforms appear in the user defined waveform list with names wfm001ch1, wfm002ch1, …
- Parameters:
waveforms – A list of the waveforms to upload. The list should be filled like so: [[wfm1ch1, wfm2ch1, …], [wfm1ch2, wfm2ch2], …] Each waveform should be a numpy array with values in the range -1 to 1 (inclusive). If you do not wish to send waveforms to channels 1 and 2, use the channels parameter.
m1s – A list of marker 1’s. The list should be filled like so: [[elem1m1ch1, elem2m1ch1, …], [elem1m1ch2, elem2m1ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
m2s – A list of marker 2’s. The list should be filled like so: [[elem1m2ch1, elem2m2ch1, …], [elem1m2ch2, elem2m2ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
nreps – List of integers specifying the no. of repetions per sequence element. Allowed values: 0 to 65536. 0 corresponds to Infinite repetions.
trig_waits – List of len(segments) of integers specifying the trigger wait state of each sequence element. Allowed values: 0 (OFF) or 1 (ON).
goto_states – List of len(segments) of integers specifying the goto state of each sequence element. Allowed values: 0 to 65536 (0 means next)
jump_tos – List of len(segments) of integers specifying the logic jump state for each sequence element. Allowed values: 0 (OFF) or 1 (ON).
channels – List of channels to send the waveforms to. Example: [1, 3, 2]
filename – The name of the .awg-file. Should end with the .awg extension. Default: ‘customawgfile.awg’
preservechannelsettings – If True, the current channel settings are found from the parameter history and added to the .awg file. Else, channel settings are reset to the factory default values. Default: True.
- make_and_save_awg_file(waveforms: Sequence[Sequence[ndarray]], m1s: Sequence[Sequence[ndarray]], m2s: Sequence[Sequence[ndarray]], nreps: Sequence[int], trig_waits: Sequence[int], goto_states: Sequence[int], jump_tos: Sequence[int], channels: Sequence[int] | None = None, filename: str = 'customawgfile.awg', preservechannelsettings: bool = True) None [source]¶
Makes an .awg-file and saves it locally.
- Parameters:
waveforms – A list of the waveforms to upload. The list should be filled like so: [[wfm1ch1, wfm2ch1, …], [wfm1ch2, wfm2ch2], …] Each waveform should be a numpy array with values in the range -1 to 1 (inclusive). If you do not wish to send waveforms to channels 1 and 2, use the channels parameter.
m1s – A list of marker 1’s. The list should be filled like so: [[elem1m1ch1, elem2m1ch1, …], [elem1m1ch2, elem2m1ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
m2s – A list of marker 2’s. The list should be filled like so: [[elem1m2ch1, elem2m2ch1, …], [elem1m2ch2, elem2m2ch2], …] Each marker should be a numpy array containing only 0’s and 1’s
nreps – List of integers specifying the no. of repetions per sequence element. Allowed values: 0 to 65536. O corresponds to Infinite repetions.
trig_waits – List of len(segments) of integers specifying the trigger wait state of each sequence element. Allowed values: 0 (OFF) or 1 (ON).
goto_states – List of len(segments) of integers specifying the goto state of each sequence element. Allowed values: 0 to 65536 (0 means next)
jump_tos – List of len(segments) of integers specifying the logic jump state for each sequence element. Allowed values: 0 (OFF) or 1 (ON).
channels – List of channels to send the waveforms to. Example: [1, 3, 2]
preservechannelsettings – If True, the current channel settings are found from the parameter history and added to the .awg file. Else, channel settings are not written in the file and will be reset to factory default when the file is loaded. Default: True.
filename – The full path of the .awg-file. Should end with the .awg extension. Default: ‘customawgfile.awg’
- get_error() str [source]¶
This function retrieves and returns data from the error and event queues.
- Returns:
String containing the error/event number, the error/event description.
- delete_all_waveforms_from_list() None [source]¶
Delete all user-defined waveforms in the list in a single action. Note that there is no “UNDO” action once the waveforms are deleted. Use caution before issuing this command.
If the deleted waveform(s) is (are) currently loaded into waveform memory, it (they) is (are) unloaded. If the RUN state of the instrument is ON, the state is turned OFF. If the channel is on, it will be switched off.
- send_DC_pulse(DC_channel_number: int, set_level: float, length: float) None [source]¶
Sets the DC level on the specified channel, waits a while and then resets it to what it was before.
Note: Make sure that the output DC state is ON.
- class qcodes.instrument_drivers.tektronix.TektronixAWG5208(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
TektronixAWG70000Base
The QCoDeS driver for Tektronix AWG5208
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixAWG70000Base(name: str, address: str, num_channels: int, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
VisaInstrument
Base class for QCoDeS drivers for Tektronix AWG70000 series AWG’s.
The drivers for AWG70001A/AWG70001B and AWG70002A/AWG70002B should be subclasses of this general class.
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
num_channels – Number of channels on the AWG
**kwargs – kwargs are forwarded to base class.
Attributes:
The default terminator to use if the terminator is not specified when creating the instrument.
The default timeout in seconds if the timeout is not specified when creating the instrument.
Parameter current_directory
Parameter mode
Parameter sample_rate
Parameter clock_source
Parameter clock_external_frequency
Parameter run_state
Parameter all_output_off
Return the sequence list as a list of strings
Return the waveform list as a list of strings
Methods:
Force a trigger A event
Force a trigger B event
Waits for the latest issued overlapping command to finish
play
([wait_for_running, timeout])Run the AWG/Func.
stop
()Stop the output of the instrument.
delete_sequence_from_list
(seqname)Delete the specified sequence from the sequence list
Clear the sequence list
Clear the waveform list
makeWFMXFile
(data, amplitude)Compose a WFMX file
sendSEQXFile
(seqx, filename[, path])Send a binary seqx file to the AWG's memory
sendWFMXFile
(wfmx, filename[, path])Send a binary wfmx file to the AWG's memory
loadWFMXFile
(filename[, path])Loads a wfmx from memory into the waveform list Only loading from the C: drive is supported
loadSEQXFile
(filename[, path])Load a seqx file from instrument disk memory.
make_SEQX_from_forged_sequence
(seq, ...[, ...])Make a .seqx from a forged broadbean sequence.
makeSEQXFile
(trig_waits, nreps, event_jumps, ...)Make a full .seqx file (bundle) A .seqx file can presumably hold several sequences, but for now we support only packing a single sequence
- default_terminator: str | None = '\n'¶
The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- wait_for_operation_to_complete() None [source]¶
Waits for the latest issued overlapping command to finish
- play(wait_for_running: bool = True, timeout: float = 10) None [source]¶
Run the AWG/Func. Gen. This command is equivalent to pressing the play button on the front panel.
- Parameters:
wait_for_running – If True, this command is blocking while the instrument is getting ready to play
timeout – The maximal time to wait for the instrument to play. Raises an exception is this time is reached.
- stop() None [source]¶
Stop the output of the instrument. This command is equivalent to pressing the stop button on the front panel.
- delete_sequence_from_list(seqname: str) None [source]¶
Delete the specified sequence from the sequence list
- Parameters:
seqname – The name of the sequence (as it appears in the sequence list, not the file name) to delete
- static makeWFMXFile(data: ndarray, amplitude: float) bytes [source]¶
Compose a WFMX file
- Parameters:
data – A numpy array holding the data. Markers can be included.
amplitude – The peak-to-peak amplitude (V) assumed to be set on the channel that will play this waveform. This information is needed as the waveform must be rescaled to (-1, 1) where -1 will correspond to the channel’s min. voltage and 1 to the channel’s max. voltage.
- Returns:
The binary .wfmx file, ready to be sent to the instrument.
- sendSEQXFile(seqx: bytes, filename: str, path: str | None = None) None [source]¶
Send a binary seqx file to the AWG’s memory
- Parameters:
seqx – The binary seqx file, preferably the output of makeSEQXFile.
filename – The name of the file on the AWG disk, including the extension.
path – The path to the directory where the file should be saved. If omitted, seqxFileFolder will be used.
- sendWFMXFile(wfmx: bytes, filename: str, path: str | None = None) None [source]¶
Send a binary wfmx file to the AWG’s memory
- Parameters:
wfmx – The binary wfmx file, preferably the output of makeWFMXFile.
filename – The name of the file on the AWG disk, including the extension.
path – The path to the directory where the file should be saved. If omitted, seqxFileFolder will be used.
- loadWFMXFile(filename: str, path: str | None = None) None [source]¶
Loads a wfmx from memory into the waveform list Only loading from the C: drive is supported
- Parameters:
filename – Name of the file (with extension)
path – Path to load from. If omitted, the default path (self.wfmxFileFolder) is used.
- loadSEQXFile(filename: str, path: str | None = None) None [source]¶
Load a seqx file from instrument disk memory. All sequences in the file are loaded into the sequence list.
- Parameters:
filename – The name of the sequence file INCLUDING the extension
path – Path to load from. If omitted, the default path (self.seqxFileFolder) is used.
- static make_SEQX_from_forged_sequence(seq: Mapping[int, Mapping[Any, Any]], amplitudes: Sequence[float], seqname: str, channel_mapping: Mapping[str | int, int] | None = None) bytes [source]¶
Make a .seqx from a forged broadbean sequence. Supports subsequences.
- Parameters:
seq – The output of broadbean’s Sequence.forge()
amplitudes – A list of the AWG channels’ voltage amplitudes. The first entry is ch1 etc.
channel_mapping – A mapping from what the channel is called in the broadbean sequence to the integer describing the physical channel it should be assigned to.
seqname – The name that the sequence will have in the AWG’s sequence list. Used for loading the sequence.
- Returns:
- The binary .seqx file contents. Can be sent directly to the
instrument or saved on disk.
- static makeSEQXFile(trig_waits: Sequence[int], nreps: Sequence[int], event_jumps: Sequence[int], event_jump_to: Sequence[int], go_to: Sequence[int], wfms: Sequence[Sequence[np.ndarray]], amplitudes: Sequence[float], seqname: str, flags: Sequence[Sequence[Sequence[int]]] | None = None) bytes [source]¶
Make a full .seqx file (bundle) A .seqx file can presumably hold several sequences, but for now we support only packing a single sequence
For a single sequence, a .seqx file is a bundle of two files and two folders:
- /Sequences
sequence.sml
- /Waveforms
wfm1.wfmx wfm2.wfmx …
setup.xml userNotes.txt
- Parameters:
trig_waits – Wait for a trigger? If yes, you must specify the trigger input. 0 for off, 1 for ‘TrigA’, 2 for ‘TrigB’, 3 for ‘Internal’.
nreps – No. of repetitions. 0 corresponds to infinite.
event_jumps – Jump when event triggered? If yes, you must specify the trigger input. 0 for off, 1 for ‘TrigA’, 2 for ‘TrigB’, 3 for ‘Internal’.
event_jump_to – Jump target in case of event. 1-indexed, 0 means next. Must be specified for all elements.
go_to – Which element to play next. 1-indexed, 0 means next.
wfms – numpy arrays describing each waveform plus two markers, packed like np.array([wfm, m1, m2]). These numpy arrays are then again packed in lists according to: [[wfmch1pos1, wfmch1pos2, …], [wfmch2pos1, …], …]
amplitudes – The peak-to-peak amplitude in V of the channels, i.e. a list [ch1_amp, ch2_amp].
seqname – The name of the sequence. This name will appear in the sequence list. Note that all spaces are converted to ‘_’
flags – Flags for the auxiliary outputs. 0 for ‘No change’, 1 for ‘High’, 2 for ‘Low’, 3 for ‘Toggle’, or 4 for ‘Pulse’. 4 flags [A, B, C, D] for every channel in every element, packed like: [[ch1pos1, ch1pos2, …], [ch2pos1, …], …] If omitted, no flags will be set.
- Returns:
The binary .seqx file, ready to be sent to the instrument.
- class qcodes.instrument_drivers.tektronix.TektronixAWG70001A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
TektronixAWG70000Base
The QCoDeS driver for Tektronix AWG70001A series AWG’s.
All the actual driver meat is in the superclass AWG70000A.
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixAWG70001B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
TektronixAWG70000Base
The QCoDeS driver for Tektronix AWG70001B series AWG’s.
All the actual driver meat is in the superclass AWG70000A.
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixAWG70002A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
TektronixAWG70000Base
The QCoDeS driver for Tektronix AWG70002A series AWG’s.
All the actual driver meat is in the superclass AWG70000A.
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
timeout – The VISA timeout time (in seconds).
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixAWG70002B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
TektronixAWG70000Base
The QCoDeS driver for Tektronix AWG70002B series AWG’s.
All the actual driver meat is in the superclass AWG70000A.
- Parameters:
name – The name used internally by QCoDeS in the DataSet
address – The VISA resource name of the instrument
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
- default_timeout: float | None = 10¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- current_directory: Parameter = self.add_parameter( "current_directory", label="Current file system directory", set_cmd='MMEMory:CDIRectory "{}"', get_cmd="MMEMory:CDIRectory?", vals=vals.Strings(), )¶
Parameter current_directory
- mode: Parameter = self.add_parameter( "mode", label="Instrument operation mode", set_cmd="INSTrument:MODE {}", get_cmd="INSTrument:MODE?", vals=vals.Enum("AWG", "FGEN"), )¶
Parameter mode
- sample_rate: Parameter = self.add_parameter( "sample_rate", label="Clock sample rate", set_cmd="CLOCk:SRATe {}", get_cmd="CLOCk:SRATe?", unit="Sa/s", get_parser=float, vals=SRValidator(self), )¶
Parameter sample_rate
- clock_source: Parameter = self.add_parameter( "clock_source", label="Clock source", set_cmd="CLOCk:SOURce {}", get_cmd="CLOCk:SOURce?", val_mapping={ "Internal": "INT", "Internal, 10 MHZ ref.": "EFIX", "Internal, variable ref.": "EVAR", "External": "EXT", }, )¶
Parameter clock_source
- clock_external_frequency: Parameter = self.add_parameter( "clock_external_frequency", label="External clock frequency", set_cmd="CLOCk:ECLock:FREQuency {}", get_cmd="CLOCk:ECLock:FREQuency?", get_parser=float, unit="Hz", vals=vals.Numbers(6.25e9, 12.5e9), )¶
Parameter clock_external_frequency
- run_state: Parameter = self.add_parameter( "run_state", label="Run state", get_cmd="AWGControl:RSTATe?", val_mapping={"Stopped": "0", "Waiting for trigger": "1", "Running": "2"}, )¶
Parameter run_state
- all_output_off: Parameter = self.add_parameter( "all_output_off", label="All Output Off", get_cmd="OUTPut:OFF?", set_cmd="OUTPut:OFF {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter all_output_off
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDPO5000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix DPO5000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixDPO7000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix DPO7000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixDPO70000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix DPO70000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixDPOChannel(parent: Instrument | InstrumentChannel, name: str, channel_number: int, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
The main channel module for the oscilloscope. The parameters defined here reflect the waveforms as they are displayed on the instrument display.
Attributes:
Parameter scale
Parameter offset
Parameter position
Parameter termination
Parameter analog_to_digital_threshold
Parameter termination_voltage
Methods:
set_trace_length
(value)Set the trace length when retrieving data through the 'waveform' interface
set_trace_time
(value)- scale: Parameter = self.add_parameter( "scale", get_cmd=f"{self._identifier}:SCA?", set_cmd=f"{self._identifier}:SCA {{}}", get_parser=float, unit="V/div", )¶
Parameter scale
- offset: Parameter = self.add_parameter( "offset", get_cmd=f"{self._identifier}:OFFS?", set_cmd=f"{self._identifier}:OFFS {{}}", get_parser=float, unit="V", )¶
Parameter offset
- position: Parameter = self.add_parameter( "position", get_cmd=f"{self._identifier}:POS?", set_cmd=f"{self._identifier}:POS {{}}", get_parser=float, unit="V", )¶
Parameter position
- termination: Parameter = self.add_parameter( "termination", get_cmd=f"{self._identifier}:TER?", set_cmd=f"{self._identifier}:TER {{}}", vals=Enum(50, 1e6), get_parser=float, unit="Ohm", )¶
Parameter termination
- analog_to_digital_threshold: Parameter = self.add_parameter( "analog_to_digital_threshold", get_cmd=f"{self._identifier}:THRESH?", set_cmd=f"{self._identifier}:THRESH {{}}", get_parser=float, unit="V", )¶
Parameter analog_to_digital_threshold
- termination_voltage: Parameter = self.add_parameter( "termination_voltage", get_cmd=f"{self._identifier}:VTERm:BIAS?", set_cmd=f"{self._identifier}:VTERm:BIAS {{}}", get_parser=float, unit="V", )¶
Parameter termination_voltage
- set_trace_length(value: int) None [source]¶
Set the trace length when retrieving data through the ‘waveform’ interface
- Parameters:
value – The requested number of samples in the trace
- set_trace_time(value: float) None [source]¶
- Parameters:
value – The time over which a trace is desired.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDPOData(parent: InstrumentBase, name: str, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
This submodule sets and retrieves information regarding the data source for the “CURVE?” query, which is used when retrieving waveform data.
Attributes:
Parameter start_index
Parameter stop_index
Parameter source
Parameter encoding
- start_index: Parameter = self.add_parameter( "start_index", get_cmd="DATa:STARt?", set_cmd="DATa:STARt {}", get_parser=int, )¶
Parameter start_index
- stop_index: Parameter = self.add_parameter( "stop_index", get_cmd="DATa:STOP?", set_cmd="DATa:STOP {}", get_parser=int )¶
Parameter stop_index
- source: Parameter = self.add_parameter( "source", get_cmd="DATa:SOU?", set_cmd="DATa:SOU {}", vals=Enum(*TektronixDPOWaveform.valid_identifiers), )¶
Parameter source
- encoding: Parameter = self.add_parameter( "encoding", get_cmd="DATa:ENCdg?", set_cmd="DATa:ENCdg {}", get_parser=strip_quotes, vals=Enum( "ASCIi", "FAStest", "RIBinary", "RPBinary", "FPBinary", "SRIbinary", "SRPbinary", "SFPbinary", ), docstring=textwrap.dedent( """ For a detailed explanation of the set arguments, please consult the programmers manual at page 263/264. http://download.tek.com/manual/077001022.pdf """ ), )¶
Parameter encoding
For a detailed explanation of the set arguments, please consult the programmers manual at page 263/264.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDPOHorizontal(parent: Instrument | InstrumentChannel, name: str, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
This module controls the horizontal axis of the scope
Attributes:
Auto mode attempts to keep record length constant as you change the time per division setting.
Parameter unit
Parameter record_length
Parameter sample_rate
Parameter scale
The horizontal position relative to a received trigger.
Use Roll Mode when you want to view data at very slow sweep speeds.
- mode: Parameter = self.add_parameter( "mode", get_cmd="HORizontal:MODE?", set_cmd="HORizontal:MODE {}", vals=Enum("auto", "constant", "manual"), get_parser=str.lower, docstring=""" Auto mode attempts to keep record length constant as you change the time per division setting. Record length is read only. Constant mode attempts to keep sample rate constant as you change the time per division setting. Record length is read only. Manual mode lets you change sample mode and record length. Time per division or Horizontal scale is read only. """, )¶
Auto mode attempts to keep record length constant as you change the time per division setting. Record length is read only.
Constant mode attempts to keep sample rate constant as you change the time per division setting. Record length is read only.
Manual mode lets you change sample mode and record length. Time per division or Horizontal scale is read only.
- unit: Parameter = self.add_parameter( "unit", get_cmd="HORizontal:MAIn:UNIts?", get_parser=strip_quotes )¶
Parameter unit
- record_length: Parameter = self.add_parameter( "record_length", get_cmd="HORizontal:MODE:RECOrdlength?", set_cmd=self._set_record_length, get_parser=float, )¶
Parameter record_length
- sample_rate: Parameter = self.add_parameter( "sample_rate", get_cmd="HORizontal:MODE:SAMPLERate?", set_cmd="HORizontal:MODE:SAMPLERate {}", get_parser=float, unit=f"sample/{self.unit()}", )¶
Parameter sample_rate
- scale: Parameter = self.add_parameter( "scale", get_cmd="HORizontal:MODE:SCAle?", set_cmd=self._set_scale, get_parser=float, unit=f"{self.unit()}/div", )¶
Parameter scale
- position: Parameter = self.add_parameter( "position", get_cmd="HORizontal:POSition?", set_cmd="HORizontal:POSition {}", get_parser=float, unit="%", docstring=textwrap.dedent( """ The horizontal position relative to a received trigger. E.g. a value of '10' sets the trigger position of the waveform such that 10% of the display is to the left of the trigger position. """ ), )¶
The horizontal position relative to a received trigger. E.g. a value of ‘10’ sets the trigger position of the waveform such that 10% of the display is to the left of the trigger position.
- roll: Parameter = self.add_parameter( "roll", get_cmd="HORizontal:ROLL?", set_cmd="HORizontal:ROLL {}", vals=Enum("Auto", "On", "Off"), docstring=textwrap.dedent( """ Use Roll Mode when you want to view data at very slow sweep speeds. """ ), )¶
Use Roll Mode when you want to view data at very slow sweep speeds.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDPOMeasurement(parent: Instrument, name: str, measurement_number: int, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
The measurement submodule
Attributes:
Parameter state
Parameter type
Methods:
Wait until the minimum time after adjusting the measurement source or type has elapsed
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- measurements: ClassVar[list[tuple[str, str]]] = [('amplitude', 'V'), ('area', 'Vs'), ('burst', 's'), ('carea', 'Vs'), ('cmean', 'V'), ('crms', 'V'), ('delay', 's'), ('distduty', '%'), ('extinctdb', 'dB'), ('extinctpct', '%'), ('extinctratio', ''), ('eyeheight', 'V'), ('eyewidth', 's'), ('fall', 's'), ('frequency', 'Hz'), ('high', 'V'), ('hits', 'hits'), ('low', 'V'), ('maximum', 'V'), ('mean', 'V'), ('median', 'V'), ('minimum', 'V'), ('ncross', 's'), ('nduty', '%'), ('novershoot', '%'), ('nwidth', 's'), ('pbase', 'V'), ('pcross', 's'), ('pctcross', '%'), ('pduty', '%'), ('peakhits', 'hits'), ('period', 's'), ('phase', '°'), ('pk2pk', 'V'), ('pkpkjitter', 's'), ('pkpknoise', 'V'), ('povershoot', '%'), ('ptop', 'V'), ('pwidth', 's'), ('qfactor', ''), ('rise', 's'), ('rms', 'V'), ('rmsjitter', 's'), ('rmsnoise', 'V'), ('sigma1', '%'), ('sigma2', '%'), ('sigma3', '%'), ('sixsigmajit', 's'), ('snratio', ''), ('stddev', 'V'), ('undefined', ''), ('waveforms', 'wfms')]¶
- state: Parameter = self.add_parameter( "state", get_cmd=f"MEASUrement:MEAS{self._measurement_number}:STATe?", set_cmd=f"MEASUrement:MEAS{self._measurement_number}:STATe {{}}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )¶
Parameter state
- type: Parameter = self.add_parameter( "type", get_cmd=f"MEASUrement:MEAS{self._measurement_number}:TYPe?", set_cmd=self._set_measurement_type, get_parser=str.lower, vals=Enum(*(m[0] for m in self.measurements)), docstring=textwrap.dedent( "Please see page 566-569 of the programmers manual " "for a detailed description of these arguments. " "http://download.tek.com/manual/077001022.pdf" ), )¶
Parameter type
- class qcodes.instrument_drivers.tektronix.TektronixDPOMeasurementParameter(name: str, instrument: InstrumentBase | None = None, label: str | None = None, unit: str | None = None, get_cmd: str | Callable[..., Any] | Literal[False] | None = None, set_cmd: str | Callable[..., Any] | Literal[False] | None = False, initial_value: float | str | None = None, max_val_age: float | None = None, vals: Validator[Any] | None = None, docstring: str | None = None, initial_cache_value: float | str | None = None, bind_to_instrument: bool = True, **kwargs: Any)[source]¶
Bases:
Parameter
A measurement parameter does not only return the instantaneous value of a measurement, but can also return some statistics. The accumulation time over which these statistics are gathered can be controlled through the ‘time_constant’ parameter on the submodule ‘TektronixDPOMeasurementStatistics’. Here we also find the method ‘reset’ to reset the values over which the statistics are gathered.
Methods:
mean
()max
()min
()stdev
()get_raw
()get_raw
is called to perform the actual data acquisition from the instrument.set_raw
(value)set_raw
is called to perform the actual setting of a parameter on the instrument.- get_raw() float [source]¶
get_raw
is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.
- set_raw(value: Any) None [source]¶
set_raw
is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively forParameter
a suitable method is automatically generated ifset_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aset
method on the parameter instance.
- class qcodes.instrument_drivers.tektronix.TektronixDPOMeasurementStatistics(parent: InstrumentBase, name: str, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
Attributes:
Parameter mode
Parameter time_constant
Methods:
reset
()- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- mode: Parameter = self.add_parameter( "mode", get_cmd="MEASUrement:STATIstics:MODe?", set_cmd="MEASUrement:STATIstics:MODe {}", vals=Enum("OFF", "ALL", "VALUEMean", "MINMax", "MEANSTDdev"), docstring=textwrap.dedent( "This command controls the operation and display of measurement " "statistics. " "1. OFF turns off all measurements. This is the default value " "2. ALL turns on statistics and displays all statistics for " "each measurement. " "3. VALUEMean turns on statistics and displays the value and the " "mean (μ) of each measurement. " "4. MINMax turns on statistics and displays the min and max of " "each measurement. " "5. MEANSTDdev turns on statistics and displays the mean and " "standard deviation of each measurement." ), )¶
Parameter mode
- time_constant: Parameter = self.add_parameter( "time_constant", get_cmd="MEASUrement:STATIstics:WEIghting?", set_cmd="MEASUrement:STATIstics:WEIghting {}", get_parser=int, docstring=textwrap.dedent( "This command sets or queries the time constant for mean and " "standard deviation statistical accumulations, which is equivalent " "to selecting Measurement Setup from the Measure menu, clicking " "the Statistics button and entering the desired Weight n= value." ), )¶
Parameter time_constant
- exception qcodes.instrument_drivers.tektronix.TektronixDPOModeError[source]¶
Bases:
Exception
Raise this exception if we are in a wrong mode to perform an action
- class qcodes.instrument_drivers.tektronix.TektronixDPOTrigger(parent: Instrument, name: str, delayed_trigger: bool = False, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
Submodule for trigger setup.
You can trigger with the A (Main) trigger system alone or combine the A (Main) trigger with the B (Delayed) trigger to trigger on sequential events. When using sequential triggering, the A trigger event arms the trigger system, and the B trigger event triggers the instrument when the B trigger conditions are met.
A and B triggers can (and typically do) have separate sources. The B trigger condition is based on a time delay or a specified number of events.
See page75, Using A (Main) and B (Delayed) triggers. https://download.tek.com/manual/MSO70000C-DX-DPO70000C-DX-MSO-DPO7000C-MSO-DPO5000B-Oscilloscope-Quick-Start-User-Manual-071298006.pdf
Attributes:
Parameter type
Parameter edge_coupling
Parameter edge_slope
Parameter source
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- type: Parameter = self.add_parameter( "type", get_cmd=f"TRIGger:{self._identifier}:TYPE?", set_cmd=self._trigger_type, vals=Enum(*trigger_types), get_parser=str.lower, )¶
Parameter type
- edge_coupling: Parameter = self.add_parameter( "edge_coupling", get_cmd=f"TRIGger:{self._identifier}:EDGE:COUPling?", set_cmd=f"TRIGger:{self._identifier}:EDGE:COUPling {{}}", vals=Enum(*edge_couplings), get_parser=str.lower, )¶
Parameter edge_coupling
- class qcodes.instrument_drivers.tektronix.TektronixDPOWaveform(parent: InstrumentBase, name: str, identifier: str, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
This submodule retrieves data from waveform sources, e.g. channels.
Attributes:
Raw acquisition values range from min to max.
Parameter x_unit
Parameter x_increment
Parameter y_unit
Parameter offset
Parameter scale
Parameter length
Parameter trace_axis
Parameter trace
- valid_identifiers: ClassVar[list[str]] = ['CH1', 'CH2', 'CH3', 'CH4', 'MATH1', 'MATH2', 'MATH3', 'MATH4', 'REF1', 'REF2', 'REF3', 'REF4']¶
- raw_data_offset: Parameter = self.add_parameter( "raw_data_offset", get_cmd=self._get_cmd("WFMOutPRE:YOFF?"), get_parser=float, docstring=textwrap.dedent( """ Raw acquisition values range from min to max. For instance, for unsigned binary values of one byte, min=0 and max=255. The data offset specifies the center of this range """ ), )¶
Raw acquisition values range from min to max. For instance, for unsigned binary values of one byte, min=0 and max=255. The data offset specifies the center of this range
- x_unit: Parameter = self.add_parameter( "x_unit", get_cmd=self._get_cmd("WFMOutpre:XUNit?"), get_parser=strip_quotes )¶
Parameter x_unit
- x_increment: Parameter = self.add_parameter( "x_increment", get_cmd=self._get_cmd("WFMOutPRE:XINCR?"), unit=self.x_unit(), get_parser=float, )¶
Parameter x_increment
- y_unit: Parameter = self.add_parameter( "y_unit", get_cmd=self._get_cmd("WFMOutpre:YUNit?"), get_parser=strip_quotes )¶
Parameter y_unit
- offset: Parameter = self.add_parameter( "offset", get_cmd=self._get_cmd("WFMOutPRE:YZERO?"), get_parser=float, unit=self.y_unit(), )¶
Parameter offset
- scale: Parameter = self.add_parameter( "scale", get_cmd=self._get_cmd("WFMOutPRE:YMULT?"), get_parser=float, unit=self.y_unit(), )¶
Parameter scale
- length: Parameter = self.add_parameter( "length", get_cmd=self._get_cmd("WFMOutpre:NR_Pt?"), get_parser=int )¶
Parameter length
- trace_axis: Parameter = self.add_parameter( "trace_axis", label=hor_label, get_cmd=self._get_trace_setpoints, vals=Arrays(shape=(self.length,)), unit=hor_unit, )¶
Parameter trace_axis
- trace: ParameterWithSetpoints = self.add_parameter( "trace", label=ver_label, get_cmd=self._get_trace_data, vals=Arrays(shape=(self.length,)), unit=ver_unit, setpoints=(self.trace_axis,), parameter_class=ParameterWithSetpoints, )¶
Parameter trace
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDPOWaveformFormat(parent: InstrumentBase, name: str, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
With this sub module we can query waveform formatting data. Please note that parameters defined in this submodule effects all waveform sources, whereas parameters defined in the submodule ‘TekronixDPOWaveform’ apply to specific waveform sources (e.g. channel1 or math2)
Attributes:
Parameter data_format
Parameter is_big_endian
Parameter bytes_per_sample
Parameter is_binary
- data_format: Parameter = self.add_parameter( "data_format", get_cmd="WFMOutpre:BN_Fmt?", set_cmd="WFMOutpre:BN_Fmt {}", val_mapping={ "signed_integer": "RI", "unsigned_integer": "RP", "floating_point": "FP", }, )¶
Parameter data_format
- is_big_endian: Parameter = self.add_parameter( "is_big_endian", get_cmd="WFMOutpre:BYT_Or?", set_cmd="WFMOutpre:BYT_Or {}", val_mapping={False: "LSB", True: "MSB"}, )¶
Parameter is_big_endian
- bytes_per_sample: Parameter = self.add_parameter( "bytes_per_sample", get_cmd="WFMOutpre:BYT_Nr?", set_cmd="WFMOutpre:BYT_Nr {}", get_parser=int, vals=Enum(1, 2, 4, 8), )¶
Parameter bytes_per_sample
- is_binary: Parameter = self.add_parameter( "is_binary", get_cmd="WFMOutpre:ENCdg?", set_cmd="WFMOutpre:ENCdg {}", val_mapping={True: "BINARY", False: "ASCII"}, )¶
Parameter is_binary
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.tektronix.TektronixDSA70000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix DSA70000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixMSO5000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix MSO5000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixMSO70000(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
TektronixDPO7000xx
QCoDeS driver for Tektronix MSO70000 Digital Oscilloscopes
- class qcodes.instrument_drivers.tektronix.TektronixTPS2012(name: str, address: str, **kwargs: Unpack)[source]¶
Bases:
VisaInstrument
This is the QCoDeS driver for the Tektronix 2012B oscilloscope.
Initialises the TPS2012.
- Parameters:
name – Name of the instrument used by QCoDeS
address – Instrument address as used by VISA
**kwargs – kwargs are forwarded to base class.
Attributes:
The default timeout in seconds if the timeout is not specified when creating the instrument.
Parameter trigger_type
Parameter trigger_source
Parameter trigger_edge_slope
Parameter trigger_level
Parameter data_source
Parameter horizontal_scale
Methods:
clear_message_queue
([verbose])Function to clear up (flush) the VISA message queue of the AWG instrument.
- default_timeout: float | None = 20¶
The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.
- trigger_type: Parameter = self.add_parameter( "trigger_type", label="Type of the trigger", get_cmd="TRIGger:MAIn:TYPe?", set_cmd="TRIGger:MAIn:TYPe {}", vals=vals.Enum("EDGE", "VIDEO", "PULSE"), )¶
Parameter trigger_type
- trigger_source: Parameter = self.add_parameter( "trigger_source", label="Source for the trigger", get_cmd="TRIGger:MAIn:EDGE:SOURce?", set_cmd="TRIGger:MAIn:EDGE:SOURce {}", vals=vals.Enum("CH1", "CH2"), )¶
Parameter trigger_source
- trigger_edge_slope: Parameter = self.add_parameter( "trigger_edge_slope", label="Slope for edge trigger", get_cmd="TRIGger:MAIn:EDGE:SLOpe?", set_cmd="TRIGger:MAIn:EDGE:SLOpe {}", vals=vals.Enum("FALL", "RISE"), )¶
Parameter trigger_edge_slope
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- trigger_level: Parameter = self.add_parameter( "trigger_level", label="Trigger level", unit="V", get_cmd="TRIGger:MAIn:LEVel?", set_cmd="TRIGger:MAIn:LEVel {}", vals=vals.Numbers(), )¶
Parameter trigger_level
- data_source: Parameter = self.add_parameter( "data_source", label="Data source", get_cmd="DATa:SOUrce?", set_cmd="DATa:SOURce {}", vals=vals.Enum("CH1", "CH2"), )¶
Parameter data_source
- horizontal_scale: Parameter = self.add_parameter( "horizontal_scale", label="Horizontal scale", unit="s", get_cmd="HORizontal:SCAle?", set_cmd=self._set_timescale, get_parser=float, vals=vals.Enum( 5e-9, 10e-9, 25e-9, 50e-9, 100e-9, 250e-9, 500e-9, 1e-6, 2.5e-6, 5e-6, 10e-6, 25e-6, 50e-6, 100e-6, 250e-6, 500e-6, 1e-3, 2.5e-3, 5e-3, 10e-3, 25e-3, 50e-3, 100e-3, 250e-3, 500e-3, 1, 2.5, 5, 10, 25, 50, ), )¶
Parameter horizontal_scale
- class qcodes.instrument_drivers.tektronix.TektronixTPS2012Channel(parent: TektronixTPS2012, name: str, channel: int, **kwargs: Unpack)[source]¶
Bases:
InstrumentChannel
Attributes:
Parameter scale
Parameter position
Parameter curvedata
Parameter state
- scale: Parameter = self.add_parameter( "scale", label=f"Channel {channel} Scale", unit="V/div", get_cmd=f"CH{channel}:SCAle?", set_cmd="CH{}:SCAle {}".format(channel, "{}"), get_parser=float, )¶
Parameter scale
- position: Parameter = self.add_parameter( "position", label=f"Channel {channel} Position", unit="div", get_cmd=f"CH{channel}:POSition?", set_cmd="CH{}:POSition {}".format(channel, "{}"), get_parser=float, )¶
Parameter position
- curvedata: ScopeArray = self.add_parameter( "curvedata", channel=channel, parameter_class=ScopeArray, )¶
Parameter curvedata
- state: Parameter = self.add_parameter( "state", label=f"Channel {channel} display state", set_cmd="SELect:CH{} {}".format(channel, "{}"), get_cmd=partial(self._get_state, channel), val_mapping={"ON": 1, "OFF": 0}, vals=vals.Enum("ON", "OFF"), )¶
Parameter state
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶