mhz2mt#

torchspin.mhz2mt(mhz, g=GFREE)[source]#

Convert frequency in MHz to resonance field in mT.

Uses the resonance condition B [mT] = hν / (g μ_B) with the sign convention matching EasySpin: g is positive.

Parameters:
  • mhz (Union[float, 'array-like']) – Frequency in MHz (scalar or array).

  • g (float) – g-factor. Defaults to the free-electron g-factor.

Returns:

B (ndarray) – Resonance field in mT.

Return type:

np.ndarray

Examples

>>> mhz2mt(9500.0)           # X-band, free electron ≈ 338.9 mT
>>> mhz2mt(9500.0, g=2.0)