NAME

hxipipeline - HXI reprocessing tool

USAGE

hxipipeline indir outdir steminputs entry_stage exit_stage

DESCRIPTION

hxipipeline duplicates most of the pipeline (not trend data) for the hxi. It allows the user to run all or part of the pipeline processing and to vary the calibration files and filtering (screening) criteria used. A number of other pipeline processing parameters can also be changed.

HXI Pipeline Stages

The hxipipeline is divided into 3 stages:

  1. Calibration
  2. Data screening
  3. Product creation
Each stage may be run singly or in combination with the preceeding stages. This is controlled by the entry_stage and exit_stage parameters.

HXI Stage 1 consists of the following ordered steps:

  1. Run cams2att*
  2. Run hxisgdsff
  3. Run hxisgdpha
  4. Run hxievtid
  5. Run coordevt

*Note: cams2att us automatically run twice. Once with parameters set for HXI1, the other with parmaters set for HXI2.

The data screening (Stage 2) is identical to that in the production pipeline, when default parameters are used. For details on the default screening applied to the HXI events (respectively), see:

Default GTI used for screening data are:

The cleaning process occurs twice for HXI. Once to produce cleaned event files, the second to produce pseudo event files.

The product creation (Stage 3) is identical to that in the production pipeline, when default parameters are used. For HXI events extractor is run on SKY coordinates and a lightcurve, spectra and images are created for each cleaned event file.

INPUT

The input to hxipipeline is specified using (at minimum) the indir parameter. This should be specified as the hxi event_uf level sequence directory, e.g.:

hxipipeline indir=/path/to/100039010/hxi/event_uf

Paths to specific hxi housekeeping and satellite data files can be specified using the attitude, housekeeping, extended_housekeeping, makefilter, orbit and obsgti parameters. The attiude, orbit and hxi housekeeping files are required for stage 1 calibration.

OUTPUT

Filenames, etc.

The number of output files depends on both pipeline processing stage(s) and the options selected. All output files are written to the directory specified by the outdir parameter. The archive directory structure is NOT reproduced (i.e. all output files will be in a single directory).

The names of files produced are the same as those found in the HEASARC archive. However the usual "ahXXXXXXXXX" prefix, where "XXXXXXXXX" is the sequence number, can be replaced by a character string set by the stemoutputs parameter. This defaults to the value set by the steminputs parameter.

PARAMETERS

indir [string]
hxipipeline:
Input directory

outdir [string]
hxipipeline:
Output directory

steminputs [string]
hxipipeline:
stem inputs

stemoutputs [string]
hxipipeline:
stem outputs

instrument [string]
hxipipeline:
Instrument (HXI,HXI1,HXI2)

entry_stage [integer]
hxipipeline:
Entry stage

(exit_stage = 2) [integer]
hxipipeline:
Exit stage

(hxi_start = 0.0) [real]
hxipipeline:
HXI CALDB start time

verify_input [boolean]
hxipipeline:
Verify with ftverify (yes, no)

(hxi_mkflabel = HXISFFA1CAM) [string]
Label to use for HXI MKF GTI creation
For pseudo events "PSE" will replace CAM in the label

(hxi_ehklabel = HXISFFA1CAM) [string]
Label to use for HXI EHK GTI creation
For pseudo events "PSE" will replace CAM in the label

(hxi_evtlabel = HXISFFA1CAM) [string]
Label to use for HXI event screening
For pseudo events "PSE" will replace CAM in the label

(ra = -999.99999) [real]
The Right Ascension in decimal degrees of the point to appear in the center of SKY coordinate images. If ra is within the range 0 <= ra <= 360 deg., then the value of the parameter is used. If ra is outside this range, then the ra value is read from the event header of the input file, searching first for the RA_NOM keyword and if found using its value, or if not found, then searching for the RA_PNT keyword and using its value. If neither keyword is found, then coordevt exits with an error. The default value for ra triggers the keyword look up.

(dec = -999.99999) [real]
The declination in decimal degrees of the point to appear in the center of SKY coordinate images. If dec is within the range -90 <= dec <= +90 deg., then the value of the parameter is used. If dec is outside this range, then the dec value is read from the event header of the input file, searching first for the DEC_NOM keyword and if found using its value, or if not found, then searching for the DEC_PNT keyword and using its value. If neither keyword is found, then coordevt exits with an error. The default value for dec triggers the keyword look up.

