blochsteady#

torchspin.blochsteady(g, T1, T2, DeltaB0, B1, modAmp, modFreq, opt=None)[source]#

Compute the steady-state Bloch magnetization under sinusoidal field modulation.

Parameters:
  • g (float) – Electron g-value (scalar, S=1/2).

  • T1 (float) – Longitudinal relaxation time, µs.

  • T2 (float) – Transverse relaxation time, µs. Must satisfy T2 ≤ T1.

  • DeltaB0 (float) – Static field offset from resonance, mT. Positive = above resonance.

  • B1 (float) – Microwave field amplitude (rotating frame), mT.

  • modAmp (float) – Peak-to-peak modulation field amplitude, mT.

  • modFreq (float) – Modulation frequency, kHz.

  • opt (BlochOptions | None) – BlochOptions. None uses defaults.

Returns:

  • t (ndarray, shape (nPoints,)) – Time axis over one modulation period, µs.

  • Mx (ndarray, shape (nPoints,)) – Dispersion (in-phase) component of transverse magnetization.

  • My (ndarray, shape (nPoints,)) – Absorption (quadrature) component of transverse magnetization.

  • Mz (ndarray, shape (nPoints,)) – Longitudinal magnetization.

Return type:

Tuple[ndarray, ndarray, ndarray, ndarray]

Notes

The field modulation is Bmod(t) = (modAmp/2) · cos(ωm·t), so modAmp is the peak-to-peak amplitude. The steady-state Mx, My, Mz are periodic with period T = 1/modFreq.

M0 (equilibrium magnetization) is normalized to 1.

Examples

>>> from torchspin.blochsteady import blochsteady
>>> t, Mx, My, Mz = blochsteady(g=2.0, T1=10.0, T2=1.0,
...                              DeltaB0=0.0, B1=0.01,
...                              modAmp=0.5, modFreq=100.0)