pyepr.GaussianPulse

class pyepr.GaussianPulse(*, tp=32, FWHM=None, freq=0, **kwargs)[source]

Bases: Pulse

Represents a Gaussian monochromatic pulse.

By default, the FWHM is set to tp/(2*np.sqrt(2*np.log(2))).

Parameters:
tpfloat

Pulse length in ns, by default 32

FWHMfloat,

The full width at half maximum of the pulse. Defaults to tp/(2*np.sqrt(2*np.log(2))).

freqfloat, optional

The frequency of the pulse, by default 0

Examples

import pyepr as epr
import matplotlib.pyplot as plt

GuassPulse = epr.GaussianPulse(tp=32, flipangle=np.pi)
fig = GuassPulse.plot(pad=50)
axs = fig.get_axes()
axs[0].annotate('', xy=(-GuassPulse.FWHM.value/2, 0.5), xytext=(GuassPulse.FWHM.value/2, 0.5), color='C1',arrowprops=dict(arrowstyle='<|-|>', color='C1',lw=2))
axs[0].annotate('FWHM', xy=(0, 0.51), xytext=(0, 0.51), color='C1', ha='center', fontsize=12)

(Source code, png)

../../_images/GaussianPulse-1.png

Attributes

freq
FWHM
property bandwidth

Inherited from Pulse: name, uuid, amp_factor

Methods

func(ax)[source]
plot(pad=1000)[source]

Plots the time domain representation of this pulse alongside its Mz inversion profile.

Parameters:
padint, optional

The number of zeros to pad the data with, by default 1000

freqsnp.ndarray, optional

The frequency axis to calculate the Mz inversion profile over. If not given, a default range is calculated by exciteprofile.