autodeer.hardware.Bruker_tools

Module Contents

Classes

Functions

convert_progtable(progtable)

This function reformats the progtable to be compatible with the Bruker_tools.

calc_rel_positions(sequence)

Calcuates the starting relative positions of all pulses in a sequence.

run_general(api, ps_file, exp, settings, variables[, run])

A function to run a general Pulse Spel experiment through autoDeer.

change_dimensions(path, dim, new_length)

A function to rewrite a pulseSpel experiment file with a new dimension

_addAWGPulse(sequence, pulse_num, id, pcyc_str[, amp_var])

get_arange(array)

build_unique_progtable(seq)

check_variable(var, uprog)

determine_TWT_split(sequence, MaxGate)

write_pulsespel_file(sequence, d0[, AWG, MPFU, MaxGate])

Write the pulsespel file for a given sequence.

Attributes

autodeer.hardware.Bruker_tools.MODULE_DIR[source]
autodeer.hardware.Bruker_tools.hw_log[source]
autodeer.hardware.Bruker_tools.header[source]
class autodeer.hardware.Bruker_tools.PSPhaseCycle(sequence, MPFU=None, OnlyDet=False)[source]
BPhaseCycles[source]
_MPFU(sequence, MPFU)[source]
_main(sequence)[source]
_detect(sequence)[source]
__str__()[source]
Return type:

str

class autodeer.hardware.Bruker_tools.PSparvar(sequence, id)[source]
Parameters:

sequence (autodeer.sequences.Sequence)

PulseSpel = 'True'[source]
events = '[]'[source]
checkPulseSpel()[source]

Checks if parvar can be run in PulseSpel.Criteria:

  1. Only pulse/delay lengths changing

  2. Constant integer step changes

Returns:
bool

_description_

Return type:

bool

autodeer.hardware.Bruker_tools.possible_delays = "['d1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd10', 'd11', 'd12', 'd13', 'd14', 'd15',..."[source]
autodeer.hardware.Bruker_tools.possible_vars = "['a', 'b', 'c', 'e']"[source]
autodeer.hardware.Bruker_tools.possible_pulses = "['p0', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9', 'p10']"[source]
autodeer.hardware.Bruker_tools.convert_progtable(progtable)[source]

This function reformats the progtable to be compatible with the Bruker_tools. This is done by converting the axis of each moving pulse to be relative to the previous moving pulse.

autodeer.hardware.Bruker_tools.calc_rel_positions(sequence)[source]

Calcuates the starting relative positions of all pulses in a sequence.

class autodeer.hardware.Bruker_tools.PulseSpel(sequence, d0, MPFU=None, AWG=False)[source]
possible_delays[source]
possible_pulses[source]
possible_vars[source]
sequence[source]
var_hash[source]
def_file_str = "''"[source]
exp_file_str = "''"[source]
dims = '[]'[source]
MPFU[source]
AWG[source]
pcyc_str = "''"[source]
parvars = '[]'[source]
_new_delay(key)[source]
_new_var(key)[source]
_new_pulse(key)[source]
save(filepath)[source]
_addDef(str)[source]
_addExp(str)[source]
_ExpDefs()[source]
_addScanLoop()[source]
_addPhaseCycle()[source]
_addAWGPulse(sequence, pulse_num, id)[source]
_check_sequence(sequence)[source]
_cmpl_Exp()[source]
_cmpl_def()[source]
__str__()[source]
Return type:

str

autodeer.hardware.Bruker_tools.run_general(api, ps_file, exp, settings, variables, run=True)[source]

A function to run a general Pulse Spel experiment through autoDeer.

Parameters:
api_type_

The current Bruker Xepr class

ps_filetuple

A tuple containing the file path to both the “.exp” and “.def” files.

exptuple

A tuple giving the name of the experiment and phase cycle.

settingsdict

A dictionary containing possible acquisition settings. Options include [‘ReplaceMode’,’PhaseCycle’,’Acquisition_mode’]

variablesdict

A dictionary containg pulse spel variables to choose from can, these can also be dimension of experiment.

runbool, optional

Should the experiment run or just compile, by default True

Raises:
ValueError

If an input is of the wrong type.

Parameters:
  • ps_file (tuple)

  • exp (tuple)

  • settings (dict)

  • variables (dict)

  • run (bool)

Return type:

None

autodeer.hardware.Bruker_tools.change_dimensions(path, dim, new_length)[source]

A function to rewrite a pulseSpel experiment file with a new dimension

Parameters:
pathstr

The full file path.

dimint

The experiment number that needs to be changed

new_lengthint

The new length can be a list of two if 2D.

Raises:
ValueError

If there more than 2 dimesnions are supplied. Xepr can not handle 3+D experiments.

Parameters:

dim (int)

autodeer.hardware.Bruker_tools._addAWGPulse(sequence, pulse_num, id, pcyc_str, amp_var=None)[source]
autodeer.hardware.Bruker_tools.get_arange(array)[source]
autodeer.hardware.Bruker_tools.build_unique_progtable(seq)[source]
autodeer.hardware.Bruker_tools.check_variable(var, uprog)[source]
Parameters:

var (str)

autodeer.hardware.Bruker_tools.determine_TWT_split(sequence, MaxGate)[source]
autodeer.hardware.Bruker_tools.write_pulsespel_file(sequence, d0, AWG=False, MPFU=False, MaxGate=40)[source]

Write the pulsespel file for a given sequence.

Parameters:
sequenceSequence

The sequence class to be converted.

AWGbool, optional

Is this a pulse spel file for an AWG spectrometer, by default False

MPFUlist, optional

A list of MPFU channels, by default False

MaxGatefloat, optional

The maximum gate time for the TWT gate in microseconds, by default 40 us

Returns:
str

The string for the definition file

str

The string for the experiment file