Software Description
ComTec GmbH
5-20
5.1.12. File formats
The
.mpa
format is used to save all spectra in a single file. It starts with an ASCII header
containing the settings and then the spectra follow one after the other, each proceeded with a
header line like
[TDAT0,4096]
(This means the first single spectra with a length of 4096 channels.)
[TDAT1,4096]
(This means the second single spectra...)
[CDAT0,16384]
(This is the first dual parameter or calculated spectra with a length of 16384 channels. The
enumeration starts again at zero after all "physical" spectra.)
The format of the data itself can be ASCII, binary, or CSV (see below). Individual spectra can also
be saved into single files. If "separate header" is checked in the data operations dialog, such
spectra data is written into two separate files, one with extension
.mp
containing configuration
data and one containing pure spectra data with an extension indicating the chosen format. The
.mp
file contains the settings in ASCII format using the control language described in section 5.2
Spectra data files with extension
.asc
contain in each line one decimal number in ASCII
containing the corresponding count value in the histogram.
Binary data files with extension
.dat
are written with 4 bytes per data value, as usual in the Intel
world in reverse order i.e. the least significant byte comes first.
Another ASCII file format is the x y format with extension
.csv
. It can be read for example with
Excel and contains the channel number and content as two decimal numbers in ASCII per line
separated by a TAB character.
List files have the extension
.lst
and start with a header containing the usual report and
configuration data in ASCII as in the .mpa or .mp files. The header ends with a line containing
[DATA]. Immediately before the [DATA] label there is a line time_patch= and some comment lines
that describe the data length and the meaning of the data bits.
Then follows the data, depending on the format chosen for the data file either in ASCII or binary.
In ASCII format one data word is written in hex format per line. In binary format each stop event is
written with 2, 4, 6 or 8 bytes as specified in the comment lines. As usual in the Intel world in the
reverse order, i.e. the least significant byte comes first.