generate_girf#

mrtwin.generate_girf(dt, N, fwhm, delay)[source]#

Generate an approximate Gradient Impulse Response Function (GIRF).

The GIRF is approximated as a complex-valued array, whose magnitude (modeled) as a Gaussian of the specified Full Width Half Maximum, which dampens high-frequency components of the k-space trajectory, and whose phase is a linear ramp representing a non-integer shift of the waveform.

The response is modeled independently for the three physical axes z, y, x.

Parameters:
  • dt (float) – Gradient raster time (in seconds).

  • N (int) – Length of the GIRF.

  • fwhm (float | Sequence[float]) – Width in Hz of the magnitude response of the gradient system for the three axes z, y, x. If it is a scalar, assume the same delay for all the axes.

  • delay (float | Sequence[float]) – Non-integer delay (in seconds) for the three axes z, y, x. If it is a scalar, assume the same delay for all the axes.

Returns:

A tuple containing: - The frequency axis (in Hz) as a NumPy array. - Complex GIRF of shape (3, N).

Return type:

tuple[np.ndarray, np.ndarray]

Notes

Typical values for gradient raster times dt are around 5-10 us (GE: 4us; Siemens: 10us; Philips: 6.4us)

GIRF magnitudes Full Width Half Maximum are on the order of 5 kHz, while gradient delays are on the order of 1us.

GIRF for the x and y axes are more similar to each other when compared to z axes.

GIRF is typically measured (via thin slice method or dynamic field camera) with a time window T around 100ms (N = T / dt).

Examples

>>> from mrtwin import generate_girf

Assuming same fwhm and delay for each axes, we have:

>>> freqs, girf = generate_girf(4e-6, 25000, 5.0e3, 1.1e-6)

Examples using mrtwin.generate_girf#

Gradien System Response Function Generation

Gradien System Response Function Generation