eprload#
- torchspin.eprload(filename, scaling='')[source]#
Load experimental EPR data from file.
- Parameters:
filename (str or Path) – Path to the data file. Format is identified by extension: - Bruker BES3T: .DTA, .DSC - Bruker ESP/WinEPR: .spc, .par - SpecMan: .d01, .exp - Magnettech: .spe (binary), .xml (XML) - Active Spectrum: .ESR - Adani: .dat, .json - CIQTEK: .epr - JEOL: (auto-detected from header) - MAGRES: .PLT - qese/tryscore: .eco - Varian: .spk, .ref - ESE: .d00
scaling (str, optional) – Scaling options for Bruker files: - ‘n’: divide by number of scans - ‘P’: divide by square root of microwave power (mW) - ‘G’: divide by receiver gain - ‘T’: multiply by temperature (K) - Can combine: e.g. ‘nPG’ applies all three
- Returns:
x (ndarray) – Abscissa, in the units the file uses, exactly as EasySpin’s
eprloadreturns it — it is not converted. For Bruker BES3T and ESP/WinEPR field sweeps that is gauss, not millitesla; for Bruker ENDOR it is MHz, and for time sweeps seconds. Magnettech XML gives mT. For multi-dimensional data this is a list, one abscissa per dimension.The rest of torchspin works in mT (
Experiment.Range,Experiment.Field,SpinSystem.lw), so a Bruker field axis needs dividing by 10 before it is used to build anExperiment:B_G, spc, pars = eprload('spectrum.DTA') exp = Experiment(mwFreq=pars['MWFQ'] / 1e9, # Hz -> GHz Range=[B_G[0] / 10, B_G[-1] / 10], # G -> mT nPoints=B_G.size, Harmonic=1)
The file’s own unit string survives in params where the format records one (
params['XUNI']for BES3T).y (ndarray) – Ordinate (spectral intensity). A list of arrays when the file holds several datasets (BES3T
IKKFwith more than one entry).params (dict) – Dictionary of parameters from the parameter file, keys and values as the file spells them.
- Return type: