Difference between revisions of "Sech pulse.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Rename Arguments section heading to Parameters)
Line 6: Line 6:
 
     [Cx,Cy,time_grid,amps,phis]=sech_pulse(peak_ampl,freq_mod,phase_mod,dur,npts)
 
     [Cx,Cy,time_grid,amps,phis]=sech_pulse(peak_ampl,freq_mod,phase_mod,dur,npts)
  
==Arguments==
+
==Parameters==
  
 
     peak_amp  - peak amplitude, rad/s
 
     peak_amp  - peak amplitude, rad/s

Revision as of 18:52, 5 June 2026

Hyperbolic secant pulse in Cartesian and amplitude-phase representation.

Syntax

    [Cx,Cy,time_grid,amps,phis]=sech_pulse(peak_ampl,freq_mod,phase_mod,dur,npts)

Parameters

    peak_amp  - peak amplitude, rad/s

    freq_mod  - frequency modulation parameter, rad/s

    phase_mod - phase modulation parameter, dimless

    dur       - pulse duration, seconds

    npts      - number of digitisation points

Outputs

    Cx        - a vector of coefficients in front of Sx
                spin operator at each time slice, rad/s

    Cy        - a vector of coefficients in front of Sy
                spin operator at each time slice, rad/s

    time_grid - a vector of time grid points, seconds

    amps      - a vector of pulse amplitudes at each ti-
                me slice, rad/s

    phis      - a vector of pulse phases at each time 
                slice (phi=0 at t=0 in the centre), rad

Examples

The following Matlab code

    [Cx,Cy,time_grid]=sech_pulse(1,672,5,10.24e-3,1000);
    plot(time_grid,[Cx; Cy]); kgrid; xlim tight;
    kxlabel('time, seconds'); kylabel('amplitude, rad/s');

yields:

Sech pulse.png

See also

Shaped pulses and gradients

Version 2.9, authors: Ilya Kuprov