autodeer.sequences

Module Contents

Classes

Sequence

Represents an experimental pulse sequence.

DEERSequence

Represents a DEER/PELDOR sequence.

HahnEchoSequence

Represents a Hahn-Echo sequence.

T2RelaxationSequence

Represents a T2 relaxation sequence. A Hahn Echo where the interpulse delay increases

FieldSweepSequence

Represents a Field Sweep (EDFS) sequence.

ReptimeScan

Represents a reptime scan of a Hahn Echo Sequence.

CarrPurcellSequence

Represents a Carr-Purcell sequence.

RefocusedEcho2DSequence

Represents a 2D Refocused-echo Sequence.

ResonatorProfileSequence

Builds nutation based Resonator Profile sequence.

TWTProfileSequence

Builds TWT based Resonator Profile sequence.

class autodeer.sequences.Sequence(*, name, B, LO, reptime, averages, shots, **kwargs)[source]

Represents an experimental pulse sequence.

Represents an experimental pulse sequence.

Parameters:
namestr

The name of this pulse sequence

Bfloat

The magnetic field for this sequence in Gauss.

LOfloat

The central frequency of this sequence. I.e. The frequnecy at which a zero offset pulse is at.

reptimefloat

The shot repetition time in us.

averagesint

The number of scans to be accumulated.

shotsitn

The number of shots per point.

property seqtable_steps[source]
pulses = '[]'[source]
num_pulses[source]
axes_uuid = '[]'[source]
reduce_uuid = '[]'[source]
LO[source]
averages[source]
shots[source]
name[source]
progTable[source]
plot()[source]
Return type:

None

plot_pulse_exc(FieldSweep=None, ResonatorProfile=None)[source]
addPulse(pulse)[source]

Adds a pulse to the next position in the sequence.

Parameters:
pulsePulse

The object describing the pulse.

_estimate_time()[source]

Calculates the estimated experiment time in seconds.

_buildPhaseCycle()[source]
evolution(params, reduce=[])[source]
shift_detfreq_to_zero()[source]
isPulseFocused()[source]

Is the sequence expressed to contain only pulses and no delays?

isDelayFocused()[source]

Is the sequence expressed to contain both pulses and delays?

convert(*, reduce=True)[source]

Converts the current sequence to either pulse focused or delay focused depending on the current state

Parameters:
reducebool, optional

Reduce to the smallest number of objects, by default True

_convert_to_delay()[source]
_convert_to_pulses()[source]
_checkRect()[source]

Checks if all the pulses in the sequence are rectangular.

Return type:

bool

__str__()[source]
copy()[source]
_to_dict()[source]
_to_json()[source]
save(filename)[source]

Save the sequence to a JSON file.

Parameters:
filenamestr

Path to the JSON file.

Returns:
None
Raises:
TypeError

If the object cannot be serialized to JSON.

classmethod _from_dict(dct)[source]
classmethod _from_json(JSONstring)[source]
classmethod load(filename)[source]

Load an object from a JSON file.

Parameters:
filenamestr

Path to the JSON file.

Returns:
objSequence

The Sequence loaded from the JSON file.

Raises:
FileNotFoundError

If the file does not exist.

class autodeer.sequences.DEERSequence(*, tau1, tau2, tau3=None, tau4=None, dt, B, LO, reptime, averages, shots, ESEEM_avg=None, **kwargs)[source]

Bases: Sequence

Represents a DEER/PELDOR sequence.

Build a DEER sequence using rectangular pulses

Parameters:
tau1int or float

The first interpulse delay in us

tau2int or float

The second interpulse delay in us

dtint or float

The time step for DEER measurment in ns

Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

tau3int or float, optional

The delay between the first static pump pulse in 5-pulse DEER and the 1st refocusing pulse in us, by default None. If the value is None then a 4-pulse sequence is created, otherwise a 5-pulse.

ESEEM_avg: str

Selecting the ESEEM averaging required. ESEEM averaging works by introducing small stepping in the first tau delay and averaging across them all. Options: * proton - 8 small steps of 8ns * deuteron - 8 small steps of 16ns * None - default

name = "'DEERSequence'"[source]
tau1us[source]
tau1[source]
tau2[source]
dt[source]
deadtime = '200'[source]
ESEEM = 'False'[source]
add_ESEEM_avg(type=None)[source]
three_pulse(tp=16)[source]

Build a four pulse DEER sequence.

Parameters:
tpfloat

Length of default RectPulse in ns, by default 16ns.

four_pulse(tp=16, relaxation=False)[source]

Build a four pulse DEER sequence.

Parameters:
tpfloat

Length of default RectPulse in ns, by default 16ns.

five_pulse(tp=16, relaxation=False, re_step=50, re_dim=100)[source]

Build a five pulse DEER sequence.

Parameters:
tpfloat

Length of default RectPulse in ns, by default 16ns.

seven_pulse(tp=16, relaxation=False)[source]

Build a seven pulse DEER sequence.

Parameters:
tpfloat

Length of default RectPulse in ns, by default 16ns.

nDEER_CP(n, tp=16, relaxation=False, pcyc='Normal')[source]

Generate an nDEER sequence.

The sum of tau1 and tau2 is used as total trace length.

Parameters:
nint

The number of refocusing pulses

tpint, optional

_description_, by default 16

relaxationbool, optional

_description_, by default False

pcyc: str, optional

Normal: Phases cycles pump and observer pulses, no DC cycle NormalDC: Phases cycles pump and observer pulses, DC cycle Obs: Phases cycles observer pulses, no DC cycle ObsDC: Phases cycles and observer pulses, DC cycle

