check_hardware_constraints#

mrinufft.trajectories.utils.check_hardware_constraints(gradients: ndarray[tuple[int, ...], dtype[_ScalarType_co]], slewrates: ndarray[tuple[int, ...], dtype[_ScalarType_co]], acq: Acquisition | None = None, order: float | Literal['fro', 'nuc'] | None = None) tuple[bool, float, float][source]#

Check if a trajectory satisfies the gradient hardware constraints.

Parameters:
  • gradients (NDArray) – Gradients to check

  • slewrates (NDArray) – Slewrates to check

  • acq (Acquisition, optional) – Acquisition configuration to use for checking. If None, the default acquisition is used.

  • order (int or str, optional) – Norm order defining how the constraints are checked, typically 2 or np.inf, following the numpy.linalg.norm conventions on parameter ord. The default is None.

Returns:

  • bool – True if the trajectory satisfies the constraints, False otherwise.

  • float – Maximum gradient amplitude in T/m.

  • float – Maximum slew rate in T/m/ms.

Return type:

tuple[bool, float, float]