(roll = 0.0) [real]
The roll angle about the center of the SKY coordinate system in decimal degrees. The roll angle is the angle measured counterclockwise from Celestial North to the positive SKY Y axis.

(hx1_optdetx = -999.99999) [real]
HXI1 optical detx coordinate

(hx1_optdety = -999.99999) [real]
HXI1 optical dety coordinate

(hx1_optfocx = -999.99999) [real]
HXI1 optical focx coordinate

(hx1_optfocy = -999.99999) [real]
HXI1 optical focy coordinate

(hx1_optskyx = -999.99999) [real]
HXI1 optical skyx coordinate

(hx1_optskyy = -999.99999) [real]
HXI1 optical skyy coordinate

(hx2_optdetx = -999.99999) [real]
HXI2 optical detx coordinate

(hx2_optdety = -999.99999) [real]
HXI2 optical dety coordinate

(hx2_optfocx = -999.99999) [real]
HXI2 optical focx coordinate

(hx2_optfocy = -999.99999) [real]
HXI2 optical focy coordinate

(hx2_optskyx = -999.99999) [real]
HXI2 optical skyx coordinate

(hx2_optskyy = -999.99999) [real]
HXI2 optical skyy coordinate

(hx1_ra_pnt = -999.99999) [real]
RA of HXI1 pointing [deg]

(hx1_dec_pnt = -999.99999) [real]
DEC of HXI1 pointing [deg]

(hx2_ra_pnt = -999.99999) [real]
RA of HXI2 pointing [deg]

(hx2_dec_pnt = -999.99999) [real]
DEC of HXI2 pointing [deg]

attitude [string]
hxipipeline:
The name of the attitude file used in the conversion to SKY coordinates. If the tranformation does not involve SKY coordinates, then an attitude file need not be provided. The attitude can be provided as either quaternions or Z-Y-Z Euler angles. The attitude format in the attfile must match the value of the attform parameter.

orbit [string]
hxipipeline:
The name of a FITS satellite orbit file. This file provides the satellite orbital velocity as a function of time, which is used in calculating the orbital aberration correction. There are two orbit formats supported (VECTOR, e.g. Swift, and COMPONENT, e.g. Suzaku). The orbit format in the orbitfile must match the value of the orbform parameter. If the orbital aberration correction is not required (i.e. orbaberration=no), then an orbit file need not be provided.

(extended_housekeeping = ah1001.ehk) [string]
ahgtigen:
Extended housekeeping file

(makefilter = ah1001.mkf) [string]
ahgtigen:
Makefilter file

(obsgti = ah1001_gen.gti) [string]
ahscreen:
Observation GTI file

(regionfile = NONE) [string]
extractor:
Input region file

(hx1teldef = CALDB) [filename]
coordevt/cams2att:
Name of HXI1 file. If hx1teldef=CALDB, then the TelDef file for the instrument specified by detnam is used to determine the appropriate TelDef file from a CALDB query.

(hx2teldef = CALDB) [filename]
coordevt/cams2att:
Name of HXI2 file. If hx2teldef=CALDB, then the TelDef file for the instrument specified by detnam is used to determine the appropriate TelDef file from a CALDB query.

(remapfile = CALDB) [filename]
hxisgdsff/hxievtid:
File describing the remapping of ASIC_ID and READOUT_ID to sequential numbers in the columns ASIC_ID_RMAP and READOUT_ID_RMAP. Specify CALDB to retrieve the file from the calibration database.

(gainfile = CALDB) [filename]
hxisgdpha:
FITS table describing the gain calibration of PHA for the HXI or SGD camera. The domain of PHA values is divided into intervals, and a set of cubic polynomial coefficients is given for each interval. Specifying CALDB causes this file to be retrieved from the calibration database.

(badpixfile = CALDB) [filename]
hxisgdpha/hxievtid:
FITS table giving the active and bad channels (pixels) of the HXI or SGD camera. Specifying CALDB causes this file to be retrieved from the calibration database.

(fluorefile = CALDB) [filename]
hxievtid:
Calibration file containing the energy ranges of fluorescence electrons in CdTe and Si. Default: CALDB.

(enecutfile = CALDB) [filename]
hxievtid:
Input energy cut file

(cm1teldef = CALDB) [filename]
cams2att:
Name of CAMS1 TelDef file. If cams1teldef=CALDB, then the telescope and instrument specified by keywords in infile1 are used to determine the appropriate TelDef file from a CALDB query.