Parameters:

n (int)

select_pcyc(option)[source]

Choose which DEER phase you would like.

Phase cycle

Short Code

Sequence

Steps

Pulse Phase Cycle

Remaining Echoes

Ref.

(x)x|xp|x

DC

ALL

2

[+(+x)-(-x)]

PE12rp, SE(PE12)p3, PE12rpr3

(x)[xp]x

8step_3p

3 pulse

8

[+(+x)-(-x)]

x[x][xp]x

16step_4p

4 pulse

16

[+(+x)-(+y)+(-x)-(-y)]

[+(+x)+(+y)+(-x)+(-y)]

[1]

x|xp|[x][xp]x

16step_5p

5 pulse

16

PEp02r3,b PE1p0r2r3b

[1]

x[x]|xp|(x)(xp)(xp)x

32step_7p

7 pulse

32

[1]

Parameters:
optionstr

The short code of the phase cycle. See table above.

Parameters:

option (str)

simulate()[source]
class autodeer.sequences.HahnEchoSequence(*, B, LO, reptime, averages, shots, **kwargs)[source]

Bases: Sequence

Represents a Hahn-Echo sequence.

Build a Hahn-Echo sequence using either rectangular pulses or specified pulses. By default no progression is added to this sequence.

Parameters:
Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

name = "'HahnEchoSequence'"[source]
class autodeer.sequences.T2RelaxationSequence(*, B, LO, reptime, averages, shots, step=40, dim=200, **kwargs)[source]

Bases: HahnEchoSequence

Represents a T2 relaxation sequence. A Hahn Echo where the interpulse delay increases

Build a Hahn-Echo sequence using either rectangular pulses or specified pulses. By default no progression is added to this sequence.

Parameters:
Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

tau[source]
name = "'T2RelaxationSequence'"[source]
class autodeer.sequences.FieldSweepSequence(*, B, LO, Bwidth, reptime, averages, shots, **kwargs)[source]

Bases: HahnEchoSequence

Represents a Field Sweep (EDFS) sequence.

Build a Field Sweep (EDFS) sequence using either rectangular pulses or specified pulses.

Parameters:
Bint or float

The B0 field, in Guass

Bwidth: int or float

The width of the field sweep, in Gauss

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

name = "'FieldSweepSequence'"[source]
B[source]
class autodeer.sequences.ReptimeScan(*, B, LO, reptime, reptime_max, averages, shots, **kwargs)[source]

Bases: HahnEchoSequence

Represents a reptime scan of a Hahn Echo Sequence.

A Hahn echo sequence is perfomed with the shot repetition time increasing.1

Parameters:
Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime: float

The default reptime, this is used for tuning pulses etc…

reptime_maxnp.ndarray

The maximum shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

min_reptime = '20'[source]
dim = '100'[source]
step[source]
reptime[source]
name = "'ReptimeScan'"[source]
class autodeer.sequences.CarrPurcellSequence(*, B, LO, reptime, averages, shots, tau, n, dim=100, **kwargs)[source]

Bases: Sequence

Represents a Carr-Purcell sequence.

Build a Carr-Purcell dynamical decoupling sequence using either rectangular pulses or specified pulses.

Parameters:
Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

tauint

The maximum total sequence length in us

nint

The number refocusing pulses

dimint

The number of points in the X axis

name = "'CarrPurcellSequence'"[source]
tau[source]
n[source]
dim[source]
_build_sequence()[source]
class autodeer.sequences.RefocusedEcho2DSequence(*, B, LO, reptime, averages, shots, tau, dim=100, **kwargs)[source]

Bases: Sequence

Represents a 2D Refocused-echo Sequence.

Build a 2D Refocused-echo sequence using either rectangular pulses or specified pulses.

Parameters:
Bint or float

The B0 field, in Guass

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

tauint

The maximum total sequence length in us

dim: int

The number of points in both the X and Y axis

name = "'RefocusedEcho2D'"[source]
tau_init = '400'[source]
dt[source]
tau1[source]
tau2[source]
_build_sequence()[source]
class autodeer.sequences.ResonatorProfileSequence(*, B, LO, reptime, averages, shots, fwidth=0.3, **kwargs)[source]

Bases: Sequence

Builds nutation based Resonator Profile sequence.

Build a resonator profile nutation sequence using either rectangular pulses or specified pulses.

Parameters:
Bint or float

The B0 field, in Guass

Bwidth: int or float

The width of the field sweep, in Gauss

LOint or float

The LO frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

fwidth: float

The frequency width of the resonator profile in GHz, by default 0.3GHz

tau1: float

The delay between the nutating pulse and the Hahn Echo, by default 2000 ns

tau2: float

The interpulse delay in the Hahn Echo, by default 500 ns

name = "'ResonatorProfileSequence'"[source]
gyro[source]
fwidth[source]
_build_sequence()[source]
class autodeer.sequences.TWTProfileSequence(*, B, LO, reptime, averages=1, shots=100, **kwargs)[source]

Bases: Sequence

Builds TWT based Resonator Profile sequence.

Represents an experimental pulse sequence.

Parameters:
namestr

The name of this pulse sequence

Bfloat

The magnetic field for this sequence in Gauss.

LOfloat

The central frequency of this sequence. I.e. The frequnecy at which a zero offset pulse is at.

reptimefloat

The shot repetition time in us.

averagesint

The number of scans to be accumulated.

shotsitn

The number of shots per point.

name = "'TWTProfileSequence'"[source]
_build_sequence()[source]