pyepr.hardware.Bruker_AWG.BrukerAWG

class pyepr.hardware.Bruker_AWG.BrukerAWG(config_file)

Bases: pyepr.classes.Interface

Represents the interface for connecting to AWG based Bruker ELEXSYS-II Spectrometers.

An interface for connecting to AWG based Bruker ELEXSYS-II Spectrometers.

Parameters:
config_filestr

The path to a YAML configuration file.

Attributes:
bg_thread: None or threading.Thread

If a background thread is needed, it is stored here.

api
spec_config
bridge_config
temp_dir = b'.'
d0
bg_thread = None
bg_data = None
cur_exp = None
tuning = False
pool = None
savename = ''
savefolder = ''
setup_flag = False
connect(d0=None)

Connects to the spectrometer through the XeprAPI. Automatically sets up the spectrometer for pulse experiments.

Parameters:
d0: float, optional

The d0 value to be used. If None, the d0 will be calculated upon connection. By default None.

Return type:

None

setup(d0=None)

Sets up the spectrometer for pulse experiments. The video bandwidth is read from the configuration file, and the timebase is set accordingly.

Parameters:
d0: float, optional

The d0 value to be used. If None, the d0 will be calculated upon connection. By default None.

acquire_dataset(**kwargs)

Acquires the dataset.

_launch_complex_thread(sequence, axID=1, tune=True)
launch(sequence, savename, start=True, tune=True, MPFU_overwrite=None, update_pulsespel=True, reset_bg_data=True, reset_cur_exp=True, IFgain=None, **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:
  • sequence (pyepr.dataset.Sequence)

  • savename (str)

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

Generates a rectangular pi/2 and pi pulse at the given frequency and field. The pulses are of equal amplitude ($t_p$ for pi/2 and $2*t_p$ for pi) and are tuned using a Hahn echo sequence.

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

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, tp=12)

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

tp: float

The length of the pi/2 pulse used for Hahn Echo, by default 12 ns. The pi pulse will be twice the length

Returns:
Tunned Pulse: Pulse

The returned pulse object that is now tunned.

phasetune_pulse(pulse)
isrunning()
Return type:

bool

terminate(now=False)

Terminates the experiment immediately.

Return type:

None

terminate_at(criterion, test_interval=2, keep_running=True, verbosity=0, autosave=True)

Terminates the experiment upon a specific condition being satisified.

Parameters:
criterion_type_

The criteria to be tested.

test_intervalint, optional

How often should the criteria be tested in minutes, by default 10.

keep_runningbool, optional

If True, an error will not be raised if the experiment finishes before the criteria is met, by default True.

verbosityint, optional

The verbosity level, by default 0.

autosavebool, optional

If True, the data will be autosaved, by default True.

calc_d0()

This creates an initial guess for d0. A better estimate can only be found after the field sweep.

calc_d0_from_Hahn_Echo(B=None, freq=None)