rf_definition#

blochsim.rf_definition()[source]#

Return the RF definition of a pulse envelope.

The envelope is rescaled so that it integrates to 1 / (2 pi) seconds, making an event amplitude in radians the flip angle in radians. The waveform’s own phase is kept.

Parameters:
  • waveform (array-like) – Complex envelope in arbitrary amplitude units, (samples,) or (channels, samples).

  • dwell_s (float) – Sample duration, in seconds.

  • bandwidth_hz (float, default=0.0) – Pulse bandwidth, in Hz. Non-zero makes the pulse slice-selective.

  • definition_id (int, default=0) – Identifier events name the pulse by.

  • band_frequency_offsets_hz (sequence of float, default=None) – Band centres of a multiband pulse, in Hz; one to eight values. None is one band at 0 Hz.

  • band_bandwidth_hz (float, default=None) – Bandwidth of one band, in Hz. None is bandwidth_hz.

  • rf_raster_time_s (float, default=1e-6) – RF raster the sample times are expressed in, in seconds.

Returns:

Normalized envelope as magnitude and phase (in cycles) shapes on the sample times 0, dwell_s, 2 dwell_s, ....

Return type:

RfDefinition

Raises:

ValueError – If the envelope is empty, dwell_s or rf_raster_time_s is not positive, the band count is outside one to eight, or the waveform integrates to zero.

Examples using blochsim.rf_definition#

2. Advanced physics

2. Advanced physics