make_slr_pulse

Contents

make_slr_pulse#

pypulseqpp.make_slr_pulse()[source]#

Design an RF pulse using the Shinnar-Le Roux algorithm.

Parameters:
  • flip_angle (float) – Nominal flip angle (rad).

  • duration (float, default=DEFAULT_DURATION) – Pulse duration (s).

  • delay (float, default=0.0) – Delay before the pulse (s).

  • dwell (float, default=0.0) – RF sample spacing (s); 0 uses system.rf_raster_time.

  • freq_offset (float, default=0.0) – Frequency (Hz) and phase (rad) offsets.

  • phase_offset (float, default=0.0) – Frequency (Hz) and phase (rad) offsets.

  • center_pos (float, default=None) – Position of the effective centre within the pulse, in [0, 1]: the centre the event records and the point the rephaser refocuses from. None takes the magnitude peak of the designed waveform, as calc_rf_center() finds it.

  • slice_thickness (float, default=0.0) – Slice thickness (m); required when return_gz.

  • return_gz (bool, default=False) – Also return the selection gradient and its rephaser.

  • time_bw_product (float, default=DEFAULT_TIME_BANDWIDTH_PRODUCT) – Time-bandwidth product.

  • pulse_type ({'st', 'ex', 'se', 'inv', 'sat'}, default='st') – Small-tip, excitation, spin-echo, inversion or saturation.

  • filter_type ({'ls', 'pm', 'min', 'max', 'ms'}, default='ls') – FIR design method.

  • passband_ripple (float, default=0.01) – Ripple allowed in each band.

  • stopband_ripple (float, default=0.01) – Ripple allowed in each band.

  • cancel_alpha_phase (bool, default=False) – Remove the SLR alpha polynomial’s phase.

  • root_flip (bool, default=False) – Flip roots of the SLR beta polynomial to minimise peak B1 for the same profile magnitude (Sharma, Lustig and Grissom, 2016); the profile phase is no longer linear. Needs a pulse_type with a nominal flip and searches every subset of the passband’s roots. The pulse plays at its designed amplitude scaled by flip_angle over the nominal flip, not by area.

  • max_grad (float, default=0.0) – Override the system limits for the selection gradient.

  • max_slew (float, default=0.0) – Override the system limits for the selection gradient.

  • system (pypulseqpp.Opts, default=None) – System limits.

  • use (str, default='undefined') – Pulseq use tag.

  • freq_ppm (float, default=0.0) – Field-strength-relative offsets.

  • phase_ppm (float, default=0.0) – Field-strength-relative offsets.

Returns:

The pulse, or (rf, gz, gz_reph) when return_gz.

Return type:

RfEvent, or tuple

Raises:

ValueError – If duration spans fewer than four RF samples, center_pos is outside [0, 1], return_gz is asked for without a positive slice_thickness, or root_flip is asked of a small-tip pulse, alongside cancel_alpha_phase, or of a passband with more roots than an exhaustive search can visit.

Examples

>>> import numpy as np
>>> import pypulseqpp as pp
>>> system = pp.Opts(max_grad=40, grad_unit="mT/m", max_slew=150, slew_unit="T/m/s")
>>> rf, gz, gz_reph = pp.make_slr_pulse(
...     np.deg2rad(90), slice_thickness=5e-3, return_gz=True, system=system
... )
>>> rf.type, gz.channel
('rf', 'z')

See also

make_sinc_pulse

the windowed-sinc alternative.

sim_rf

simulate the profile the design actually produces.