pyepr.sequences.base_sequences.CarrPurcellSequence

class pyepr.sequences.base_sequences.CarrPurcellSequence(*, B, freq, reptime, averages, shots, n, start=300, step=50, 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.

Sequence: [pi/2 [- tau - pi - tau]^n - echo]

Parameters:
Bint or float

The B0 field, in Gauss

freqint or float

The freq frequency in GHz

reptime_type_

The shot repetition time in us

averagesint

The number of scans.

shotsint

The number of shots per point

nint

The number refocusing pulses

startfloat

The minimum interpulse delay in ns, by default 300 ns

stepfloat

The step size of the interpulse delay in ns, by default 50 ns

dimint

The number of points in the X axis

Examples

import pyepr as epr
epr.set_waveform_precision(1)
seq = epr.CarrPurcellSequence(B=12000, freq=34, reptime=1000, averages=1, shots=10, n=4)

seq.draw()

(Source code, png)

../../../../_images/CarrPurcellSequence-12.png

Attributes

t: pyepr.classes.Parameter[source]

The first interpulse delay in ns, which is incremented.

n: pyepr.classes.Parameter[source]

The number of refocusing pi pulses.

dim: pyepr.classes.Parameter[source]

The number of points in the X axis.

Methods

simulate(T_CP=2500.0, e=1.8)[source]

Simulates the Carr-Purcell sequence as a single component stretched exponential decay.

V(t) = e^{(-(t/T_{CP})^e)}

Parameters:
T_CPfloat

The Carr-Purcell relaxation time, by default 2.5e3 ns

efloat

The stretching exponent, by default 1.8

Returns:
xaxisnp.ndarray

The x-axis of the simulation

datanp.ndarray

Examples

import matplotlib.pyplot as plt
import pyepr as epr
epr.set_waveform_precision(1)

seq = epr.CarrPurcellSequence(B=12000, freq=34, reptime=1000, averages=1, shots=10, n=4)
x,data = seq.simulate(T_CP=2.5e3, e=1.8)
plt.plot(x,data)
plt.xlabel("Interpulse Delay (ns)")
plt.ylabel("Signal Intensity (a.u.)")

(Source code, png)

../../../../_images/CarrPurcellSequence-22.png