nanotune.drivers.dac_interface

class nanotune.drivers.dac_interface.RelayState(value)[source]

Bases: Enum

Possible relay states of a DAC channel.

ground = 0
smc = 1
bus = 2
floating = 3
class nanotune.drivers.dac_interface.DACChannelInterface(parent, name, channel_id)[source]

Bases: InstrumentChannel, ABC

A DAC channel interface. By inheriting from this class and implementing all abstract methods, the user specifies how the DAC and its channels are set or gotten. It allows to keep the rest of nanotune independent of the instruments used.

Properties:

channel_id: The number of the channel on the DAC instrument. supports_hardware_ramp: whether the channel’s voltage can be ramped by using a hardware ramp.

property channel_id: int

The channel number. E.g. for dac.ch04, channel_id = 4.

abstract property supports_hardware_ramp: bool

Should indicate whether the channel’s voltage can be ramped by using a hardware ramp.

abstract set_voltage(new_voltage: float) None[source]

The channel’s voltage setting method.

abstract get_voltage() float[source]

The channel’s voltage getting method.

abstract set_voltage_limit(new_limits: Tuple[float, float]) None[source]

Sets the safe min and max voltages of the channel.

abstract get_voltage_limit() Tuple[float, float][source]

Gets the safe min and max voltages of the channel.

abstract get_voltage_step() float[source]

Gets the step attribute of the voltage parameter.

abstract set_voltage_step(new_step: float) None[source]

Sets the step attribute of the voltage parameter.

abstract get_frequency() float[source]

Gets the channel’s frequency if the DAC supports AWG functionalities.

abstract set_frequency(value: float) None[source]

Sets the channel’s frequency if the DAC supports AWG functionalities.

abstract get_offset() float[source]

Gets the channel’s waveform offset if the DAC supports AWG functionalities.

abstract set_offset(value: float)[source]

Sets the channel’s waveform offset if the DAC supports AWG functionalities.

abstract get_amplitude() float[source]

Gets the channel’s waveform amplitude if the DAC supports AWG functionalities.

abstract set_amplitude(value: float)[source]

Sets the channel’s waveform amplitude if the DAC supports AWG functionalities.

abstract get_relay_state() RelayState[source]

Gets’s the channel’s relay state. E.g. float, or grounded.

abstract set_relay_state(new_state: RelayState)[source]

Sets’s the channel’s relay state. E.g. float, or grounded.

abstract ramp_voltage(target_voltage: float, ramp_rate: Optional[float] = None)[source]

Ramps the channel’s voltage to a target voltage at either a specified ramp rate or for example self.get_ramp_rate().

abstract set_ramp_rate(value: float)[source]

Sets the channel’s voltage ramp rate.

abstract get_ramp_rate() float[source]

Get channel’s voltage ramp rate

abstract get_waveform() str[source]

Get channel’s waveform if AWG functionalities are supported.

abstract set_waveform(waveform: str)[source]

Set channel’s waveform if AWG functionalities are supported.

class nanotune.drivers.dac_interface.DACInterface(name, DACChannelClass: Type[DACChannelInterface])[source]

Bases: Instrument

Interface for a DAC instrument defining the name of its channel list and how each individual channel is called. Its subclass should be used in measurements.

abstract run()[source]

Starts waveforms if AWG functionalities are supported.

abstract sync()[source]

Syncs the instrument.