autodeer.hardware.Bruker_MPFU

Module Contents

Classes

BrukerMPFU

Represents the interface for connecting to MPFU based Bruker ELEXSYS-II

Functions

step_parameters(interface, reduced_seq, dim, variables)

_MPFU_channels(sequence)

Idenitifies how many unique MPFU channels are needed for a sequence and

_SPFU_channels(sequence[, ELDOR])

Idenitifies how many unique MPFU channels are needed for a sequence and

get_specjet_data(interface)

tune_power(interface, channel[, tol, maxiter, bounds, ...])

Tunes the attenuator of a given channel to a given target using the

tune_phase(interface, channel, target[, tol, maxiter, ...])

Tunes the phase of a given channel to a given target using the

MPFUtune(interface, sequence, channels[, echo, tol, ...])

ELDORtune(interface, sequence, freq[, MPFU, ...])

SPFUtune(interface, sequence, flip_power[, echo, tol, ...])

test_if_MPFU_compatability(seq)

Attributes

autodeer.hardware.Bruker_MPFU.hw_log[source]
class autodeer.hardware.Bruker_MPFU.BrukerMPFU(config_file)[source]

Bases: autodeer.classes.Interface

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

An interface for connecting to MPFU 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.

Parameters:

config_file (str)

api[source]
spec_config[source]
bridge_config[source]
MPFU[source]
temp_dir[source]
d0[source]
bg_thread = 'None'[source]
bg_data = 'None'[source]
cur_exp = 'None'[source]
tuning = 'False'[source]
pool[source]
savename = "''"[source]
savefolder[source]
setup_flag = 'False'[source]
connect(d0=None)[source]
Return type:

None

setup(d0=None)[source]
acquire_dataset()[source]

Acquires the dataset.

_launch_complex_thread(sequence, axID=1, tune=True)[source]
launch(sequence, savename, start=True, tune=True, MPFU_overwrite=None, update_pulsespel=True, reset_bg_data=True, reset_cur_exp=True, **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:
tune_rectpulse(*, tp, **kwargs)[source]

Mocks the tune_rectpulse command and returns a pair of RectPulses with the given tp and 2*tp respectively. No scale is set.

tune_pulse(pulse, *args, **kwargs)[source]

Mocks the tune_pulse command and returns the pulse unchanged.

tune(sequence, B0, LO)[source]
Return type:

None

isrunning()[source]
Return type:

bool

terminate(now=False)[source]

Terminates the experiment immediately.

Return type:

None

calc_d0()[source]

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, LO=None)[source]
autodeer.hardware.Bruker_MPFU.step_parameters(interface, reduced_seq, dim, variables)[source]
autodeer.hardware.Bruker_MPFU._MPFU_channels(sequence)[source]

Idenitifies how many unique MPFU channels are needed for a sequence and applies the correct Channel infomation to each pulse.

autodeer.hardware.Bruker_MPFU._SPFU_channels(sequence, ELDOR=True)[source]

Idenitifies how many unique MPFU channels are needed for a sequence and applies the correct Channel infomation to each pulse.

autodeer.hardware.Bruker_MPFU.get_specjet_data(interface)[source]
autodeer.hardware.Bruker_MPFU.tune_power(interface, channel, tol=0.1, maxiter=30, bounds=[0, 100], hardware_wait=3, echo='abs', save=True)[source]

Tunes the attenuator of a given channel to a given target using the standard scipy optimisation scripts.

Parameters:
channelstr

The chosen MPFU channel. Options: [‘+<x>’, ‘-<x>’, ‘+<y>’, ‘-<y>’]

tolfloat, optional

The tolerance in attenuator parameter, by default 0.1

maxiterint, optional

The maximum number of iterations in the optimisation, by default 30

Returns:
float

The optimal value of the attenuator parameter

Parameters:

channel (str)

Return type:

float

autodeer.hardware.Bruker_MPFU.tune_phase(interface, channel, target, tol=0.1, maxiter=30, bounds=[0, 100], hardware_wait=3)[source]

Tunes the phase of a given channel to a given target using the standard scipy optimisation scripts.

Parameters:
channelstr

The chosen MPFU channel. Options: [‘+<x>’, ‘-<x>’, ‘+<y>’, ‘-<y>’]

targetstr

The target echo position, this can either be maximising (+) or minimising (-) either the real (R) or imaginary (I) of the echo. Options: [‘R+’, ‘R-’, ‘I+’, ‘I-‘]

tolfloat, optional

The tolerance in phase parameter, by default 0.1

maxiterint, optional

The maximum number of iterations in the optimisation, by default 30

Returns:
float

The optimal value of the phase parameter

Parameters:
  • channel (str)

  • target (str)

Return type:

float

autodeer.hardware.Bruker_MPFU.MPFUtune(interface, sequence, channels, echo='Hahn', tol=0.1, bounds=[0, 100], tau_value=550)[source]
Parameters:

tol (float)

autodeer.hardware.Bruker_MPFU.ELDORtune(interface, sequence, freq, MPFU=True, tau_value=550, test_tp=16, plot=False, save=True)[source]
autodeer.hardware.Bruker_MPFU.SPFUtune(interface, sequence, flip_power, echo='Hahn', tol=0.1, bounds=[0, 60], tau_value=550)[source]
Parameters:

tol (float)

autodeer.hardware.Bruker_MPFU.test_if_MPFU_compatability(seq)[source]