pepper_autograd#

torchspin.pepper_autograd(sys_or_list, exp, opt=None)[source]#

Rigid-limit powder CW EPR spectrum, identical to torchspin.pepper() (matrix method, no strain) and differentiable with respect to every spin-system tensor that requires_grad (g, A, D, lw/lwpp …).

Accepts a single SpinSystem or a list of components. As in pepper, every component is expanded into its isotopologues (natural abundance for element names such as 'Zr', or Sys.Abund) and the spectra are summed with weight Sys.weight × abundance. The abundances are constants, so the sum stays on the graph. torchspin.pepper() calls this function itself when any input requires grad.

Returns (B, spec): field axis (mT) and spectrum on the autograd graph.