Save 1D spectral data in Bruker BES3T format.
eprsave(FileName,x,data) eprsave(FileName,x,data,Title) eprsave(FileName,x,data,Title,mwFreq)
This function saves one- or two-dimensional data given by x
(abscissa values) and data
(data values) in a set of .DTA and .DSC files than can be read by Bruker software (Xepr, Xenon). The .DTA data file contains the data in binary format, and the .DSC description file contains information about the dataset in a readable text format.
FileName
is the base filename without the extension, e.g. FileName = 'peter'
would result in files peter.DTA
and peter.DSC
.
data
can be real or complex, and can be one-dimensional (a vector) or two-dimensional (a matrix). If data
is two-dimensional, then x
is expected to be a 2-element cell array containing the x and the y axis: {x,y}
.
Any character array provided in the optional Title
will be stored along the data and read by the Bruker software as the display title of the dataset.
The microwave frequency (in GHz) can be supplied via the optional mwFreq
and will be saved in the .DSC file.
To generate a simple Gaussian line and save it in Bruker BES3T format
B = linspace(300,400,1001); spc = gaussian(x,340,20,1); eprsave('mygauss',B,spc);
To store a simulated spectrum including a title and the microwave frequency
Sys.g = 2; Sys.lwpp = 0.6; Exp.mwFreq = 9.56; Exp.Range = [330 350]; [B,spc] = pepper(Sys,Exp); eprsave('mysim',B,spc,'simple simulation',Exp.mwFreq);
Storing a two-dimensional dataset works like this
n1 = 40; n2 = 100; dt = 0.002; t1 = (0:n1)*dt; t2 = (0:n2)*dt; data = rand(n1,n2); eprsave('mysim',{t1,t2},data);