pyepr.hardware.ETH_awg.ETH_awg_interface

class pyepr.hardware.ETH_awg.ETH_awg_interface(config_file, awg_freq=1.5, dig_rate=2)[source]

Bases: pyepr.hardware.BaseInterfaceClass.Interface

Represents the interface for connecting to Andrin Doll style spectrometers.

An interface for connecting to a Andrin Doll style spectrometer, commonly in use at ETH Zürich.

Parameters:
awg_freqfloat

The normal operating AWG frequency. Sequence.freq = AWG.LO + AWG.awg_freq

dig_ratefloat

The speed of the digitser in GSa/s

Parameters:

config_file (dict)

Attributes

spec_config[source]
bridge_config[source]
IF_freq[source]
dig_rate[source]
pulses[source]
cur_exp = None[source]
bg_data = None[source]
bg_thread = None[source]
IFgain_options[source]
IFgain = 2[source]
filter[source]
property savefolder[source]

Inherited from Interface: config, savename, resonator, AWG

Methods

connect(session=None)[source]

Connect to a running matlab session. If more than one session has been started this will choose the first one. It is recomended that only one session is open at one time, or that the engine is started with a known name.

Parameters:
sessionstr, optional

The string denoting a specific session to connect to , by default None

acquire_dataset(verbosity=0, **kwargs)[source]

Acquires the dataset.

acquire_dataset_from_matlab(verbosity=0, **kwargs)[source]

Acquire and return the current or most recent dataset.

Returns:
dict

The dataset

get_buffer(verbosity=0, **kwargs)[source]
read_dataset(verbosity=0, savenow=False, **kwargs)[source]
launch(sequence, savename, IFgain=None, *args, **kwargs)[source]

Launches the experiment and initialises autosaving.

Parameters:
sequenceSequence

The sequence to be launched

savenamestr

The savename for this measurement. A timestamp will be added to the value.

Parameters:
launch_withIFGain(sequence, savename, IFgain=0)[source]

Launch a sequence on the spectrometer.

Parameters:
sequenceSequence

The pulse sequence to launched.

savenamestr

The save name for the file.

IFgainint

The IF gain, either [0,1,2], default 0.

Parameters:
  • savename (str)

  • IFgain (int)

launch_normal(sequence, savename, IFgain=0, reset_cur_exp=True)[source]
Parameters:
  • savename (str)

  • IFgain (int)

launch_long(sequence, savename, IFgain=0, axID=-1)[source]

Launch a sequence on the spectrometer that is too long for a single file. This is to get around the issues with the sequence table by running a background loop that takes control.

current issues: - uses some bruker tools functions - only works for a single averages - creates many extra files

Parameters:
sequenceSequence

The pulse sequence to launched.

savenamestr

The save name for the file.

IFgainint

The IF gain, either [0,1,2], default 0.

Parameters:
  • savename (str)

  • IFgain (int)

isrunning()[source]
Return type:

bool

tune_rectpulse(*, tp, freq, B, reptime, shots=400, step=0.02, dim=45, **kwargs)[source]

Generates a rectangular pi and pi/2 pulse of the given length at the given field position. This value is stored in the pulse cache.

Parameters:
tpfloat

$pi/2$ Pulse length in ns

freqfloat

Central frequency of this pulse in GHz

Bfloat

Magnetic B0 field position in Gauss

reptime: float

Shot repetion time in us.

shots: int

The number of shots

step: float

The step size for the amplitude tuning, default 0.02

dim: int

The dimension of the amplitude axis, default 45

Returns:
p90: RectPulse

A tuned rectangular pi/2 pulse of length tp

p180: RectPulse

A tuned rectangular pi pulse of length 2*tp

tune_pulse(pulse, mode, freq, B, reptime, shots=400, step=0.02, dim=45, **kwargs)[source]

Tunes a single pulse a range of methods.

Parameters:
pulsePulse

The Pulse object in need of tuning.

modestr

The method to be used.

freqfloat

The local oscilator frequency in GHz

Bfloat

Magnetic B0 field position in Gauss

reptimeus

Shot repetion time in us.

shots: int

The number of shots

step: float

The step size for the amplitude tuning, default 0.02

dim: int

The dimension of the amplitude axis, default 45

Returns:
Tunned Pulse: Pulse

The returned pulse object that is now tunned.

tune(*, sequence=None, mode='amp_hahn', freq=None, gyro=None)[source]
terminate()[source]

Stops the current experiment