eprload

Load spectral data from files in common EPR data formats.

Syntax
eprload(FileName)
y = eprload(FileName)
[x,y] = eprload(FileName)
[x,y,Params] = eprload(FileName)
[x,y,Params,FileN] = eprload(FileName)
eprload
... = eprload
... = eprload(FileName,Scaling)
Description

This function loads real or complex spectral data from files in common data formats of EPR spectrometers.

FileName is the filename to be loaded. If FileName is just a file name without a directory ('mydata.DSC'), eprload looks for it in Matlab's current directory. FileName can also include the full path to the file (C:\mydata\sample5\mydata.DSC'). If FileName is a directory, a file selection dialog box is displayed. If no FileName is given, the current directory is used as default.

x contains the x axis data (the magnetic field, time, frequency axis), y contains the spectral data, Params is a structure containing the entries from the associated parameter file (if it exists), and FileN is the name of the loaded file including the full path. If no output parameter is given, the loaded data are plotted.

If the spectrum is two-dimensional, then x contains both axes. x{1} is the first axis, and x{2} is the second axis.

All string fields in Params containing numbers are converted to numbers. E.g., Params.XPTS='1024' is converted to Params.XPTS=1024. In addition, 'True' is converted to 1, and 'False' is converted to 0.

Formats are identified by the extension of the file name specified in FileName, which can be either the data file or the parameter file extension. If no extension is given, eprload tried several extensions. The following commercial formats are supported:

FormatData file extensionParameter file extension
Bruker BES3TDTADSC
Bruker ESP, WinEPRspcpar
SpecMand01exp
Magnettech (binary)spe-
Magnettech (xml)xml-
Active SpectrumESR-
Adanidat-
Adani JSONjson-
JEOL(variable)-

In addition, several older academic file formats are supported:

Varianspk,res-
qese, tryscoreECO-
MAGRESPLT-
ESE WIS/ETHd00exp

Depending on the nature of the data, a real or complex 1D, 2D or 3D array is returned in y.

Note that BES3T files stored in ASCII format cannot be read by eprload. In this case and for any other plain ASCII formats use MATLAB's textread function.

Scaling is a string of one-letter codes that instructs eprload to scale the spectral data. The codes are:

For example, 'nGP' would scale the spectrum by the number of scans, the receiver gain, and the square root of the microwave power.

If Scaling is omitted, no scaling is performed. Currently, Scaling is only supported for Bruker par/spc files.

Examples

To load and display a one-dimensional CW EPR spectrum stored in BES3T format in the files myspec.DTA and myspec.DSC, type

[B,spec,pars] = eprload('myspec.DTA');
plot(B,spec);

To load and display a two-dimensional data set stored in BES3T format in the files myspec2d.DTA and myspec2d.DSC, use

[x,data] = eprload('myspec2d.DTA');
axis1 = x{1};     % first axis, e.g. magnetic field
axis2 = x{2};     % second axis, e.g. time or temperature
plot(axis1,data);

If you want to display the data only without retrieving the data, use

eprload('myspec.DTA');
See also

eprsave