pyepr.hardware.Bruker_tools

Attributes

Classes

Functions

get_specjet_data(interface[, full_output, ...])

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

_add_AWG_line(elements[, comment, indent, repeat])

addAWGPulse(sequence, pulse_num, id, last_awg_pulse_num)

_addDefaultAWGPulse(sequence, pulse_num, id[, ...])

_addCustomAWGPulse(sequence, pulse_num, id, ...[, ...])

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.

write_shape_file(pulse[, name, phase_shift, number, ...])

Write a Bruker shape file for a given pulse.

step_parameters(interface, reduced_seq, dim, variables)

get_specjet_data(interface[, full_output, ...])

Module Contents

pyepr.hardware.Bruker_tools.MODULE_DIR[source]
pyepr.hardware.Bruker_tools.hw_log[source]
pyepr.hardware.Bruker_tools.header = Multiline-String[source]
Show Value
"""; -------------------------------------------------------------------------------
"""
pyepr.hardware.Bruker_tools.get_specjet_data(interface)[source]
pyepr.hardware.Bruker_tools.possible_delays = ['d1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd10', 'd11', 'd12', 'd13', 'd14', 'd15',...[source]
pyepr.hardware.Bruker_tools.possible_vars = ['a', 'b', 'c', 'e'][source]
pyepr.hardware.Bruker_tools.possible_pulses = ['p0', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9', 'p10'][source]
pyepr.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.

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

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

pyepr.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

pyepr.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)

pyepr.hardware.Bruker_tools._add_AWG_line(elements, comment=None, indent=2, repeat=1)[source]
pyepr.hardware.Bruker_tools.addAWGPulse(sequence, pulse_num, id, last_awg_pulse_num, amp_var=None, SpinJet_version=1, resonator=None)[source]
pyepr.hardware.Bruker_tools._addDefaultAWGPulse(sequence, pulse_num, id, amp_var=None, SpinJet_version=1)[source]
pyepr.hardware.Bruker_tools._addCustomAWGPulse(sequence, pulse_num, id, last_awg_pulse_num, amp_var=None, SpinJet_version=1)[source]
pyepr.hardware.Bruker_tools.get_arange(array)[source]
pyepr.hardware.Bruker_tools.build_unique_progtable(seq)[source]
pyepr.hardware.Bruker_tools.check_variable(var, uprog)[source]
Parameters:

var (str)

pyepr.hardware.Bruker_tools.determine_TWT_split(sequence, MaxGate)[source]
pyepr.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

pyepr.hardware.Bruker_tools.write_shape_file(pulse, name='', phase_shift=0, number=None, AWG_rate=1.6)[source]

Write a Bruker shape file for a given pulse.

Parameters:
pulsePulse

The pulse to be converted.

namestr, optional

The name of the pulse, by default “”

phase_shiftint, optional

The phase shift of the pulse in radians, by default 0

numberint, optional

The number of the pulse, by default None

AWG_ratefloat, optional

The sample rate of the AWG in GSa/s, by default 1.6 GSa/s for SpinJet-I

Returns:
str

The string for the shape file.

Parameters:

name (str)

pyepr.hardware.Bruker_tools.step_parameters(interface, reduced_seq, dim, variables)[source]
pyepr.hardware.Bruker_tools.get_specjet_data(interface, full_output=False, suppress_exceptions=False)[source]