fieldmod#

torchspin.fieldmod(B, spc, mod_amp, harmonic=1)[source]#

Simulate the effect of field modulation on an absorption EPR spectrum.

Parameters:
  • B (array_like) – Magnetic field axis (mT), uniformly spaced.

  • spc (array_like) – Absorption spectrum (same length as B).

  • mod_amp (float) – Peak-to-peak modulation amplitude (mT). Must be > 0.

  • harmonic (int, optional) – Detection harmonic (0, 1, 2, …). Default 1.

Returns:

spc_mod (ndarray) – Pseudo-modulated spectrum (real part, in-phase component).

Return type:

ndarray

Notes

Uses FFT-based convolution with the Jacobi–Anger Bessel function kernel (Kaelin & Schweiger 2003):

spc_mod = IFFT( FFT(spc) · J_h(2π·Ampl·S) ) · i^h

where Ampl = mod_amp / (2 · dx) and S = k / NN for k = 0, …, NN-1.