pyepr.HSPulse

class pyepr.HSPulse(*, tp=128, order1=1, order2=6, beta=20, **kwargs)[source]

Bases: FrequencySweptPulse

Represents a non-symetric hyperboilc secant frequency-swept pulse.

The amplitude and frequency modulation functions are defined as:

\begin{align} \mathrm{AM} & = \begin{cases} \mathrm{sech}\left(\frac{\beta}{2}\left(\frac{2t}{t_p}\right)^{\alpha_1}\right) & t < t_p/2 \\ \mathrm{sech}\left(\frac{\beta}{2}\left(\frac{2t}{t_p}\right)^{\alpha_2}\right) & t \geq t_p/2 \end{cases} \\ \mathrm{FM} & = \frac{\mathrm{BW}}{2 \mathrm{tanh}( \beta/2)}\mathrm{tanh}\left(\frac{\beta t}{t_p} \right) + \omega_0 \end{align}

where \alpha_1 and \alpha_2 are the orders of the hyperbolic secant function for the amplitude and frequency modulation respectively, \beta is the truncation parameter, and BW is the sweep bandwidth.

Parameters:
tpfloat

Pulse length in ns

tfloat, optional

The time position of the pulse, by default None

init_freqfloat, optional

The initial frequency of the pulse in GHz, by default None. Either the initial and final frequency or the bandwidth and central frequency must be specified.

final_freqfloat, optional

The final frequency of the pulse in GHz, by default None. Either the initial and final frequency or the bandwidth and central frequency must be specified.

BWfloat, optional

The bandwidth of the pulse in GHz, by default None. Either the initial and final frequency or the bandwidth and central frequency must be specified.

freqfloat, optional

The central frequency of the pulse in GHz, by default None. Either the initial and final frequency or the bandwidth and central frequency must be specified.

scalefloat, optional

The scale of the pulse, by default None

flipanglefloat, optional

The flip angle of the pulse in radians, by default None

order1float, optional

The order of the hyperbolic secant function for the first half of the pulse, by default 1

order2float, optional

The order of the hyperbolic secant function for the second half of the pulse, by default 6

betafloat, optional

The beta parameter of the hyperbolic secant function, by default 20

Examples

import pyepr as epr
import matplotlib.pyplot as plt

pulse = epr.HSPulse(tp=128, flipangle=np.pi, init_freq=-0.2, final_freq=0.1, order1=1, order2=6, beta=20)
pulse.plot(pad=100)

(Source code, png)

../../_images/HSPulse-1.png

Attributes

order1: pyepr.classes.Parameter

The order of the hyperbolic secant function for the first half of the pulse

order2: pyepr.classes.Parameter

The order of the hyperbolic secant function for the first half of the pulse

beta: pyepr.classes.Parameter

The beta parameter of the hyperbolic secant function

property sweeprate

The sweep rate of the pulse in GHz/ns

Inherited from Pulse: name, uuid, bandwidth

Methods

func(ax)[source]

Inherited from FrequencySweptPulse: flip()