resfields_eig#

torchspin.resfields_eig(sys, mwFreq, *, Range=None, mwMode='perpendicular', Orientations=None, Opt=None)[source]#

Compute resonance fields using the eigenfield method.

Parameters:
  • sys (SpinSystem) – Spin system specification.

  • mwFreq (float) – Microwave frequency in GHz.

  • Range ((float, float), optional) – Field range [Bmin, Bmax] in mT. Default: [0, 1e6].

  • mwMode (str) – ‘perpendicular’ (default) or ‘parallel’.

  • Orientations (ndarray, shape (N, 3), optional) – Euler angles [alpha, beta, gamma] for each orientation. Default: single orientation along z ([0, 0, 0]).

  • Opt (EigOptions, optional) – Algorithm options.

Returns:

  • fields (ndarray or list of ndarray) – Resonance fields in mT. For single orientation, a 1D array. For multiple orientations, a list of arrays.

  • intensities (ndarray or list of ndarray) – Transition intensities (MHz²/mT²). Only returned if Opt.Threshold > 0 or if intensities would be useful.

Return type:

ndarray | Tuple[ndarray, ndarray]