Calculates pulse shape and amplitude, frequency and phase modulation functions for a series of pulse types.
pulse(Par) pulse(Par,Opt) [t,IQ] = pulse(...) [t,IQ,modulation] = pulse(...)
See also the examples on pulse shaping
and the pulse and spidyan userguides.
This function calculates pulse shapes for predefined types of shaped pulses. The corresponding excitation profile can be computed with the function exciteprofile.
The output contains the time axis data in t
(time in microseconds). IQ
contains the pulse shape data with the in-phase component in the real part and the quadrature component in the imaginary part.
The third (optional) output argument contains the structure modulation
with the calculated modulation functions for the pulse:
modulation.A
: amplitude modulation function (in MHz)
modulation.freq
: frequency modulation function (in MHz)
modulation.phase
: phase modulation function (in radians)
If you don't request any output, pulse
plots the calculated pulse shape, modulation functions and excitation profiles.
The input arguments to pulse
are Par
, a structure containing pulse parameter definitions, and Opt
, an optional structure containing options for the calculation.
Par
is a structure containing all parameters necessary to specify the pulse shape. The available fields are listed below.
tp
Type
'AM/FM'
(or just 'AM'
), where AM refers to the amplitude modulation function and FM to the frequency modulation function.
The available amplitude modulation functions are 'rectangular'
, 'gaussian'
, 'sinc'
, 'halfsin'
, 'quartersin'
, 'tanh2'
, 'sech'
, 'WURST'
, 'GaussianCascade'
, 'FourierSeries'
. Different AM functions can be multiplied by concatenating the keywords as 'AM1*AM2/FM'
.
The available options for frequency modulation are 'none'
, 'linear'
, 'tanh'
, 'uniformQ'
. If only an AM keyword is given, the FM function is set to 'none'
.
The 'uniformQ'
option can be used to obtain the frequency modulation corresponding to a pulse with offset-independent adiabaticity given a specific amplitude modulation function (see Tannús, A., Garwood, M. Improved Performance of Frequency-Swept Pulses Using Offset-Independent Adiabaticity. J. Magn. Reson. A 120, 133–137 (1996) (DOI: 10.1006/jmra.1996.0110 )), for example for higher-order sech (HSn) pulses.
Here are a few examples:
Par.Type = 'sech/tanh'; % hyperbolic-secant pulse Par.Type = 'WURST/linear'; % linear chirp pulse with WURST amplitude envelope Par.Type = 'gaussian'; % constant-frequency gaussian-amplitude pulse
Additional parameters are required to fully specify the various AM and FM functions, see below.
Flip
Par.Flip = pi
specifies a 180-degree pulse.
Flip
is used to calculate the pulse amplitude. For amplitude-modulated pulses, it is calculated via the integral of the amplitude modulation function. For frequency-modulated pulses, the procedure described in Jeschke, G., Pribitzer, S., Doll, A. Coherence Transfer by Passage Pulses in Electron Paramagnetic Resonance Spectroscopy. J. Phys. Chem. B 119, 13570–13582 (2015) (DOI: 10.1021/acs.jpcb.5b02964) is used.
Amplitude
Par.Flip
is given, Par.Amplitude
is ignored.
Qcrit
Par.Qcrit
is given, Par.Amplitude
and Par.Flip
are ignored.
The pulse amplitude is calculated from the critical adiabaticity as described in Jeschke, G., Pribitzer, S., Doll, A. Coherence Transfer by Passage Pulses in Electron Paramagnetic Resonance Spectroscopy. J. Phys. Chem. B 119, 13570–13582 (2015) (DOI: 10.1021/acs.jpcb.5b02964).
Frequency
Par.Frequency = -10; % constant frequency offset Par.Frequency = [-50 50]; % up-sweep Par.Frequency = [50 20]; % down-sweep
Phase
0
for +x, pi/2
for +y, etc. If not given, it defaults to 0.
TimeStep
Pulse shape parameters
Depending on the AM function, additional fields need to be specified:
'rectangular'
'gaussian'
tFWHM
- FWHM, in microseconds
trunc
- truncation parameter (0 to 1) (alternative to tFWHM
)
'sinc'
zerocross
- width between the first zero-crossing points in microseconds
'sech'
beta
- dimensionless truncation parameter (used as beta/tp
)
n
- exponent of the secant function argument (default = 1)
asymmetric sech pulses can be obtained by specifying two values for n
to get amplitude- and frequency-modulated higher-order sech pulses (HSn, n>1) with offset-independent adiabaticity, combine the sech
AM function with the uniformQ
FM option (see below)
'WURST'
nwurst
- parameter determining the steepness of the amplitude function
'halfsin'
'quartersin'
trise
- rise time in microseconds for quarter sine weighting at the pulse edges
'tanh2'
trise
- rise time in microseconds for tanh2 weighting at the pulse edges
'GaussianCascade'
If Par.Type
is set to 'G3'
, 'G4'
, 'Q3'
or 'Q5'
, the Gaussian pulse cascades are computed with the parameters listed in Emsley, L., Bodenhausen, G., Gaussian pulse cascades: New analytical functions for rectangular selective inversion and in-phase excitation in NMR, Chem. Phys. Lett. 165, 469-476 (1990), DOI: 10.1016/0009-2614(90)87025-M (Table 1 on p. 473, Cycle 3 or Table 2 on p. 474, Cycle 11) and Emsley, L., Bodenhausen, G., Optimization of shaped selective pulses for NMR using a quaternion description of their overall propagators, J. Magn. Reson. 97, 135-148 (1992), DOI: 10.1016/0022-2364(92)90242-Y (Table 2 on p. 142), respectively. Otherwise the following parameters need to be specified:
A0
- list of relative amplitudes
x0
- list of positions (in fractions of the pulse length)
FWHM
- list of FWHM (in fractions of the pulse length)
'FourierSeries'
If Par.Type
is set to 'I-BURP 1'
, 'I-BURP 2'
, 'E-BURP 1'
, 'E-BURP 2'
, 'U-BURP'
, 'RE-BURP'
, 'SNOB i2'
or 'SNOB i3'
, the finite Fourier series pulses are computed with the coefficients listed in Geen, H., Freeman, R., Band-selective radiofrequency pulses, J. Magn. Reson. 93, 93-141 (1991), DOI: 10.1016/0022-2364(91)90034-Q(Table 3 for E-BURP 1, Table 4 for E-BURP 2, Table 5 for I-BURP 1, Table 6 for I-BURP 2, Table 7 for U-BURP and Table 8 for RE-BURP, Np = 256) and Kupce, E., Boyd, J., Campbell, I. D., Short Selective Pulses for Biochemical Applications, J. Magn. Reson. B 106, 300-303 (1995), DOI: 10.1006/jmrb.1995.1049 (Table 1 on p. 300 for SNOB i2 and SNOB i3). Otherwise the following parameters need to be specified:
A0
- initial amplitude coefficient
An
- list of Fourier coefficients for the cosine term
Bn
- list of Fourier coefficients for the sine term
For the definition of the FM functions, in all cases the frequency sweep range needs to be defined in Par.Frequency
with start and end frequencies.
Also, depending on the FM function, the following additional fields are required:
'none'
'linear'
'tanh'
beta
- dimensionless truncation parameter (see 'sech'
)
'uniformQ'
I
, Q
or IQ
Par.tp
and the length of the I
and Q
or IQ
vectors. All other input parameters (Par.TimeStep
, Par.Flip
, Par.Amplitude
, Par.Qcrit
, Par.Frequency
, Par.Phase
, Par.Type
) are ignored.
With this input, pulse
can be used to apply bandwidth compensation to user-defined pulse shapes.
For frequency-swept pulses, pulse
can compensate for the resonator bandwidth to achieve offset-independent adiabaticity. In this case, the following additional parameters have to be included in the Par
structure:
mwFreq
FrequencyResponse
Par.FrequencyResponse = [Frequency; TransferFunction]
with the (possibly experimental) resonator transfer function in TransferFunction
and the corresponding frequency axis in Frequency
(in GHz). A complex transfer function input in Par.FrequencyResponse
is used directly in the bandwidth compensation. A real transfer function input is assumed to correspond to the magnitude response, and the associated phase response is estimated (see details below).
If FrequencyResponse
is given, the alternative input fields ResonatorFrequency
and ResonatorQL
are ignored.
ResonatorFrequency
and ResonatorQL
Par.ResonatorFrequency = 34.9; % resonator center frequency, GHz Par.ResonatorQL = 100; % loaded Q-factor of resonator
If FrequencyResponse
is given, it takes precedence over ResonatorFrequency
and ResonatorQL
.
The parameters in the Opt
structure define different settings for the calculation. The available fields are given below.
OverSampleFactor
The pulse amplitude, frequency and phase modulation functions are calculated using the following equations. The origin of the time variable t is at the center of the pulse and runs from -tp/2 to +tp/2.
Amplitude modulation functions:
'rectangular'
:
'gaussian'
:
'sinc'
:
'sech'
:
'WURST'
:
'halfsin'
:
'quartersin'
:
'tanh2'
:
'GaussianCascade'
:
'FourierSeries'
:
Frequency and phase modulation functions (BW is the difference between end and start frequencies):
'none'
:
'linear'
:
'tanh'
:
'uniformQ'
:
The frequency modulation function is calculated as the integral of the squared amplitude modulation function and multiplied by the specified bandwidth (centered at zero). This can be used for nth order sech pulses (HSn) or in general to obtain offset-independent adiabaticity pulses given a certain amplitude function (see Garwood, M., DelaBarre, L., J. Magn. Reson. 153, 155-177 (2001), DOI: 10.1006/jmre.2001.2340). The phase modulation function is obtained by integration and the phase is set to zero at the center of the pulse.
The time axis for the calculation of the modulation functions is centered at zero. The normalized amplitude modulation functions given above are multiplied by Par.Amplitude
.
The final pulse shape is calculated as:
where the different terms are the amplitude modulation, the phase modulation, the center frequency and the phase offset defined in Par.Phase
.
Compensation for the resonator bandwidth by adaptation of the chirp rates in frequency-swept pulses is implemented as described in Doll, A., Pribitzer, S., Tschaggelar, R., Jeschke, G., Adiabatic and fast passage ultra-wideband inversion in pulsed EPR, J. Magn. Reson. 230, 27-39 (2013), DOI: 10.1016/j.jmr.2013.01.002 and Pribitzer, S., Doll, A., Jeschke, G., SPIDYAN, a MATLAB library for simulating pulse EPR experiments with arbitrary waveform excitation. J. Magn. Reson. 263, 45-54 (2016) (DOI: 10.1016/j.jmr.2015.12.014). For pulses with uniform adiabaticity (sech/tanh and any pulse with a frequency modulation function set to 'uniformQ'
) both the frequency and the amplitude modulation functions defined above are adjusted to compensate for the resonator profile. For all other pulses, the amplitude modulation function is preserved and only the frequency modulation function is adapted to the provided resonator profile. The phase modulation function is obtained by integration and the phase is set to zero at the center of the pulse.
exciteprofile, rfmixer, transmitter, resonator, saffron, spidyan, evolve