eng2phys - convert HK data from ENGineering TO PHYSical units
eng2phys [infile=] <file_name>
The module eng2phys reads the contents of a given raw LECS HK file
(type _rhk) from which it creates a new "physical" HK file
(type _hkp). The structure of the input and output files is
identical with respect to the number of Bintable extensions and number
of columns in each extension, the data, however, have been manipulated in
the following manner:
- All HK parameter values in the 2nd Bintable extension have been scaled
from digital (engineering) to physical units (e.g., digital temperature
units to "degree Celsius", digital pressure values to "mbar", etc.).
- The attitude data in the 3rd Bintable extension have been
filtered according to a selection criterion which involves
the deviation of the pointing from the median pointing position
calculated from the entire data set. In more detail, an
attitude data record #i is eliminated if it represents a
spacecraft attitude for which the pointing deviates from
the nominal pointing direction by more than a certain threshold value.
This threshold is an alterable input parameter
pntfluct with a d/f value
of 3 arcmins (cone opening angle).
This step 2 has proven to be necessary to eliminate spurious "spikes" in
the attitude data which are occasionally present due to a problem in the FOT
As a result of the unit conversion in step 1, the type of certain columns of
the second Bintable extension in the input and output file is different, i.e.,
has changed from "I" (16-bit integer) to "E" (32-bit floating point). For
more details and a list of affected columns please consult Sect. 2.5.1 in
The attitude data filtering has naturally decreased the
number of rows in the ASPECT extension, thereby creating
gaps in the data. Given the fact that potential "spikes" in the
attitude data are due to at most one or two erroneous records, the
generated gaps should not be larger than 2s (nominal attitude data
granularity is 0.5s). A gap of this size is insignificant for all
SAXDAS modules which access the attitude data.
Please note: The contents of both types of HK files (rhk.fits and
hkp.fits) can be inspected with the
The following command line parameters are recognized by the program:
- infile = "" [string]
- The raw HK FITS file to be transformed. The name of the output file
is derived from infile, i.e., a potential suffix _rhk is
changed to _hkp.
- indirpath = "" [string]
- A colon separated list of directories to search for the specified HK input
file infile. This is done by first attempting to open
infile as is. If this fails, each directory component in
indir is inspected for the location of infile.
- outdir = "=" [string]
- This determines the directory in which the output HK file shall be
created. If outdir is assigned the special value
"=" (the default), the output file is written to the directory where the
input file was found.
- attflt = yes [boolean: yes|no]
- A boolean switch to enable/suppress the above described attitude data
- pntfluct = 3.0 [real: >= 0.]
- This parameter defines the selection criterion for the attitude data
filtering: If the pointing direction of the satellite for a particular
attitude record deviates more than 0.5 * pntfluct from
the median pointing direction, this record is removed from the data set.
On verbosity level 3 eng2phys will print out a concise statistics
before is exits. This will show what faction of the total available attitude
information has been lost in the attitude data filtering process.
- verbosity = 2 [integer: 0|1|2|3]
- Specifies the program verbosity level, i.e. the amount of screen output
that will be issued during program execution. Level 0 means "mute",
only fatal error messages will be printed. Verbosity level 3 results into
detailed diagnostic messages. Default is level 1.
- help = no [boolean: yes|no]
- Display a brief on-screen description of all available command line
parameters together with the current program version number.
- Scale contents of raw HK file x_rhk.fits
to physical units and create resulting output file x_hkp.fits in the
directory where the input file was found. The cone opening angle for
the attitude data filtering shall be 5 arcmin. Verbosity level is 2:
eng2phys x_rhk.fits pntfluct=5 verb=2
- Scale contents of raw HK file x_rhk.fits to physical
units, seeking it in the directories ./ and ../data.
The resulting output file shall be generated in the current
directory and no attitude data filtering shall take place:
eng2phys x_rhk.fits attflt=no indirpath=".:../data" outdir=.
- The SAX LECS Data Analysis System -
Software User Manual,
U. Lammers, Doc. SAX/LEDA/0010
U. Lammers (Uwe.Lammers@astro.estec.esa.nl)