larmorfrq#

torchspin.larmorfrq(Nucs, Fields)[source]#

Compute nuclear Larmor frequencies (MHz) at given field(s) (mT).

Parameters:
  • Nucs (Union[str, list]) – Nuclear isotope symbol(s). Either a string '14N', a comma-separated string '1H,14N', or a list ['1H', '14N'].

  • Fields (Union[float, 'array-like']) – Magnetic field(s) in mT. Scalar or array.

Returns:

freqs (ndarray, shape (nFields, nNuclei)) – Larmor frequencies in MHz. Positive (sign convention: absolute value of g_n used, same as EasySpin).

Return type:

np.ndarray

Examples

>>> larmorfrq('1H', 340.0)    # 1H Larmor at 340 mT ≈ 14.47 MHz
>>> larmorfrq('1H,14N', [300, 350])