NAME
hxisgdsff - Converts an HXI or SGD first FITS file (FFF) into the second FITS
file (SFF)
USAGE
hxisgdsff infile outfile remapfile
DESCRIPTION
The hxisgdsff task unpacks event telemetry data for further processing, and
reassigns the numbering of the instrument readouts and of the
application-specific integrated circuits (ASIC).
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 task provides rationalized
numbering for the instrument readouts and ASIC. 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 user).
The number of ASIC 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.
PARAMETERS
- infile [filename]
- Input FFF from HXI or SGD.
- outfile [filename]
- Output SFF. If 'outfile' is the same file as 'infile',
'clobber' must be set to yes (or
by prepending "!" to the output file name), otherwise the task exits with an error.
Either of the methods that cause infile to be clobbered, cause the file
conversion to be done in-place and modify the input file.
- (remapfile = CALDB) [filename CALDB|file name]
- 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 file is read from the calibration database.
- (buffer = -1) [integer -1|0|N]
- Rows to buffer (-1=auto, 0=none, N>0=numrows).
- (clobber = no) [boolean yes|no]
- Overwrites the existing output file if set to yes.
- (chatter = 1) [integer 0|1|2|3]
- 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 DEFAULT|NONE|file name]
- Log file name. If set to DEFAULT, uses the name of the task and, if
preceded by "!", overwrites the file if it exists. If set to NONE, no
log file is created.
- (debug = no) [boolean yes|no]
- Diagnostic output is printed to the screen if set to yes.
- (history = yes) [boolean yes|no]
- Records tool parameters in HISTORY.
EXAMPLES
- Convert an FFF to an SFF. The file sgd_fff.fits is copied to sgd_sff.fits, and the output variable-length vector
columns in sgd_sff.fits are filled in with unpacked event data,
as described above. The renumbering of instrument components (ASIC
and readouts) is obtained from a local file
called ah_sgd_remap.fits.
hxisgdsff infile=sgd_fff.fits outfile=sgd_sff.fits remapfile=ah_sgd_remap.fits
- Same as above, but the renumbering of instrument components (ASIC
and readouts) is obtained from the calibration database.
hxisgdsff infile=sgd_fff.fits outfile=sgd_sff.fits remapfile=CALDB
SEE ALSO
hxisgdpha
LAST MODIFIED
October 25, 2018