autodeer.hardware.ETH_awg

Module Contents

Classes

ETH_awg_interface

Represents the interface for connecting to Andrin Doll style spectrometers.

Functions

bg_thread(interface, seq, savename, IFgain, axID, ...)

Attributes

log

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

Bases: autodeer.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

property savefolder[source]
awg_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]
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)[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

launch(sequence, savename, *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, LO, B, reptime, shots=400)[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

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)[source]

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)[source]
_build_exp_struct(sequence)[source]
Return type:

dict

_build_pulse(pulse)[source]
Return type:

dict

_build_phase_cycle(sequence)[source]
Return type:

dict

_build_parvar(id, sequence)[source]

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()[source]

Stops the current experiment

autodeer.hardware.ETH_awg.bg_thread(interface, seq, savename, IFgain, axID, stop_flag)[source]