Pattern: Shape Generator
Introduced in version 3.8.0
When shape selection is Expression with 5 parameters, the pulse shape will be generated from the provided expression.
Variables and functions are complex. Calculations are performed with time resolution provided by AWG. IMPORTANT: Trigonometric functions are defined in fractions of 2*pi, not radians, e.g. sin(0.25) = 1. Hyperbolic functions have standard definitions.
Built-in variables
t— absolute time within pulse sequence (vector)t0— time from the beginning of the pulse (vector)tp— pulse length (scalar)j— complex unit (0 + 1j, scalar)par1…par5— parameters specified in PPL (scalars)
Built-in functions
cos(x)—cos(2*pi*x)cosinesin(x)—sin(2*pi*x)sinetan(x)—tan(2*pi*x)tangentsec(x)—sec(2*pi*x)secantexp(x)—exp(2*pi*x)complex exponent (useexp(j*t*f)syntax for IQ)cosh(x)—cosh(x)hyperbolic cosinesinh(x)—sinh(x)hyperbolic sinetanh(x)—tanh(x)hyperbolic tansech(x)—sech(x)hyperbolic secexph(x)—exp(x)complex exponent (2*pi factor is not used)gaussian(x,x0,w)— Gaussian with width w centered at x0sinc(x,x0,tp)— sinc with first lobe at2/tpcentered at x0chirp(x,fw,tp)— linear frequency sweep of widthfwspread overtp, no carrierchirp(x,f0,fw,tp)— the same sweep around carrier frequencyf0wurst(x,fw,tp,n)— WURST: the same sweep with the smoothly truncated WURST envelope of powern, no carrierwurst(x,f0,fw,tp,n)— the same pulse around carrier frequencyf0
Introduced in version 3.8.7
chirp sweeps the instantaneous frequency from -fw/2 at x = 0 to +fw/2 at x = tp, which is the phase of the built-in Chirp shape. Keep the carrier out of it (3 arguments) and write it as exp(j*par1*t) when the pulse has to stay phase coherent with the rest of the sequence — the sweep itself is referenced to the pulse start, t0, while the carrier is referenced to t.
wurst is that sweep multiplied by the WURST amplitude 1-|cos(pi*x/tp)|^n, reproducing the built-in WURST shape. The envelope is zero at both pulse edges and flattens near the top as n grows; n is limited to the 1…100 range of the built-in shape. Carrier handling is the same as for chirp. Setting fw to 0 removes the sweep and leaves the bare envelope, which is useful as a soft-edged replacement for a square pulse.
Example:
exp(j*par1*t) * sin(0.5*t0/tp) - IQ RF pulse sin(par1*t) * gaussian(t0, 0.5*tp, 0.1*tp) - Gaussian RF pulse exp(j*par1*t) * sinc(t0, tp/2, tp) - Sinc RF pulse exp(j*par1*t) * chirp(t0, par2, tp) - chirp, par1 carrier, par2 sweep width chirp(t0, par1, par2, tp) - chirp, phase referenced to the pulse gaussian(t0, tp/2, tp/6) * exp(j*par1*t) * chirp(t0, par2, tp) - apodized chirp exp(j*par1*t) * wurst(t0, par2, tp, 20) - WURST, par1 carrier, par2 sweep width wurst(t0, par1, par2, tp, 20) - WURST, phase referenced to the pulse exp(j*par1*t) * wurst(t0, 0, tp, 20) - WURST envelope only, no sweep
See also

