- EasySpin
- Documentation
- Publications
- Website
- Forum

pulse

Calculates pulse shape and amplitude, frequency and phase modulation functions for a series pulse types.

Syntax

pulse(Par) pulse(Par,Opt) [t,IQ] = pulse(...) [t,IQ,modulation] = pulse(...)

Description

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`

Pulse length, in microseconds.

`TimeStep`

Time step for the definition of the waveform, in microseconds. If not given, it is automatically determined based on the Nyquist sampling criterion and the input pulse parameters.

`Flip`

Pulse flip angle, in radians. If absent,

`Par.Flip = pi`

is used as default.
`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`

Pulse amplitude, in MHz. If

`Par.Flip`

is given, `Par.Amplitude`

is ignored.
`Frequency`

Pulse frequency, in MHz (default = 0). For frequency-swept pulses the start and end frequencies are required.

Par.Frequency = -10; % constant frequency offset Par.Frequency = [-50 50]; % up-sweep Par.Frequency = [50 20]; % down-sweep

`Phase`

Overall pulse phase, in radians, *e.g.*

`0`

for +x, `pi/2`

for +y, etc. If not given, it defaults to 0.
`Type`

Pulse shape name in a string structured as

`'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'`

, `'sech'`

, `'WURST'`

. Different AM functions can be multiplied by concatenating the keywords as `'AM1*AM2/FM'`

. The default is `'rectangular'`

.

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'`

.

Additional parameters are required to fully specify the various AM and FM functions, see below.

`I`

, `Q`

I and Q data describing an arbitrary pulse shape not included in the predefined options listed below. If only the in-phase component is defined, the quadrature component is set to zero. The time axis is reconstructed based on

`Par.tp`

and the length of the I and Q vectors. All other input parameters (`Par.Amplitude`

, `Par.Flip`

, `Par.Frequency`

, `Par.Phase`

, etc.) are ignored. `I`

and `Q`

.
Depending on the AM function, additional fields need to be specified:

`'rectangular'`

- no additional fields are required

`'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`

`'WURST'`

`nwurst`

- parameter determining the steepness of the amplitude function

`'halfsin'`

- no additional fields are required
`'quartersin'`

`trise`

- rise time in microseconds for quarter sine weighting at the pulse edges

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'`

- no additional fields are required

`'linear'`

- no additional fields are required

`'tanh'`

`beta`

- dimensionless truncation parameter (see`'sech'`

)

`'uniformQ'`

- no additional fields are required

Compensation for the resonator bandwidth is available can be selected by setting `Opt.BWCompensation = 1`

(see below). In this case, the following additional parameters have to be included in the `Par`

structure:

`MagnitudeResponse`

Resonator magnitude response function (ideal or experimental).

`faxis`

Corresponding frequency axis, in MHz.

`mwFreq`

Microwave frequency (LO), in GHz.

The parameters in the `Opt`

structure define different settings for the calculation. The available fields are given below.

`IQ`

If set to

`Opt.IQ = 1`

(which is the default), then the output `IQ`

is complex-valued, containing both in-phase (real) and quadrature (imaginary) components. For `Opt.IQ = 0`

, only the in-phase component is returned, and the output `IQ`

is real.
`BWCompensation`

With

`Opt.BWCompensation = 1`

, the calculated pulse shape includes a compensation for the resonator bandwidth profile. This is available for `'rectangular/linear'`

, `'quartersin/linear'`

, `'sech/tanh'`

and `'sech/uniformQ'`

pulses. If selected, the parameters defining the resonator magnitude response function need to be defined (`Par.mwFreq`

, `Par.MagnitudeResponse`

and `Par.faxis`

, see above). Bandwidth compensation is turned off by default (`Opt.BWCompensation = 0`

).
`OverSampleFactor`

Oversampling factor for the automatic determination of the time step (default = 10).

Theoretical background

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 -*t*_{p}/2 to +*t*_{p}/2.

Amplitude modulation functions:

`'rectangular'`

:`'gaussian'`

:`'sinc'`

:`'sech'`

:`'WURST'`

:`'halfsin'`

:`'quartersin'`

:

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

*n*th order sech pulses 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`

.

If bandwidth compensation is requested, the frequency and amplitude modulation functions defined above are adjusted to compensate for the resonator profile 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). The phase modulation function is obtained by integration and the phase is set to zero at the center of the pulse.

See also

exciteprofile, evolve, rfmixer, saffron