pyepr.hardware.ETH_awg.ETH_awg_interface

class pyepr.hardware.ETH_awg.ETH_awg_interface(awg_freq=1.5, dig_rate=2)

Bases: pyepr.classes.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.LO = AWG.LO + AWG.awg_freq

dig_ratefloat

The speed of the digitser in GSa/s

awg_freq
dig_rate
pulses
cur_exp = None
bg_data = None
bg_thread = None
IFgain_options
IFgain = 2
property savefolder
connect(session=None)

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)

Acquires the dataset.

acquire_dataset_from_matlab(verbosity=0, **kwargs)

Acquire and return the current or most recent dataset.

Returns:
dict

The dataset

launch(sequence, savename, IFgain=None, *args, **kwargs)

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)

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)
Parameters:
  • savename (str)

  • IFgain (int)

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

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()
Return type:

bool

tune_rectpulse(*, tp, LO, B, reptime, shots=400)

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

Pulse length of pi/2 pulse in ns

LOfloat

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

Returns:
p90: RectPulse

A tuned rectangular pi/2 pulse of length tp

p180: RectPulse

A tuned rectangular pi pulse of length tp

tune_pulse(pulse, mode, LO, B, reptime, shots=400)

Tunes a single pulse a range of methods.

Parameters:
pulsePulse

The Pulse object in need of tuning.

modestr

The method to be used.

LOfloat

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

Returns:
Tunned Pulse: Pulse

The returned pulse object that is now tunned.

tune(*, sequence=None, mode='amp_hahn', LO=None, gyro=None)
_build_exp_struct(sequence)
Return type:

dict

_build_pulse(pulse)
Return type:

dict

_build_phase_cycle(sequence)
Return type:

dict

_build_parvar(id, sequence)

This interface takes a dictionary called a parvar for all progressive elements. It is this object that controls how the sequence changes with time.

Note

This interface interprets any change in LO as being a change in the IF frequency of all pulses and detections.

I.e. the physcial LO does not change.

Parameters:
id_type_

_description_

sequence_type_

_description_

Returns:
dict

_description_

Return type:

dict

terminate()

Stops the current experiment