(cm2teldef = CALDB) [filename]
cams2att:
Name of CAMS2 TelDef file. If cams2teldef=CALDB, then the telescope and instrument specified by keywords in infile1 are used to determine the appropriate TelDef file from a CALDB query.

(camstempxy = CALDB) [filename]
cams2att:
Name of the CAMS temperature compensation file. If camstempxy=CALDB, then the telescope and instrument specified by keywords in infile1 are used to determine the appropriate calibration file from a CALDB query.

(leapsecfile = REFDATA) [filename]
ahgtigen/ahscreen:
Input leap second file (or CALDB, [REFDATA])

(selectfile = CALDB) [filename]
ahgtigen/ahscreen:
Input file with the selection expressions

(outnsubcol = no) [boolean]
hxisgdpha:
Output the PHA_NSUB column (yes/no). This column is the PHA minus the ASIC common mode noise (ASIC_CMN column in the SFF).

(datamode = NONE) [string]
hxisgdpha:
Substitute DATAMODE in place of event value (or NONE)

(randomize = yes) [boolean]
hxisgdpha:
Allow randomization ([yes]/no)

(rejectbgo = no) [boolean]
hxievtid:
Reject events for which BGO trigger occurred (yes/[no]).

(skipreco = no) [boolean]
hxievtid:
If yes, READALL and CALMODE occurrences will not be reconstructed. Default: NO.

(outcalfile = NONE) [filename]
hxievtid:
Output a file containing the reconstruction information for each occurrence by detector side. This file can be used as input to the gainfit tool.

(startsys = RAW) [string]
cams2att:
Origin coordinate system for transformation done by the tool ahdet2att.

(startstep = 1) [integer]
cams2att:
The beginning step for processing within this tool (1-5). The five processing steps are documented in the help file for cams2att.

(stopstep = 5) [integer]
cams2att:
The final step for processing within this tool (1-5). The five processing steps are documented in the help file for cams2att.

(inext = EVENTS) [string]
cams2att:
Name of data extension in infile1 and infile2.

(outext = CAMS_OFFSETS) [string]
cams2att:
Name of data extension in the output file from step 1 (see tempcorfile1 and tempcorfile2).

(flipsign = no) [boolean]
cams2att:
Flip sign of output offsets and angles (yes/[no])

(prefiltfile1 = NONE) [string]
cams2att:
Name of filtered, temperature-corrected CAMS1 displacement file. This file is written by the tool ftselect in Step 2, and it is read by the tool cams2det in Step 3. If startstep=1 or 2, then specifying "NONE" causes the file to be given the name tmp_prefiltfile1.fits and to be deleted if cleanup=yes. If startstep=3, then the value "NONE" is invalid, and an actual filename must be specified.

(prefiltfile2 = NONE) [string]
cams2att:
Name of filtered, temperature-corrected CAMS2 displacement file. This file is written by the tool ftselect in Step 2, and it is read by the tool cams2det in Step 3. If startstep=1 or 2, then specifying "NONE" causes the file to be given the name tmp_prefiltfile2.fits and to be deleted if cleanup=yes. If startstep=3, then the value "NONE" is invalid, and an actual filename must be specified.

(filtoffset = NONE) [string]
cams2att:
Name of intermediate offset file after filtering. This file is written by the tool ftselect in step 4 and read by the tool ahdet2att in Step 5. If startstep=1, 2, 3, or 4, then specifying "NONE" causes the file to be given the name tmp_filtoffset.fits and to be deleted if cleanup=yes. If startstep=5, then the value "NONE" is invalid, and an actual filename must be specified.

(prefiltexpr = DSP_UP==1 && IS_SAMPLING==1) [string]
cams2att:
Expression used by ftselect to filter the temperature corrected CAMS data files tempcorfile1 and tempcorfile2.

(filtexpr = BAD_UNITS==0) [string]
cams2att:
Expression used by ftselect to filter offsetfile.

(gtiexpr0 = BAD_UNITS==0) [string]
cams2att:
Expression used to create GTI for both CAMS units.

(gtiexpr1 = BAD_UNITS==2) [string]
cams2att:
Expression to create GTI for CAMS1

(gtiexpr2 = BAD_UNITS==1) [string]
cams2att:
Expression to create GTI for CAMS2

(deltaxcol = DELTARAWX) [string]
cams2att:
Column name for change in X coordinate in the file filtoffset read by Step 5.

(deltaycol = DELTARAWY) [string]
cams2att:
Column name for change in Y coordinate in the file filtoffset read by Step 5.

