deepmr.bloch.fse

Contents

deepmr.bloch.fse#

deepmr.bloch.fse(flip, phases, ESP, T1, T2, sliceprof=False, diff=None, device='cpu', **kwargs)[source]#

Simulate a Fast Spin Echo sequence.

Parameters:
  • flip (float | np.ndarray | torch.Tensor) – Flip angle in [deg] of shape (npulses,) or (npulses, nmodes).

  • phases (float | np.ndarray | torch.Tensor) – Refocusing angle phases in [deg] of shape (npulses,) or (npulses, nmodes).

  • ESP (float) – Echo spacing in [ms].

  • T1 (float | np.ndarray | torch.Tensor) – Longitudinal relaxation time for main pool in [ms].

  • T2 (float | np.ndarray | torch.Tensor) – Transverse relaxation time for main pool in [ms].

  • sliceprof (float | np.ndarray | torch.Tensor) – Excitation slice profile (i.e., flip angle scaling across slice). If False, pulse are non selective. If True, pulses are selective but ideal profile is assumed. If array, flip angle scaling along slice is simulated. Defaults to False.

  • spoil_inc (float, optional) – RF spoiling increment in [deg]. Defaults to 117°.

  • diff (str | tuple[str], optional) – String or tuple of strings, saying which arguments to get the signal derivative with respect to. Defaults to None (no differentation).

  • device (str) – Computational device (e.g., cpu or cuda:n, with n=0,1,2...). Defaults to cpu.

  • nstates (int, optional) – Maximum number of EPG states to be retained during simulation. High numbers improve accuracy but decrease performance. Defaults to 10.

  • max_chunk_size (int, optional) – Maximum number of atoms to be simulated in parallel. High numbers increase speed and memory footprint. Defaults to natoms.

  • verbose (bool, optional) – If True, prints execution time for signal (and gradient) calculations. Defaults to False.

  • B1sqrdTau (float, optional) – Refocusing pulse energies in [uT**2 * ms] when flip = 1.0 [deg].

  • exc_flip (float) – Excitation flip angle. Defaults to 90 [deg].

  • exc_B1sqrdTau (float) – Excitation pulse energy in [uT**2 * ms].

  • grad_tau (float, optional) – Gradient lobe duration in [ms].

  • grad_amplitude (float, optional) – Gradient amplitude along unbalanced direction in [mT / m]. If total_dephasing is not provided, this is used to compute diffusion and flow effects.

  • grad_dephasing (float, optional) – Total gradient-induced dephasing across a voxel (in grad direction). If gradient_amplitude is not provided, this is used to compute diffusion and flow effects.

  • voxelsize (str | list | tuple | np.ndarray | torch.Tensor, optional) – Voxel size (dx, dy, dz) in [mm]. If scalar, assume isotropic voxel. Defaults to None.

  • grad_orient (str | list | tuple | np.ndarray | torch.Tensor, optional) – Gradient orientation ("x", "y", "z" or versor). Defaults to "z".

  • slice_orient (str | list | tuple | np.ndarray | torch.Tensor, optional) – Slice orientation ("x", "y", "z" or versor). Ignored if pulses are non-selective. Defaults to "z".

  • B1 (float | np.ndarray | torch.Tensor , optional) – Flip angle scaling factor (1.0 := nominal flip angle). Defaults to None.

  • B0 (float | np.ndarray | torch.Tensor , optional) – Bulk off-resonance in [Hz]. Defaults to None

  • B1Tx2 (float | np.ndarray | torch.Tensor) – Flip angle scaling factor for secondary RF mode (1.0 := nominal flip angle). Defaults to None.

  • B1phase (float | np.ndarray | torch.Tensor) – B1 relative phase in [deg]. (0.0 := nominal rf phase). Defaults to None.

  • T2star (float | np.ndarray | torch.Tensor) – Effective relaxation time for main pool in [ms]. Defaults to None.

  • D (float | np.ndarray | torch.Tensor) – Apparent diffusion coefficient in [um**2 / ms]. Defaults to None.

  • v (float | np.ndarray | torch.Tensor) – Spin velocity [cm / s]. Defaults to None.

  • chemshift (float | np.ndarray | torch.Tensor) – Chemical shift for main pool in [Hz]. Defaults to None.

  • T1bm (float | np.ndarray | torch.Tensor) – Longitudinal relaxation time for secondary pool in [ms]. Defaults to None.

  • T2bm (float | np.ndarray | torch.Tensor) – Transverse relaxation time for main secondary in [ms]. Defaults to None.

  • kbm (float | np.ndarray | torch.Tensor) – Nondirectional exchange between main and secondary pool in [Hz]. Defaults to None.

  • weight_bm (float | np.ndarray | torch.Tensor) – Relative secondary pool fraction. Defaults to None.

  • chemshift_bm (float | np.ndarray | torch.Tensor) – Chemical shift for secondary pool in [Hz]. Defaults to None.

  • kmt (float | np.ndarray | torch.Tensor) – Nondirectional exchange between free and bound pool in [Hz]. If secondary pool is defined, exchange is between secondary and bound pools (i.e., myelin water and macromolecular), otherwise exchange is between main and bound pools. Defaults to None.

  • weight_mt (float | np.ndarray | torch.Tensor) – Relative bound pool fraction. Defaults to None.