make_hard_pulse

make_hard_pulse#

pulserver.blocks.make_hard_pulse(system, flip_angle, duration=0.0005, bandwidth=None, time_bw_product=None, freq_offset=0, phase_offset=0, use='excitation')[source]#

Create a block (RECT or hard) pulse.

Define duration, or bandwidth, or bandwidth and time_bw_product. If none are provided a default 4 ms pulse will be generated.

Parameters:
  • system (Opts) – System limits.

  • flip_angle (float) – Flip angle in degrees.

  • duration (float, optional) – Duration in seconds (s). The default is 0.5e-3 s.

  • bandwidth (float, optional) – Bandwidth in Hertz (Hz). If supplied without time_bw_product duration = 1 / (4 * bandwidth)

  • time_bw_product (float, optional) – Time-bandwidth product. If supplied with bandwidth, duration = time_bw_product / bandwidth

  • freq_offset (float, optional) – Frequency offset in Hertz (Hz). The default is 0.0.

  • phase_offset (float, optional) – Phase offset Hertz (Hz). The default is 0.0.

  • use (str, optional) – Use of radio-frequency pulse. Must be one of "excitation" (default), "refocusing" or "inversion".

Returns:

rf_block – Dictionary with the following keys:

  • rfSimpleNamespace

    Radio-frequency block pulse event.

Return type:

dict

Raises:

ValueError – If invalid use parameter is passed. One of bandwidth or duration must be defined, but not both. One of bandwidth or duration must be defined and be > 0.