(sincol = SINANGLE) [string]
cams2att:
Column name for sine of rotation angle in the file filtoffset read by Step 5.

(coscol = COSANGLE) [string]
cams2att:
Column name for cosine of rotation angle in the file filtoffset read by Step 5.

(coordevt_startsys = LOWEST) [string]
coordevt:
Sets starting coordinate system specifically for coordevt.
The name of the coordinate system from which the coordinate conversions begin. If startsys=LOWEST, then the coordinate transformation begins with the lowest level system in the teldef file (COORD0; usually RAW). The startsys and stopsys parameters work together to specify the origin (startsys) and final (stopsys) systems. Setting startsys=LOWEST and stopsys=HIGHEST will convert the bottom-level coordinates into all the other coordinate systems. It is allowed for startsys to be a higher level coordinate system than stopsys. For example, setting startsys=HIGHEST and stopsys=LOWEST will convert the top-level coordinates into all the other coordinate systems.

(stopsys = HIGHEST) [string]
coordevt:
The name of the coordinate system at which the coordinate conversions end. If stopsys=HIGHEST, then the coordinate transformation chain ends with the highest level system (SKY). See also the description of the startsys parameter.

(annaber = no) [string]
coordevt:
If YES, the effects of annual aberration are taken into account when calculating the SKY coordinate values. Annual aberration is the apparent bending of light due to the Earth's orbit around the Sun. This is at most a ~20.49 arcsec effect. If INVERT, the sign of the annual aberration correction is flipped before being applied to the sky coordinates. This is used for debugging. If NO, the annual aberration is not corrected.

(followsun = no) [boolean]
coordevt:
Should aberration be recalculated for each event time? If set to "no" the aberration at the time given by the MJDOBS keyword will be used for all events. Setting this to "no" is acceptable except for very long observations, and this will make the program run slightly faster. The "yes" setting should be used for highest accuracy, and this setting uses the MJDREF keyword (or pair of MJDREFI and MJFREFF keywords) along with the TIME column of the event extension to calculate absolute event times.

(orbaber = no) [string]
coordevt:
If YES, the effects of orbital aberration are taken into account when calculating the SKY coordinate values. Orbital aberration is the apparent bending of light due to the satellite's orbit around the Earth. For a satellite in low-earth orbit, this is at most a ~5 arcsec effect. If INVERT, the sign of the orbital aberration correction is flipped before being applied to the sky coordinates. This is used for debugging. If NO, the orbital aberration is not corrected.

(attinterp = LINEAR) [string]
coordevt:
Spacecraft attitude interpolation method. The value LINEAR results in the attitude being linearly interpolated to the event time. The value CONSTANT results in the attitude being taken from the nearest attitude record.

(dattinterp = LINEAR) [string]
coordevt:
Delta attitude interpolation method. The value LINEAR results in the delta attitude being linearly interpolated to the event time. The value CONSTANT results in the delta attitude being taken from the nearest attitude record.

(attdt = 32.) [real]
coordevt:
Allowed time in seconds to extrapolate the spacecraft attitude before the first or after the last row in the attitude file. Events beyond this time margin will have their coordinates set to a null value.

(dattdt = 0.5) [real]
coordevt:
Allowed time in seconds to extrapolate the auxiliary ("delta") attitude before the first or after the last row in the attitude file. Events beyond this time margin will have their coordinates set to a null value.

(chkattgap = no) [boolean]
coordevt:
Set this parameter to "yes" to use the attdt also for interpolation. Event times that fall within the sky attitude time range but not within the attdt of the nearest attitude time will be set to null. Set chkattgap to "no" to always interpolate the attitude at the event time. The attdt value is used for extrapolation regardless of the value of chkattgap.

(chkdattgap = yes) [boolean]
coordevt:
Set this parameter to "yes" to use the dattdt also for interpolation. Event times that fall within the delta attitude time range but not within the dattdt of the nearest attitude time will be set to null. Set chkdattgap to "no" to always interpolate the attitude at the event time. The dattdt value is used for extrapolation regardless of the value of chkdattgap.

(attext = ATTITUDE) [string]
coordevt:
The name of the FITS attitude file extension containing satellite attitude data.

(attcol = QPARAM) [string]
coordevt:
The name of the FITS column containing attitude values as a vector in the attext extension of the attitude table.

