read_girf#
- mrinufft.io.read_girf(filename: str | Path, fmax: float | None = None) tuple[NDArray, NDArray][source]#
Read a gradient impulse response function (GIRF) exported at NeuroSpin.
The file is a MATLAB file holding
f, the frequencies in kHz, andgirf, the transfer functions with shape(3, n_terms, n_freqs): for each gradient axis of the scanner, the response of the spherical harmonic terms measured by the field camera, ordered as(B0, x, y, z, ...). See Gradient Impulse Response Function (GIRF) for the terms and their units.- Parameters:
- Returns:
freqs (NDArray) – Frequencies in Hz, from 0. Shape
(n_freqs,).girf (NDArray) – One-sided transfer functions, averaged between positive and negative frequencies so that the impulse response is real. Shape
(3, n_terms, n_freqs).
- Return type:
tuple[NDArray, NDArray]
See also