PEST - Public EPR Software Tools National Institute of Environmental Health Sciences Description of NIEHS binary EPR file format ------------------------------------------- The code for the file handling is written in C. It is the very first C code I wrote so it may not be beautiful. The file format uses a header so it can be expanded easily. What follows is a short description of the variables. char fname[] ascii text file name double ddata[] double precision data array float fpar[] single precision parameter array char fstring[][STRSIZE] string parameter array char fnote0[] string comment #1 char fnote1[] string comment #2 char fnote2[] string comment #3 The first four bytes of the file are an identfier. ESRS First file format ESR2 Second file format, added the two extra comment strings. Array notation -------------- fpar [0] unused [1] scan range in Gauss [2] field center in G. [3] number of data points [4] screen display x scale factor [5] screen display y scale factor [6] screen display x offset value, in data points [7] screen display y offset value, in data points [8] first data point to be displayed [9] last data point to be displayed [10] scan time in seconds The next two parameters are store but I haven't actually come up with a use for them yet. Not necessary. [11] FT counter, 0= cw spectrum [12] FT combine value, for combine Real and Imag. components The next three parameters are only used when the data represents both the epr scan and some other data simultaneously acquired. Not necessary. [13] split (double) scan Y offset, from 1 to 9, screen units [14] split scan gain, relative to main scan [15] split scan delay (X offset) in data points [16] - [20] unused The next parameters are stored as text since, with a Varian, they are input from the keyboard bye the user. Each array string is has length STRSIZE. fstring [0] unused [1] filename ( outdated by long filenames ) [2] unused ( outdated by comment strings) [3] mod amp [4] mod frequency [5] time constant [6] receiver gain [7] scan range (yes it is redundant) [8] field center (yes it is redundant) [9] microwave power [10] microwave frequency The next four parameters are generated by the acquisition program, not by keyboard input. [11] date [12] time of day [13] scam time in seconds [14] number of scans [15] sample temperature [16] M=magnet scan, K=kinetic scan [17] split (double) scan identifier [18] - [20] unused fnote0 60 character comment string fnote1 60 character comment string fnote2 60 character comment string -------------------------------------------------------- Note: You may notice that the code always specifies how many bytes are written into or read from the file. This is done so that the file is independent of the operating system used: this code will work equally well compiled as a DOS, OS/2, or NT program. It would also work without change on any Unix system that uses the same byte ordering as the Intel chips, such as a DEC Alpha. The SGI Irix system uses a different byte order, for instance. This implies that the on Irix the programmer would need to invert the order of the bytes in the ddata and fpar arrays. ASCII files were of course invented just for the pupose of moving data between different types of computers. Also, the ddata array does not need to be double, it's just the way I have it programmed. The data is in fact stored as a four byte floating point number in the disk file. If anyone has any questions I would be happy to answer them. -- Dave Duling tel. 919-541-3381 email. duling@niehs.nih.gov