(attform = QUAT) [string]
coordevt:
The format in which the attitude is provided in the attitude table. Two formats are supported. The QUAT format is a quaternion [x, y, z, real]. The EULER format is a Z-Y-Z Euler angle trio [phi, theta, psi] in degrees.

(orbext = ORBIT) [string]
coordevt:
The name of the FITS orbit file extension containing satellite orbit data.

(orbcol = VELOCITY) [string]
coordevt:
The name(s) of the FITS column(s) containing orbit values in the orbext extension of the orbit file. If orbform="VECTOR", then orbcol is the name of the single FITS column containing the orbit values as a vector. If orbform="COMPONENTS", then orbcol must be a string containing three comma-separated column names, specifying in order the X, Y and Z components of the orbital velocity.

(orbform = VECTOR) [string]
coordevt:
The format in which the orbital velocity is provided in the orbit file. Two formats are supported. For the VECTOR format, the velocity is provided as a vector column with three elements (X, Y and Z in Earth-Centered Inertial (ECI) system). For the COMPONENT format, the velocity is provided in three separate columns.

(coordevt_randomize = TELDEF) [string]
coordevt:
Set randomize coordinates specifically for coordevt.
If this parameter is set to "no", coordevt will assume that each event occured at the center of its coordinate pixel. If it is set to "yes", the coordinates from system randsys onward will be calculated assuming a random location within the randsys system pixel. If randomize="CALDB", then randomization is enabled (RANCOORD != 'NONE') or disabled (RANCOORD = 'NONE') depending on the TelDef keyword RANCOORD. This parameter only controls randomization in transformations previous to the transformation to the SKY system.

(randsys = TELDEF) [string]
coordevt:
The name of the starting coordinate system for which randomization is performed, as long as randomization is enabled by the randomize parameter. If randsys="CALDB", the value of the RANCOORD keyword (if present) of the TelDef file specifies this system.

(randscalesys = TELDEF) [string]
coordevt:
The name of the coordinate system whose pixels determine the size of the randomization if randomization is enabled by the randomize parameter. If randscalesys="CALDB", the value of the RAN_SCAL keyword of the TelDef file is used if the keyword is present, and the value of the randsys parameter is used if the RAN_SCAL keyword is not present. It is most common for randsys and randscalsys to be the same coordinate system, but it is not required.

(infileext = EVENTS) [string]
coordevt:
The name of the infile extension containing the event table.

(timecol = TIME) [string]
coordevt:
The name of the FITS column in the event table containing time values.

(inclfloatcol = no) [boolean]
coordevt:
If this parameter is set to "yes", an additional column of unrounded coordinate values is included in the output event file for each coordinate of each system after the startsys system. Enabling this parameter is useful for stringing multiple coordevt runs together (e.g., convert RAW to DET in one run and DET to SKY in a second run) without loss of precision due to the normal rounding of coordinates. Use startwithfloat="yes" for runs after the first so that the unrounded coordinates from the previous coordevt run are used as the starting coordinate values for a subsequent run. Rounded coordinate columns are written regardless of the value of this parameter. Unrounded SKY coordinate columns are included if either of inclfloatcol or inclfloatskycol is set to "yes".

(inclfloatskycol = no) [boolean]
coordevt:
If this parameter is set to "yes", an additional column of unrounded coordinate values is included in the output event file for each SKY coordinate. Rounded SKY coordinate columns are included regardless of the value of this parameter. Unrounded SKY coordinate columns are included if either of inclfloatcol or inclfloatskycol is set to "yes".

(floatcolsuffix = _FLOAT) [string]
coordevt:
This parameter sets the suffix used in all unrounded coordinate column names. If the rounded coordinate column name is DETX and floatcolsuffix=_FLOAT, then the corresponding unrounded coordinate column name will be DETX_FLOAT. This parameter is used only when either of inclfloatcol or inclfloatskycol is set to "yes".

(startwithfloat = no) [boolean]
coordevt:
This parameter is set to "yes" to use the unrounded coordinate column values (e.g., floating point values from DETX_FLOAT and DETY_FLOAT columns) as the starting coordinate columns. Enabling this parameter is useful for non-initial runs of coordevt in a string of runs that each convert between a subset of the transformations. The inclfloatcol parameter must be set to "yes" for startwithfloat to have an effect. When either of inclfloatcol or startwithfloat is disabled, rounded coordinate values (e.g., integer values from DETX and DETY columns) are used as the starting coordinate values.

