effective_te

Contents

effective_te#

blochsim.trains.effective_te()[source]#

Contrast-equivalent echo time of every echo of a refocusing train.

The echo of a train of reduced flip angles has decayed less than its echo time says, because part of its history was spent stored along z. Its contrast-equivalent echo time is the time a spin echo would need for the same T2 decay: -T2 * log(S / S0), with S the echo of a reference tissue and S0 the same echo without relaxation.

Parameters:
  • flip (array-like) – Refocusing flip angles, in degrees, shape (..., echoes), each in [0, 180].

  • ESP (float) – Echo spacing, in ms.

  • first_ESP (float, default=None) – Time from the excitation to the first echo, in ms; ESP by default.

  • T1 (float, default=1000.0) – Longitudinal relaxation time of the reference tissue, in ms.

  • T2 (float, default=100.0) – Transverse relaxation time of the reference tissue, in ms.

  • threads (int, default=0) – Threads to spread the trains over; 0 sizes the pool to the batch.

  • flip_tangents (array-like, default=None) – Directions to differentiate along, in degrees, shape (directions, ..., echoes): each a change of flip. Asks for the exact derivatives as well.

Returns:

  • TE (numpy.ndarray) – Contrast-equivalent echo times, in ms, shaped like flip. An echo with no signal has none, and is nan.

  • TE_tangents (numpy.ndarray) – Only with flip_tangents: the derivative of TE along each direction, in ms per degree, shaped like flip_tangents.

Raises:

ValueError – If an angle is outside [0, 180] degrees, the timing or the relaxation times are not positive and finite, or the tangents are not shaped as described.

Notes

The train is the one prescribed_flips() designs: an ideal 90 degree excitation of fully relaxed magnetization and instantaneous CPMG refocusing, with no slice profile, off-resonance or transmit variation. The value depends on the reference tissue; at 180 degrees it is the echo time itself.

Examples

>>> import numpy as np
>>> from blochsim.trains import effective_te
>>> bool(np.allclose(effective_te([180.0] * 3, 4.0), [4.0, 8.0, 12.0]))
True