GSI Exchange Format (GEF)
| GSI Biophysics | command subsystem |

GSI Exchange Format (GEF)

A bit of history

The GEF file format was invented by the GSI data analysis group (M.Dahlinger, B.Dechant, H.Döbbeling, H.Göringer) in the 1993/94 timeframe to facilitate exchange of histogram and scatter plot data between the then existing data analysis packages GOOSY, PAW/HBOOK, and SATAN.
Originally GEF comprised Only data structures which approximately exist in all three packages are supported, i.e. only one- and two-dimensional histograms. N-tuples, variably binsized spectra, projections, HBOOK error data, are not supported. (The original idea apparently was that everything would move to CERN software anyway, so emphasis was laid on exporting data from, and not on importing data into the GSI packages).
Most of the above items have now slipped into oblivion. The GEF format, however, still may serve as an exchange format between different Data Acquisition Systems. Hence it is supported by the latest UNIX based versions of SATAN and gd

Description

GEF files are coded in ASCII, records are of variable length with a maximum length of 80 bytes. Thus the files can be typed, edited, mailed, zipped and printed without too much hassle.
The recommended (not mandatory) file name extension is .gef.
GEF files consist of comment lines, command lines and data lines:
// <comment>
/* <command>
<data>
Comment lines may appear anywhere in a GEF file, except between data lines. A comment line in the data portion will terminate the stream of histogram data for the current histogram.
Command lines have the syntax
/* <keyword>=<value>
Unknown keywords are ignored.
A command line in the data portion will terminate the stream of histogram data for the current histogram.
The first command line must be a creator line, e.g. one of the following
/* CREATOR=GOOSY
/* CREATOR=PAW
/* CREATOR=SATAN
/* CREATOR=SGD
Other possible commands are:
/* SPECTRUM    = <name>           spectrum name, required 
/* DIM         = { 1 | 2 }        one-dimensional histogram or two-dimensional scatter plot      
/* TYPE        = { I | L | R }    2-byte integer, 4-byte integer or 4-byte real per channel
/* CHANNELS(1) = <# channels x>   integer, number of channels in 1st dimension      
/* CHANNELS(2) = <# channels y>   integer, number of channels in 2nd dimension      
/* LOWEDGE(1)  = <xmin>           float, lower edge of first channel in 1st dimension 
/* LOWEDGE(2)  = <ymin>           float, lower edge of first channel in 2nd dimension
/* BINSIZE(1)  = <xbin>           float, binsize in 1st dimension
/* BINSIZE(2)  = <ybin>           float, binsize in 2nd dimension
/* MODUS       = { "ANALOG | "DIGITAL" } GOOSY spectrum mode
/* MEMBERS     = <nmem>                  integer number describing length of GOOSY spectrum arrays <name>(1) to <name>(<nmem>)
/* DIR         = <dir>                   name of the directory containing the spectrum in the GOOSY database
/* POOL        = <pool>                  name of the pool containing the spectrum in the GOOSY database
A SPECTRUM command introduces a new spectrum, where <name> corresponds e.g. to CHTITL of PAWs HBOOK.
Subsequent commands may appear in any order. Any number of spectra may be defined in a GEF file.
The default keyword values are:
/* SPECTRUM    = no default, required
/* DIM         = 1      
/* TYPE        = R
/* CHANNELS(1) = no default, required      
/* LOWEDGE(1)  = no default, required 
/* BINSIZE(1)  = no default, required
/* MODUS       = "ANALOG"
/* MEMBERS     = 1 
/* DIR         = $SPECTRUM
/* POOL        = $SPEC_POOL

The command lines are followed by the respective spectrum data, free-formatted, float or integer, separated by blanks. Data items may not span across record boundaries. As a means of data compression, contiguous sequences of nrep identical values may be run length encoded as <nrep>*<value>, (without blanks). Missing data are defaulted to zero.
Note that a command or comment line in the data portion will terminate the stream of histogram data for the current histogram.
An example is here
| GSI Biophysics | command subsystem |
Last updated: 27-Nov-2005 M.Kraemer@gsi.de