(blankcol = yes) [boolean]
coordevt:
This parameter is set to "yes" to fill the coordinate columns after the stopsys coordinate system with NULL values. If blankcol is set to "no", such columns will not be changed. The behavior is somewhat different depending on what coordinate columns already exist in the input file. If columns for coordinates beyond the stopsys coordinate system exist in the input file, then when blankcol="yes", their values are replaced with NULL values and when blankcol="no", their values are copied to the output file unchanged. If, however, such columns do not already exist in the input file, then they are created and filled with NULL values when blankcol="yes", but not created if blankcol="no".

(btnull1 = 255) [integer]
coordevt:
This parameter sets the null integer value for any output unsigned byte (TFORM = "1B") coordinate columns that are missing or lack the TNULL keyword in the input event file.

(itnull1 = -999) [integer]
coordevt:
This parameter sets the null integer value for any output short integer (TFORM = "1I") coordinate columns that are missing or lack the TNULL keyword in the input event file.

(jtnull1 = -999) [integer]
coordevt:
This parameter sets the null integer value for any output long integer (TFORM = "1J") coordinate columns that are missing or lack the TNULL keyword in the input event file.

(ktnull1 = -999) [integer]
coordevt:
This parameter sets the null integer value for any output long long integer (TFORM = "1K") coordinate columns that are missing or lack the TNULL keyword in the input event file.

(sbtnull1 = 255) [integer]
coordevt:
This parameter sets the null integer value for any output signed byte (TFORM = "1B" with TZERO = -128) coordinate columns that are missing or lack the TNULL keyword in the input event file. The specified null value is the value to be stored in the FITS file, not the value in the signed domain.

(uitnull1 = -999) [integer]
coordevt:
This parameter sets the null integer value for any output unsigned short integer (TFORM = "1I" with TZERO = 32768) coordinate columns that are missing or lack the TNULL keyword in the input event file. The specified null value is the value to be stored in the FITS file, not the value in the unsigned domain.

(ujtnull1 = -999) [integer]
coordevt:
This parameter sets the null integer value for any output unsigned long integer (TFORM = "1J" with TZERO = 2147483648) coordinate columns that are missing or lack the TNULL keyword in the input event file. The specified null value is the value to be stored in the FITS file, not the value in the unsigned domain.

(occurrenceid = -1) [integer]
hxievtid:
If greater than zero, only expand this single occurrence.

(seed = 0) [integer]
coordevt/cams2att:
Random number generator seed to be used if randomization is enabled. For a given seed value, the same results will be produced each time the program is run.

(stemreport = ) [string]
File stem for log and temporary files. If the parameter is not set the script will automatically set the stem to "hxipipeline_YYYYMMDDTHHMMSS_" and will append log file and temp file names as needed. Intended to be set by ahpipeline.

(numerrs = 0) [string]
Number of errors from hxipipeline (output)

(cleanup = yes) [boolean]
Delete temporary files ([yes]/no)

