3.3 XAS files
We give here an user's overview of XAS data files, while
programming details will be given elsewhere.
Overview
There are the following basic kind of files used by XAS :
- the FOT telemetry files, i.e. the semi-raw
(mostly binary) data in mission-dependent format
- the reduced data files, which are described in detail below,
and are produced (in mission-independent format) by the user using XAS programs
- ancillary user files, which are usually (tiny) ASCII files like
time windows or log files produced by some programs
- the calibration files used by the software and distributed with it.
XAS data files are binary files using
native internal representation of the specific operating
system, and using a mission-independent format. All families of
XAS files, listed below, share a common organization consisting of :
- a mini-header in front of the file
- a data area with either image (n rows of m pixels) or tabular (n rows with
p logical columns of different widths) organization
- an extensible header at the end of the file, which is organized as a
sequence of keywords
The following are the types of XAS files :
- images (of type .image) containing counts or other parameters as
a function of spatial position
- pseudo-images (equally of type .image) containing counts or other
parameters as a function of any two (non-spatial) coordinates
- response matrices (of type .matrix) containing instrumental
response as a function of energy and channel. They are
also in image format. An associated histogram (of type .histo) carries
the reference energy grid, in form of an unidimensional image.
- all the above files are in image format, there are as many records as image rows,
and each row contains the right number of REAL*4 pixels (the software can support
also INTEGER*2 images but their use is discouraged).
all files which follows are instead in tabular format.
- spectra (of type .spectrum) containing a count/s or count histogram as
a function of energy or of another "channelized" parameter. These files have
(usually) four (depth one) columns :
- the lower channel boundary (in channels or in keV)
- the upper channel boundary (in channels or in keV)
- the data value (in cts/s or cts)
- its error (in cts/s or cts)
- time profiles (of type .time) containing any quantity as a function of
time. These files may have up to 7 columns, although usually not all columns are
present :
- the start time of the bin (in double precision, elapsed seconds since midnight
of the first day of the observation). This is present virtually in all cases.
- the bin size (present only if not constant)
- the deadtime (present in a few cases, currently not yet used)
- the data value (in cts/s, cts, temperature, voltage or other units), which
may also have a depth greater than one
- its error
- an optional second data column
- and its optional error
- photon lists (of type .photon) containing a list of events. For each events
one may have a number of columns containing information like X, Y, energy, time etc.
according to the particular case.
- generic tabular files are also possible
XAS uses its own system-independent file naming convention (VOS names), which is
translated into system dependent names by appropriate routines. This is in practice
not a concern for the general user, and in particular for the Unix user, since VOS
names virtually (sic!) coincide with Unix names. A name may be of the form :
/dir/dir/.../name.type
dir/dir/.../name.type
name.type
name
The type (usually one of the
standard ones
given above) is often omitted and assigned automatically by the programs, or by
context.
Also the path (either
absolute or relative)
is usually omitted, and is instead built by programs.
It is important to remember that, irrespective of what is the current working
directory, XAS programs will look for files (without an absolute path) or create them
in specific directories previously decided by the user, and namely
- in a "FOT directory" for FOT telemetry files
- in a "data directory" for all reduced data products
- in a "print directory" for ancillary output (log files etc.)
- in a system (or
user-specified) directory for calibration files
Relative paths are relative to this particular directory !
The full path of each of these directories is constructed on the basis of
several environment variables, in order to allow each user the maximum flexibility.
We give here examples for the "data directory", while the cases of the "FOT" and
"print" directory are similar, replacing
fotdir or
printdir
to datadir, and optionally replacing
fotorder or
printorder
to order (if this is not done one obtains the same hierarchy).
The full path for the "data directory" is constructed of up to 5 parts (each part
being in turn a path), e.g.
/part1/part2/part3/part4/part5
part1 is always a logical root, the value of
rootdir
The other four parts (of which three can be omitted) are controlled by the four variables
datadir,
target,
date,
instrument,
and occur in the order specified by variable order
Compare the following examples :
Flat arrangement
xasset rootdir /home/me
xasset datadir mydata
Default order assumed, data files are in /home/me/mydata
Complex arrangement
xasset rootdir /home/me
xasset datadir mydata
xasset target Crab
xasset date Sep06
xasset instrument mecs
xasset order ctdi
Data files are in /home/me/mydata/Crab/Sep06/mecs
Changing order
If one instead does e.g. xasset order cidt data files go in /home/me/mydata/mecs/Sep06/Crab
All permutations are possible.
One can also omit a part, e.g. if one does xasset order cd data files go in /home/me/mydata/Sep06
If one xasunset order the default path /home/me/mydata is restored.
Using different orders
Let us assume that one wants to do a standard reduction for a particular object, or
observation, or dataset called pinco, then the same reduction for another
dataset called panco and finally combine the results :
xasset rootdir /home/me
xasset datadir mydata
xasset target pinco
xasset order ct
Files for first data set are created as /home/me/mydata/pinco/name.type
xasset target panco
Files for other data set are created as /home/me/mydata/panco/name.type
xasunset order
The system will look for data files in /home/me/mydata, therefore one may
refer to the files of either data sets with relative paths like
pinco/name.type or panco/name.type and call merged files just
as name.type. The same result will occur doing xasunset target
sax.iasf-milano.inaf.it/Xashelp/xasenv.3.html
:: original creation 2002 Sep 04 17:45:05 CEST ::
last edit 2002 Sep 04 17:45:05 CEST