convert_gradients_to_slew_rates#
- mrinufft.trajectories.utils.convert_gradients_to_slew_rates(gradients: ndarray[tuple[int, ...], dtype[_ScalarType_co]], acq: Acquisition | None = None, raster_time: float | None = None) tuple[ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]][source]#
Derive the gradients over time to provide slew rates.
- Parameters:
gradients (NDArray) – Gradients over 2 or 3 directions.
acq (Acquisition, optional) – Acquisition configuration to use. If None, the default acquisition is used.
raster_time (float) – Raster time in seconds
- Returns:
slewrates (NDArray) – Slew rates corresponding to gradients.
initial_gradients (NDArray) – Gradients at the beginning of the readout window.
- Return type:
tuple[ndarray[tuple[int, …], dtype[_ScalarType_co]], ndarray[tuple[int, …], dtype[_ScalarType_co]]]