hxisgdsff - Converts an HXI or SGD First FITS File (FFF) into the Second FITS
hxisgdsff infile outfile remapfile
'hxisgdsff' unpacks event telemetry data for further processing and
reassigns the numbering of the instrument readouts and of the
application-specific integrated circuits (ASICs).
Both the FFF or the SFF of an HXI or SGD camera contain a single binary table
extension where a row corresponds to an "occurrence" (a possible photon
event). An occurrence contains one or more "signals," i.e., deposits of energy
in an instrument readout or pixel. The FITS BINTABLE column definition for
the FFF and SFF are identical. The empty columns in FFF are filled in the SFF
with unpacked telemetry items that are aligned on word or byte boundaries.
In addition to the data format conversion, this tool provides rationalized
numbering for the instrument readouts and application-specific integrated
circuits (ASICs). The numbering of these components in the telemetry is
non-consecutive because it is related to the structure of the instrument
electronics. However, consecutive numbers are more convenient for use in
subsequent processing steps. The remapping scheme for these numbers
is defined by a calibration database file (specified by CALDB or given by
The number of ASICs in an occurrence is stored in the input column
named NUM_ASICS. The packed raw telemetry data is stored in the input variable-length
vector column called RAW_ASIC_DATA. The output columns containing the unpacked data
are called ASIC_ID, ASIC_CHIP, ASIC_TRIG, ASIC_SEU, READOUT_FLAG, NUM_READOUT,
ASIC_REF, ASIC_CMN, READOUT_ASIC_ID, READOUT_ID, and PHA. The remapped ASIC
and readout numbers are in the output columns ASIC_ID_RMAP and READOUT_ID_RMAP,
respectively. All of the output columns are variable-length vector columns.
- infile [filename]
- Input First FITS File (FFF) from HXI or SGD.
- outfile [filename]
- Output Second FITS File (SFF). May be the same or
a different file from infile. If outfile is the same file as infile,
then clobbering must be enabled or the tool exits with an error.
Clobbering is enabled by specifying clobber=yes (see below) or
by prepending an exclamation point (!) to the output file name.
Either of these methods cause the file
conversion to be done in-place and modify the input file.
- (remapfile = CALDB) [filename]
- FITS file describing the remapping of ASIC_ID and READOUT_ID to
sequential numbers in the columns ASIC_ID_RMAP and READOUT_ID_RMAP.
If the parameter is set to CALDB, the default, the file is read from the calibration database.
- (buffer = -1) [integer]
- Rows to buffer (-1=auto, 0=none, >0=numrows).
- (clobber = no) [boolean]
- Overwrites the existing output file if set to yes (yes/[no]).
- (chatter = 1) [integer]
- Chatter level for output. Set to 0 to suppress output,
or to 1, 2, or 3 for increasing the chatter of the output.
- (logfile = !DEFAULT) [string]
- Log filename. If set to DEFAULT uses the name of the task and, if
preceded by '!', overwrite the file if it exists. If set to NONE no
log file is created.
- (debug = no) [boolean]
- Diagnostic output is printed out on the screen if set to yes
- (history = yes) [boolean]
- Records tool parameters in HISTORY ([yes]/no).
- (mode = ql) [string ql|hl|q]
- Mode to query the parameter file.
Acceptable values include: 'ql' (query and learn/remember), 'hl'
(hidden and learn/remember), 'q' (query but don't remember), 'h' (hidden).
1. Convert an FFF to an SFF. The sgd_fff.fits file is copied to sgd_sff.fits, and the output variable-length vector
columns in sgd_sff.fits is then filled in with unpacked event data,
as described above. The renumbering of instrument components (ASICs
and readouts) is obtained from a local file
hxisgdsff infile=sgd_fff.fits outfile=sgd_sff.fits remapfile=ah_sgd_remap.fits
2. Same as above but the renumbering of instrument components (ASICs
and readouts) is obtained from the calibration database (CALDB)
hxisgdsff infile=sgd_fff.fits outfile=sgd_sff.fits remapfile=CALDB