estimate_parameters#
- torchspin.estimate_parameters(B, spc, mwFreq, nSpecies=1, prominence=0.1)[source]#
Automatically estimate initial parameters from EPR spectrum.
This function analyzes a derivative EPR spectrum to extract: - g-values from peak positions - Linewidths from peak widths - Suggested field range for simulation
- Parameters:
- Returns:
params (dict) – Dictionary containing: - ‘g’: Estimated g-tensor (sorted high to low) - ‘lwpp’: Estimated linewidth [Gaussian, Lorentzian] in mT - ‘Range’: Suggested field range [min, max] in mT - ‘CenterSweep’: Suggested [center, sweep] in mT - ‘giso’: Isotropic g-value - ‘peaks’: Dictionary with peak analysis details
- Return type:
Examples
>>> B, spc, params = eprload('mydata.DTA') >>> B = B / 10.0 # Convert Gauss to mT >>> est = estimate_parameters(B, spc, params['MWFQ']/1e9) >>> print(f"Estimated g: {est['g']}") >>> print(f"Estimated linewidth: {est['lwpp']} mT")
Notes
Works best for well-resolved derivative spectra
For overlapping lines, may underestimate number of features
Linewidth estimates assume Gaussian broadening