(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 (yes/[no]).

(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).

1These parameters are used to specify default null value processing. Null values may appear for several reasons, including the following: 1. the event time cannot be matched to a row of an attitude file within the time margin; 2. the coordinate system is subsequent to the stopsys coordinate system and blankcol is enabled; 3. a calculated coordinate is outside the allowed range of that coordinate. If an output column already exists in the input file and TNULL for that column is specified in the event file header, then the existing TNULL keyword is copied to the output column. If, however, the output column does not exist in the input file or the column exists, but does not have an associated TNULL keyword, then the appropriate nullvalue parameter is used.

THE FOLLOWING PARAMETERS ARE SET BY THE SCRIPT INTERNALLY:

CAMS2ATT:

infile1 = cams1_data.fits [filename]
HXIPIPELINE looks for a file with the appropiate nomenclature.
If found, this parameter is set to that file. Otherwise it is set to "NONE"
It is possible for either the cm1 or cm2 data file to be set to NONE, however the script will fail if both infile1 and infile2 are missing.
Name of input FITS file containing the X and Y positions determined by the CAMS1 system. The tool does not change this file.

infile2 = cams2_data.fits [filename]
HXIPIPELINE looks for a file with the appropiate nomenclature.
If found, this parameter is set to that file. Otherwise it is set to "NONE"
It is possible for either the cm1 or cm2 data file to be set to NONE, however the script will fail if both infile1 and infile2 are missing.
Name of input FITS file containing the X and Y positions determined by the CAMS2 system. The tool does not change this file.

outfile = deltaq.fits [filename]
Set to ${outdir}/${stemoutputs}hx1.att the first time cams2att runs.
Set to ${outdir}/${stemoutputs}hx2.att the second time cams2att runs.
Name of output file containing the time-dependent delta-attitude quaternions for conversion from the HXI RAW to ACT system. The tool creates this file.

(tempcorfile1 = NONE) [string]
Set to the same name as infile1, but in the outdir directory the first time cams2att runs.
Set to "NONE" the second time cams2att runs."
Name of temperature-corrected CAMS1 displacement file. This file is written by the tool ftcalc in Step 1, and it is read by the tool ftselect in Step 2. If startstep=1, then specifying "NONE" causes the file to be given the name tmp_tempcorfile1.fits and to be deleted if cleanup=yes. If startstep=2, then the value "NONE" is invalid, and an actual filename must be specified.

(tempcorfile2 = NONE) [string]
Set to the same name as infile2, but in the outdir directory the first time cams2att runs.
Set to "NONE" the second time cams2att runs."
Name of temperature-corrected CAMS2 displacement file. This file is written by the tool ftcalc in Step 1, and it is read by the tool ftselect in Step 2. If startstep=1, then specifying "NONE" causes the file to be given the name tmp_tempcorfile2.fits and to be deleted if cleanup=yes. If startstep=2, then the value "NONE" is invalid, and an actual filename must be specified.

(offsetfile = NONE) [string]
Set to ${outdir}/${stemoutputs}hx1_cms.fits the first time cams2att runs.
Set to ${outdir}/${stemoutputs}hx2_cms.fits the second time cams2att runs.
Name of intermediate offset file. This file is written by the tool cams2det in step 3 and read by the tool ftselect in Step 4. If startstep=1, 2, or 3, then specifying "NONE" causes the file to be given the name tmp_offsetfile.fits and to be deleted if cleanup=yes. If startstep=4, then the value "NONE" is invalid, and an actual filename must be specified.

(hxiteldef = CALDB) [string]
Set to hx1teldef parameter the first time cams2att runs.
Set to hx2teldef parameter the second time cams2att runs.

detnam [string HXI1, HXI2]
Set to HXI1 the first time cams2att runs.
Set to HXI2 the second time cams2att runs.
Name of HXI unit for which output is calculated

HXISGDSFF:

infile [filename]
Set based on the unfiltered event files found in indir directory during initialization.
Input First FITS File (FFF) from HXI or SGD.

outfile [filename]
Set to the same name as infile, but in the outdir directory.
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 will cause the file conversion to be done in-place by modifying the input file.

HXISGDPHA:

infile [filename]
Set based on the unfiltered event files found in indir directory during initialization and processed through hxisgdsff.
Input Second FITS File (SFF) from HXI or SGD.

outfile [filename]
Set to the same name as infile, but in the outdir directory.
Output Second FITS File (SFF). If it is the same as infile, then specifying clobber=yes (see below) will cause the file conversion to be done in-place by modifying the input file. Prepending an exclamation point (!) to the output file name has the same effect.

HXISGDEXPAND:

infile [filename]
Set based on the unfiltered event files found in indir directory during initialization and processed through hxisgdsff and hxisgdpha.
Input file of event data from an HXI instrument. This is the Second FITS File (SFF) after PHA calibration by the tool hxisgdpha.

outfile [filename]
Set to the same name as infile, but in the outdir directory and changing the extention from "_uf.evt" to "exp_ufa.evt".
Output event file containing results of event reconstruction.

HXIEVTID:

infile [filename]
Set based on the unfiltered event files found in indir directory during initialization and processed through hxisgdsff and hxisgdpha.
Input file of event data from an HXI instrument. This is the Second FITS File (SFF) after PHA calibration by the tool hxisgdpha.

outfile [filename]
Set to the same name as infile, but in the outdir directory and changing the extention from "_uf.evt" to "rec_ufa.evt".
Output event file containing results of event reconstruction.

COORDEVT:

infile [filename]:
Set systematically to the elements in an array which is constructed from any unfiltered event files in the input directory.
File name and optional extension name or number enclosed in square brackets of the input table that includes the coordinates (usually RAW) to start the first coordinate conversion. The infile is not changed unless the same file is given as the output file.

outfile [filename]:
Name of the output file that will contain the calculated values of the transformed coordinates. The outfile is created by copying the infile to outfile, updating the values in the coordinate columns of the event extension, and updating relevant header keywords. Other contents of the infile are preserved in the outfile.

teldeffile [filename]:
The name of the Telescope Definition (TelDef) calibration data base (CALDB) file, which specifies the coordinate systems and transformation properties. When this parameter is set to "CALDB", a TelDef file for the telescope and instrument specified by the TELESCOP and INSTRUME keywords, respectively, in the infile will be used.

(attfile = NONE) [filename]:
Set to the hxipipeline attitude parameter (see above)

(dattfile = NONE) [string]:
The script reads the instrument name from the header of the uf event file it is processing and uses the appropriate hx1.att or hx2.att file produced by cams2att.
The name of or list of the names of the auxiliary ("delta") attitude files needed for certain coordinate transformations (e.g., Hitomi HXI RAW-->ACT). If a list of files is needed, they can be entered one per line in a text file, and then dattfiles should be set to that text filename prefixed with "@", for example dattfiles = "@dattfiles.txt". A delta-attitude file must be provided for each coordinate transformation of type 'SKYATT' in the teldef file, with the exception of the transformation to the SKY system. The delta-attitude must be in quaternion format.

(orbfile = NONE) [filename]
Set to the hxipipeline orbit parameter (see above)

AHGTIGEN:

mkffile [filename]
Set to the makefiler file parameter the first time ahgtigen runs.
Set to the extended_housekeeping file parameter the second time ahgtigen runs (unless the files being generated are pseudo event files).

outfile [filename]
Set to ${hxifile_out} . gtimkf, when the input file is set to the makefiler file parameter.
Set to ${hxifile_out} . gtiehk, when the input file is set to the extended_housekeeping file parameter.

(instrume = NONE) [string]
(HXI1 or HXI2) Read from the header of the file being processed.

(label = NONE) [string]
HXISFFA1CAM or HXISFFA1PSE depening on if the files being generated are "clean" or "pseudo" respectively.

AHSCREEN:

infile [string]
Set systematically to the elements in an array which is constructed from any reconstructed unfiltered event files produced in the calibration stage.
If the calibration stage is being skipped, this array is filled from searching the the input directory instead.

outfile [filename]
Set to the same name as infile, but in the outdir directory and changing the extention from "rec_ufa.evt" to "rec_cl.evt".

(gtifile) [string]
Set as an array of gtifiles with cooresponding extentions; pointing, tel, mkf, and (where applicable) ehk.

(upkeyword = YES) [boolean]
Update timing keywords from input file(s) in output file
Hardcoded as yes

(label = NONE) [string]
HXISFFA1CAM or HXISFFA1PSE depening on if the files being generated are "clean" or "pseudo" respectively.

EXAMPLES

  1. The following command will recalibrate (stage 1) and re-screen (stage 2) all HXI data for sequence 100039010 that currently resides in the directory /data/100039010/hxi/event_uf, and the output will be stored in a directory called /data/100039010_reproc/:

    hxipipeline indir=/data/100039010/hxi/event_uf outdir=/data/100039010_reproc entry_stage=1 exit_stage=2 steminputs=ah100039010 attitude=/data/100039010/auxil/ah100039010/ah100039010.att orbit=/data/100039010/auxil/ah100039010/ah100039010.orb obsgti=/data/100039010/auxil/ah100039010/ah100039010_gen.gti makefilter=/data/100039010/auxil/ah100039010/ah100039010.mkf exended_housekeeping=/data/100039010/auxil/ah100039010/ah100039010.ehk

  2. The following command will re-screen (stage 2 only) HXI data for the same data set as in the previous example.

    hxipipeline indir=/data/100039010/hxi/event_uf outdir=/data/100039010_reproc entry_stage=2 exit_stage=2 steminputs=ah100039010 obsgti=/data/100039010/auxil/ah100039010/ah100039010_gen.gti makefilter=/data/100039010/auxil/ah100039010/ah100039010.mkf exended_housekeeping=/data/100039010/auxil/ah100039010/ah100039010.ehk

  3. The following command will create products (stage 3 only) HXI data for a calibrated data set:

    hxipipeline indir=/data/100039010/hxi/event_cl outdir=/data/100039010_reproc entry_stage=3 exit_stage=3 steminputs=ah100039010 regionfile=none

NOTES

None, but see help for individual parameters above.

SEE ALSO

ahcalctime ahpipeline cams2att hxisgdsff hxisgdpha hxievtid coordevt ahfilter ahgtigen ahscreen

LAST MODIFIED

February 2016