batch_pepper#
- torchspin.batch_pepper(systems, exp, opt=None, *, weights=None, return_individual=True)[source]#
Simulate CW EPR spectra for multiple SpinSystems in batch.
Each system is simulated via
pepper()(full pipeline including SOPHE projection, strain, and calibrated normalization) and the results are stacked into a single tensor.- Parameters:
systems (Sequence[SpinSystem]) – List of SpinSystem objects to simulate.
exp (Experiment) – Shared experimental parameters (mwFreq, Range, nPoints, Harmonic).
opt (Options | None) – Computational options. Defaults to
Options().weights (Sequence[float] | None) – Per-system weights for summing. Defaults to each system’s
weightattribute (1.0 if not set). Only used whenreturn_individual=False.return_individual (bool) – If
True(default), return(x, spectra)wherespectra.shape == (N, nPoints). IfFalse, return(x, weighted_sum)whereweighted_sum.shape == (nPoints,).
- Returns:
x – Field axis in mT, shape
(nPoints,).spectra – If
return_individual=True:(N, nPoints)tensor. Ifreturn_individual=False:(nPoints,)weighted sum.
- Return type: