saffron#
- torchspin.saffron(sys, exp, opt=None)[source]#
Simulate pulse EPR signals and spectra.
- Parameters:
sys (SpinSystem)
exp (PulseExperiment)
opt (SaffronOptions, optional)
- Returns:
x (ndarray or list of ndarray) – Time or frequency axes.
signal (ndarray) – Simulated signal (time domain; complex) or ENDOR spectrum. When the spin system carries tensors that require grad,
signalandinfo['td']/info['fd']are torch tensors on the autograd graph instead.info (dict) – Contains the
'td'and'fd'fields.
- Return type:
Notes
Opt.SimulationModeselects the engine, as in EasySpin:'fast'is the ideal-pulse algorithm implemented here,'thyme'the real-pulse density-matrix engine intorchspin.saffron_thyme.saffron_thyme. Left unset, the engine is inferred: real pulses (nonzeroExp.tp), a list-valuedExp.Sequenceor anExp.DetWindowselect'thyme'.The real-pulse engine has a different output contract – one detected point per increment for single-point detection, with the transient axis appended to the indirect axes otherwise – and requires
Exp.mwFreq. See its docstring.