Difference between revisions of "Sech pulse.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Restore pre-bulk-edit wiki content)
(Normalise sequential blank lines)
Line 47: Line 47:
 
==See also==
 
==See also==
 
[[Kernel_functions#Shaped_pulses_and_gradients|Shaped pulses and gradients]]
 
[[Kernel_functions#Shaped_pulses_and_gradients|Shaped pulses and gradients]]
 
  
 
''Version 2.9, authors: [[Ilya Kuprov]]''
 
''Version 2.9, authors: [[Ilya Kuprov]]''

Revision as of 12:30, 25 April 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)

Arguments

    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