NAME

sxspipeline - Hitomi SXS reprocessing tool

USAGE

sxspipeline indir outdir steminputs stemoutputs entry_stage attitude orbit obsgti housekeeping timfile

DESCRIPTION

The sxspipeline task duplicates most of the pipeline (but not trend data) for the Hitomi SXS. 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.

SXS Pipeline Stages

The sxspipeline is divided into 2 stages:

  1. Calibration
  2. Data screening
Each stage may be run singly, or in combination with the preceding stages. This is controlled by the 'entry_stage' and 'exit_stage' parameters.

SXS Stage 1 consists of the following steps:

  1. (optional) Calculate GTIFOUNDALL (gtiinvert on GTILOST)
  2. Run mxsgti
  3. Calculate <gaingti> GTI file:
  4. Run sxsanticopi
  5. For each event file:
    1. Run coordevt
    2. Run sxsflagpix
    3. Run sxssecid
  6. Calculate GHF (gain history file)
    1. Merge pointing and slew event files
    2. Select merged file
      • if 'linetocorrect=MnKa':
        PIXEL==12&&ITYPE<5&&gtifilter("<gaingti>")
      • else:
        PIXEL!=12&&ITYPE<5&&gtifilter("<gaingti>")
    3. Run ftsort on filtered merged file
    4. Run sxsgain on filtered, sorted merged file
  7. For each event file:
    1. Run sxspha2pi (GHF input)
    2. Run sxsflagpix
    3. Run sxssecid
    4. Run sxsseccor
    5. Run sxspha2pi (GHF input)
    6. Run sxsperseus

By default, 'linetocorrect=MnKa', which causes the GHF to be calculated using the calibration pixel ("Cal-pix") method.
The other possible options for the calibration method are:

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 SXS events, see:

Default GTI used for screening data are:

INPUT

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

   sxspipeline indir=/path/to/100039010/sxs/event_uf

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

OUTPUT

File names, etc.

The number of output files depends on both the 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 are 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 = indir/ [string]
Directory containing the input data. This should be the path to the event_uf:

   /path/to/805062010/sxs/event_uf

outdir = outdir/ [string]
Output directory used for all output data, as well as the report file.

CAUTION: If 'clobber=yes', and this directory already exists, this task overwrites files as needed in this directory.

steminputs = ah1001 [string]
Base (stem) for FITS input files (e.g., ah100039010). This string is used as the base file name for finding input files. For example, if 'steminputs=ah100039010', then to find the event file, sxspipeline matches the regular expression /ah100039010sxs_[ps][\d][0-9]{4}_uf\.evt(\..+)?$/ against all files found in the 'indir' directory.

(stemoutputs = DEFAULT) [string]
Base (stem) output name used for creating output files. If set to DEFAULT, 'steminputs' is used.

entry_stage = 1 [integer 1|2]
Entry stage, 1 or 2.

Stage 1: Re-calibrate unfiltered event files.

Stage 2: Start from existing unfiltered event files.

exit_stage = 2 [integer 1|2]
Exit stage, 1 or 2.

Stage 1: Produces calibrated unfiltered event files.

Stage 2: Produces screened event files.

attitude = ah1001.att [string]
Attitude file.

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

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

orbit = ah1001.orb [string]
Orbit file.

obsgti = ah1001_gen.gti [string]
Observation GTI file.

housekeeping = ah1001sxs_a0.hk1 [string]
SXS housekeeping file.

timfile = ah1001.tim [string]
Input TIM file.

(sxs_mkflabel = PIXELALL3) [string]
Label to use for SXS MKF GTI creation.

(sxs_ehklabel = PIXELALL3) [string]
Label to use for SXS EHK GTI creation.

(sxs_evtlabel = PIXELALL3) [string]
Label to use for SXS event screening.

(regionfile = NONE) [string]
Input region file.

(sxs_start = 0.0) [double]
Earliest validity time for SXS calibration files.

(ra = -999.99999) [real]
Right ascension [degrees] of the point to appear in the center of SKY coordinate images. If 'ra' is within the range 0 <= 'ra' <= 360, the value of the parameter is used and is written to the keyword RA_NOM in output files. 'ra' is outside this range, the 'ra' value is read from the event header of the input file, by searching first for the RA_NOM keyword and if found using its value, or if not found, by searching for the RA_PNT keyword and using its value. If neither keyword is found, the called task coordevt exits with an error.

(dec = -999.99999) [real]
Declination [degrees] of the point to appear in the center of SKY coordinate images. If 'dec' is within the range -90 <= 'dec' <= +90, the value of the parameter is used and is written to the keyword DEC_NOM in output files. If 'dec' is outside this range, the 'dec' value is read from the event header of the input file, by searching first for the DEC_NOM keyword and if found using its value, or if not found, by searching for the DEC_PNT keyword and using its value. If neither keyword is found, the called task coordevt exits with an error.

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

(optdetx = -999.99999) [double]
SXS optical axis DETX coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTDETX header keyword.

(optdety = -999.99999) [double]
SXS optical axis DETY coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTDETY header keyword.

(optfocx = -999.99999) [double]
SXS optical axis FOCX coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTFOCX header keyword.

(optfocy = -999.99999) [double]
SXS optical axis FOCY coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTFOCY header keyword.

(optskyx = -999.99999) [double]
SXS optical axis SKYX coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTSKYX header keyword.

(optskyy = -999.99999) [double]
SXS optical axis SKYY coordinate. If this parameter is set to a value other than the default, the value is used only to set the OPTSKYY header keyword.

(ra_pnt = -999.99999) [double]
RA of SXS pointing [deg]. If this parameter is set to a value other than the default, the value is used only to set the RA_PNT header keyword.

(dec_pnt = -999.99999) [double]
DEC of SXS pointing [deg]. If this parameter is set to a value other than the default, the value is used only to set the DEC_PNT header keyword.

(calc_gtilost = no) [boolean yes|no]
Perform calculations on SXS lost GTI: (1) If no lost GTI file is found as part of the observation sequence, create one. (2) Compute the inverse of the lost GTI.

(screenlost = no) [boolean yes|no]
Screen events using the inverse of the lost GTI.

(teldeffile = CALDB) [string CALDB|file name]
Input teldef file.

(leapsecfile = REFDATA) [string CALDB|REFDATA|file name]
Name of the leap second file. If set to CALDB or REFDATA, the file in the calibration database or in the REFDATA area, respectively, is used.

(selectfile = CALDB) [filename]
The file containing selection expressions. If 'selectfile' is set to CALDB, the file is read from the calibration database.

(gainantfile = CALDB) [filename CALDB|file name]
Parameter for sxsanticopi: Input antico gain file for SXS.

(pixdeffile = CALDB) [string CALDB|file name]
Parameter for sxsflagpix: Input SXS electrical pixel map file.

(gainfile = CALDB) [filename CALDB|file name]
Parameter for sxsgain, sxspha2pi: Input SXS gain coefficients file.

(linefitfile = CALDB) [filename CALDB|file name]
Parameter for sxsgain: Input calibration line file for SXS.

(delayfile = CALDB) [filename CALDB|file name]
Parameter for mxsgti: input instrument time delay file for SXS.

(sxs_pulsefile = CALDB) [filename CALDB|file name]
Parameter for sxsseccor: Input file with pulse amplitudes.

(adrgti = REFDATA) [string REFDATA|file name]
Input ADR (Adiabatic Demagnetization Refrigerator) GTI file. This is one of the GTI passed to ahscreen for SXS.

(acphaoffset = 0.0) [float]
Parameter for sxsanticopi: Average offset added to PHA values before applying the gain. A random offset is added to each PHA between -0.5+acphaoffset and +0.5+acphaoffset. Therefore, when 'acphaoffset=0.5', the random offset is between 0 and 1.

(pxphaoffset = 0.0) [float]
Parameter for sxsgain and sxspha2pi: Average offset added to PHA values before applying the gain. A random offset is added to each PHA between -0.5+pxphaoffset and +0.5+pxphaoffset. Therefore, when 'pxphaoffset=0.5', the random offset is between 0 and 1.

(stimecol = S_TIME) [string]
Parameter for mxsgti: Name of S_TIME column.

(tioncol = FWE_TI_LED#_ON) [string]
Parameter for mxsgti: Input TI columns with LED on (#=1-4).

(tioffcol = FWE_TI_LED#_OFF) [string]
Parameter for mxsgti: Input TI columns with LED off (#=1-4).

(plslencol = FWE_LED#_PLS_LEN) [string]
Parameter for mxsgti: Input pulse length columns (#=1-4).

(plsspccol = FWE_LED#_PLS_SPC) [string]
Parameter for mxsgti: Input pulse spacing columns (#=1-4).

(timeoncol = TIME_LED#_ON) [string]
Parameter for mxsgti: Output LED-on time columns (#=1-4).

(timeoffcol = TIME_LED#_OFF) [string]
Parameter for mxsgti: Output LED-off time columns (#=1-4).

(calctime = yes) [boolean yes|no]
Parameter for mxsgti: Perform time assignment.

(calcgti = yes) [boolean yes|no]
Parameter for mxsgti: Produce GTI files.

(afterglow = yes) [boolean yes|no]
Parameter for mxsgti: Add afterglow to fine GTI STOP times.

(dtdecay = CALDB) [string]
Parameter for mxsgti: Afterglow time [s].

(interp = TWOPOINT) [string NEAREST|TWOPOINT]
Parameter for mxsgti: Interpolation method.

(margingti = yes) [boolean yes|no]
Parameter for mxsgti: Create GTI between 'tstart' and the first input GTI and between 'tstop' and the last input GTI.

(tstart = DEFAULT) [string]
Parameter for mxsgti: Value to use for 'tstart' [s], or if 'tstart=DEFAULT', take from 'infile'.

(tstop = DEFAULT) [string]
Parameter for mxsgti: Value to use for 'tstop' in seconds, or if 'tstop=DEFAULT', take from 'infile'.

(dt = 0.) [double]
Time separation [s] between input and output GTI.
Time gap [s] between input GTI times and corresponding output GTI times. Output start times are later than the input stop times by 'dt', and output stop times are earlier than the input start times by 'dt'.

(coordevt_startsys = LOWEST) [string LOWEST|RAW|ACT|DET|FOC|SKY|HIGHEST]
Parameter for coordevt: Name of the intitial coordinate system for coordinate conversions.

(stopsys = HIGHEST) [string LOWEST|RAW|ACT|DET|FOC|SKY|HIGHEST]
Parameter for coordevt: Name of the final coordinate system for coordinate conversions.

(annaber = no) [string yes|no|invert]
Parameter for coordevt: Apply annual aberration correction.

(followsun = yes) [boolean yes|no]
Parameter for coordevt: Recalculate the Sun position for each event.

(orbaber = no) [string yes|no|invert]
Parameter for coordevt: Apply satellite orbital aberration correction.

(attinterp = LINEAR) [string LINEAR|CONSTANT]
Parameter for coordevt: Spacecraft attitude interpolation method.

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

(chkattgap = no) [boolean yes|no]
Parameter for coordevt: Limit attitude interpolation if gaps are present.

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

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

(attform = QUAT) [string QUAT|EULER]
Parameter for coordevt: Attitude format.

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

(orbcol = VELOCITY) [string]
Parameter for coordevt: Orbital velocity column name.

(orbform = VECTOR) [string VECTOR|COMPONENTS|KEPLERIAN]
Parameter for coordevt: Orbital velocity format.

(coordevt_randomize = TELDEF) [string yes|no|teldef]
Parameter for coordevt: Randomize coordinates when rebinning.

(randsys = TELDEF) [string]
Parameter for coordevt: Starting from coordinate system specified by 'randsys' (default specified in RANCOORD keyword in teldef file), coordinate conversions are randomized, up to the highest coordinate system.

(randscalesys = TELDEF) [string]
Parameter for coordevt: Name of the coordinate system to determine the scaling factor for the randomization interval, +/- 0.5 of a pixel in that coordinate system. The default is to get the name from the RAN_SCL keyword in the teldef file.

(infileext = EVENTS) [string]
Parameter for coordevt: Event extension name.

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

(inclfloatcol = no) [boolean yes|no]
Parameter for coordevt: Write non-rounded coordinate columns.

(inclfloatskycol = no) [boolean yes|no]
Parameter for coordevt: Write non-rounded SKY coordinate columns.

(floatcolsuffix = _FLOAT) [string]
Parameter for coordevt: Suffix for non-rounded coordinate columns.

(startwithfloat = no) [boolean yes|no]
Parameter for coordevt: Start with non-rounded 'startsys' coordinates.

(blankcol = yes) [boolean yes|no]
Parameter for coordevt: Assign null values to columns not calculated.

(btnull = 255) [integer]
Parameter for coordevt: TNULL for byte (B) columns.

(itnull = -999) [integer]
Parameter for coordevt: TNULL for short (I) columns.

(jtnull = -999) [integer]
Parameter for coordevt: TNULL for long (J) columns.

(ktnull = -999) [integer]
Parameter for coordevt: TNULL for long (K) columns.

(sbtnull = 255) [integer]
Parameter for coordevt: TNULL for signed byte columns.

(uitnull = -999) [integer]
Parameter for coordevt: TNULL for unsigned short columns.

(ujtnull = -999) [integer]
Parameter for coordevt: TNULL for unsigned long columns.

(antpsp = A) [string A|B]
Parameter for sxsflagpix: Antico PSP to use for coincidence (A = PSP-A, B = PSP-B).

(antshift = CALDB) [string]
Parameter for sxsflagpix: Time offset [s] between event time and central time for defining the window used for antico flagging.

(calcant = yes) [boolean yes|no]
Parameter for sxsflagpix: Flag antico events.

(antdtpre = CALDB) [string]
Parameter for sxsflagpix: Delta time [s] preceding an antico event.

(antdtfol = CALDB) [string]
Parameter for sxsflagpix: Delta time [s] following an antico event.

(antswitch = 1) [integer]
Parameter for sxsflagpix: If 'inantfile' are used in place of 'antdtfol'. If 'antswitch=1', the 'antdtfol' parameter is used.

(antphathr = 71) [integer]
Parameter for sxsflagpix: PHA threshold for antico events.

(antdurthr = 2) [integer]
Parameter for sxsflagpix: Duration threshold for antico events in units of 80 microseconds.

(calcctrec = yes) [boolean yes|no]
Parameter for sxsflagpix: If 'calcctrec=yes', events are checked for recoil crosstalk flagging; if 'calcctrec=no', this is skipped.

(ctrecdt = CALDB) [string]
Parameter for sxsflagpix: Delta time [s] for flagging recoil crosstalk.

(calcprox = yes) [boolean yes|no]
Parameter for sxsflagpix: If 'calcprox=yes', events are checked for basic temporal proximity with any other event.

(proxdt = CALDB) [string]
Parameter for sxsflagpix: Time interval [s] between events required for proximity crosstalk to be flagged.

(calcctel = yes) [boolean yes|no]
Parameter for sxsflagpix: If 'calcctel=yes', events are checked for electrical crosstalk flagging using the 'cteldt' time interval.

(cteldt = CALDB) [string]
Parameter for sxsflagpix: Delta time [s] for flagging electrical crosstalk.

(ctelnear = 1) [integer]
Parameter for sxsflagpix: Number of nearby pixels to be checked for electrical crosstalk, where proximity is defined by 'pixdeffile' and restricted to quadrants of the SXS detector.

(calcctel2 = yes) [boolean yes|no]
Parameter for sxsflagpix: If 'calcctel2=yes', events are checked for electrical crosstalk flagging using the 'cteldt2' time interval.

(cteldt2 = CALDB) [string]
Parameter for sxsflagpix: Delta time [s] for flagging electrical crosstalk 2.

(ctelnear2 = 1) [integer]
Parameter for sxsflagpix: Number of nearby pixels to be checked for electrical crosstalk 2, where proximity is defined by 'pixdeffile' and restricted to quadrants of the SXS detector.

(pxpithr = 600) [integer]
Parameter for sxsflagpix: Events with PI values below this threshold are excluded from flagging checks of the types listed by the 'usepxpithr' parameter.

(usepxpithr = ALL) [string ALL|NONE|PROX|CTEL|CTEL2|CTREC]
Parameter for sxsflagpix: A comma-delimited list specifying which flagging types should use the 'pxpithr' parameter for excluding events. Allowed values in the list are ALL, NONE, PROX (proximity), CTEL (electrical crosstalk), CTEL2 (2nd electrical crosstalk), and CTREC (recoil crosstalk). Events that do not belong to the types specified in the list are excluded from flagging regardless of their PI value.

(calcmxs = yes) [boolean yes|no]
Parameter for sxsflagpix: If 'calcmxs=yes', events are checked for coincidence with MXS events.

(mxsdt = CALDB) [string]
Parameter for sxsflagpix: Time interval [s] by which the MXS pulse stop times given in the MXS GTI are extended to account for MXS afterglow.

(kalow = 5860.) [double]
Parameter for sxsflagpix: Lower energy limit [eV] of Mn K-alpha for recoil PHA test.

(kahigh = 5930.) [double]
Parameter for sxsflagpix: Upper energy limit [eV] of Mn K-alpha for recoil PHA test.

(kbeta = 6450.) [double]
Parameter for sxsflagpix: Energy [eV] of Mn K-beta for recoil PHA test.

(dtflag = no) [boolean yes|no]
Parameter for sxsflagpix: Add additional columns to the output containing actual delta time values for crosstalk and antico.

(dtprimary = CALDB) [string]
Parameter for sxssecid: Time interval [ms] that distinguishes between primary and secondary events, used if 'regrade=yes'.

(dtlowmid = CALDB) [string]
Parameter for sxssecid: Time interval [ms] that distinguishes between low- and mid-resolution events, used if 'regrade=yes'.

(dtmidhigh = CALDB) [string]
Parameter for sxssecid: Time interval [ms] that distinguishes high- and mid-resolution events, used if 'regrade=yes'.

(tol = 2.0) [double]
Parameter for sxssecid: Allowed tolerance [ns] for associating secondaries and primaries.

(regrade = no) [boolean yes|no]
Parameter for sxssecid: If 'regrade=yes', the events are regraded based on their assigned times and the 'dtprimary', 'dtlowmid', and 'dtmidhigh' parameters. A newly calculated grade is written into the column specified by the 'itypecol' parameter.

(sxs_resetflags = yes) [boolean yes|no]
Parameter for sxsflagpix: Reset selected SXS event STATUS flags before processing. Multiple values may be specified as a comma-separated list.

(phaout = PHA2) [filename]
Parameter for sxsseccor: Name of output PHA column.

(gaincoeff = H) [string H|M|L]
Parameter for sxsgain: Type of gain coefficients to use.

(linetocorrect = Mnka) [string MnKa|MnKb|CuKa|CuKb|CrKa|CrKb|AlKa|AlKb|MgKa|MgKb]
Parameter for sxsgain: Line to fit (HDU name in 'sxs_linefitfile').

(numevent = 250) [integer]
Parameter for sxsgain: Maximum mumber of events collected for each spectrum used to calculate a single gain correction.

(minevent = 150) [integer]
Parameter for sxsgain: Minimum mumber of events collected for each spectrum used to calculate a single gain correction.

(grpoverlap = 50.) [double]
Parameter for sxsgain: Percentage of overlap between adjacent groups.

(startenergy = -1.) [double]
Parameter for sxsgain: Lower limit of energy range [eV] over which the spectra are collected (-1 = automatic).

(stopenergy = -1.) [double]
Parameter for sxsgain: Upper limit of energy range [eV] over which the spectra are collected (-1 = automatic).

(extraspread = 40.) [double]
Parameter for sxsgain: Energy [eV] by which the energy range is extended on either side, beyond the lowest and highest energies in 'sxs_linefitfile', for the selected calibration feature.

(broadening = 1.0) [double]
Parameter for sxsgain: FWHM [eV] initial Gaussian broadening of calibration line profile. If 'fitwidth' is set to no, the profile width is fixed at this value.

(gridprofile = no) [boolean yes|no]
Parameter for sxsgain: If 'gridprofile' is set to yes, only output the theoretical profile, including any convolution due to the broadening parameter; no fitting is conducted.

(fitwidth = yes) [boolean yes|no]
Parameter for sxsgain: Fit spectral line width.

(background = CONST) [string NONE|CONST|SLOPE]
Parameter for sxsgain: Fitted background type.

(spangti = yes) [boolean yes|no]
Parameter for sxsgain: If 'spangti' is set to yes, events in different time intervals in 'gtifile' may be collected in the same spectrum to be fitted.

(usemp = no) [boolean yes|no]
Parameter for sxsgain: If 'usemp=no', only high-resolution primaries are included in the fitted spectra. If 'usemp=yes', mid-resolution primaries are also included.

(calcerr = yes) [boolean yes|no]
Parameter for sxsgain: Compute uncertainties on SHIFT and WIDTH.

(writeerrfunc = yes) [boolean yes|no]
Parameter for sxsgain: Output uncertainty functions.

(avgwinrad = 30) [double]
Parameter for sxsgain: Radius of interval (in units of 'binwidth') used only to update the initial shift estimate prior to fitting, not used in calculating the average results.

(minwidth0 = 1.0) [double]
Parameter for sxsgain: Smallest width (in units of 'binwidth') allowed as the initial value in width fitting.

(maxitcycle = 5) [integer]
Parameter for sxsgain: Maximum number of fitting iterations.

(r2tol = .001) [double]
Parameter for sxsgain: Convergence criterion for R-squared.

(searchstepshift = 2.0) [double]
Parameter for sxsgain: Step size ['binwidth'] when fitting shift.

(maxdshift = 5.0) [double]
Parameter for sxsgain: Largest allowed deviation ['binwidth'] from initial guess of shift.

(bisectolshift = 0.001) [double]
Parameter for sxsgain: When the bisection method determines the energy shift to within this amount (in units of 'binwidth'), the fitting procedure is completed.

(searchstepwidth = 5.0) [double]
Parameter for sxsgain: Step size ['binwidth'] when fitting line width.

(maxdwidth = 10.0) [double]
Parameter for sxsgain: Largest allowed deviation ['binwidth'] during fitting, from initial guess of line width.

(bisectolwidth = .001) [double]
Parameter for sxsgain: When the bisection method determines the convolution width to within this amount (in units of 'binwidth'), the fitting procedure is completed.

(minwidth = 0.5) [double]
Parameter for sxsgain: Smallest width ['binwidth'] to allow in width fitting.

(nerrshift = 100) [integer]
Parameter for sxsgain: Number of shift values in uncertainty calculations.

(nerrwidth = 100) [integer]
Parameter for sxsgain: Number of width values in uncertainty calculations.

(shifterrfac = 3.0) [double]
Parameter for sxsgain: Factor for determining the range of shift uncertainty arrays.

(widtherrfac = 4.0) [double]
Parameter for sxsgain: Factor for determining the range of width uncertainty arrays.

(calcupi = yes) [boolean yes|no]
Parameter for sxspha2pi: Calculate UPI column.

(scalefile = CALDB) [filename]
Parameter for sxspha2pi: Input EPI scale file for cal pixel.

(secphacol = PHA) [string]
Parameter for sxspha2pi: Input PHA column to use for secondary correction.

(scaleepi = no) [boolean yes|no]
Parameter for sxspha2pi: Scale EPI values using data in the file 'scalefile'.

(scalegrade = 0) [string]
Parameter for sxspha2pi: List of grades to apply scale factors.

(calcpi = yes) [boolean yes|no]
Parameter for sxspha2pi: Calculate PI column.

(addepicol = EPI2) [string]
Parameter for sxspha2pi: Output energy column with secondary correction.

(method = FIT) [string FIT|AVERAGE]
Parameter for sxspha2pi: Correction method. If 'method=FIT', the TEMP_FIT column in the 'drift' file made by sxsgain is used. If 'method=AVERAGE', the TEMP_AVG column is used.

(extended = no) [boolean yes|no]
Parameter for sxspha2pi: Use extended energy range if 'extended=yes'.

(binwidth = 0.5) [double]
Parameter for sxspha2pi: PI bin width [eV] for extended energy range.

(offset = 0.5) [double]
Parameter for sxspha2pi: Offset [eV] for first PI for extended energy range.

(tlmax = 32767) [integer]
Parameter for sxspha2pi: Maximum PI channel for extended energy range.

(writetemp = no) [boolean yes|no]
Parameter for sxspha2pi: Output the temperature that was used in the gain determination for each event.

(dgfile = REFDATA) [filename]
Parameter for sxsperseus: Input gain coefficients file.

(offsetfile = REFDATA) [filename]
Parameter for sxsperseus: Calibration offset file.

(outrange = NULL) [filename]
Parameter for sxsperseus: How events are handled outside the time range.

(itypecol = ITYPE) [string]
Parameter for sxsextend, sxsgain, sxspha2pi, sxssecid, sxsseccor: Name of ITYPE column.

(ckctrec = yes) [boolean yes|no]
Parameter for sxsgain, sxssecid: Exclude events with recoil crosstalk.

(ckctel = yes) [boolean yes|no]
Parameter for sxsgain, sxssecid: Exclude events with electrical crosstalk.

(ckant = yes) [boolean yes|no]
Parameter for sxsgain, sxssecid: Exclude events with antico coincidence.

(ckrisetime = yes) [boolean yes|no]
Parameter for sxsgain, sxssecid, sxsflagpix: Do not use events with RISE_TIME > 127.

(tempidx = 2) [integer]
Parameter for sxsgain, sxspha2pi: Input temperature index for selecting gain.

(ntemp = 3) [integer]
Parameter for sxsgain, sxsextend, sxspha2pi: Number of temperatures from gain file to use in interpolation.

(gapdt = -1.0) [double]
Parameter for gain-fitting tasks (e.g. ahgainfit), sxspha2pi, sxsextend: Time [s] between events to define a gap (or <0).

(extrap = no) [boolean yes|no]
Parameter for gain-fitting tasks (e.g. ahgainfit), sxspha2pi, sxsextend: Allow extrapolation when determining drift temperature.

(randomize = yes) [boolean yes|no]
Parameter for sxsanticopi, sxspha2pi: Allow randomization in calculating PI from integer PHA.

(seed = 0) [integer]
Parameter for multiple tasks: Random number generator seed. If 'seed=0' the system time is used.

(stemreport = ) [string]
File stem for log and temporary files. If the parameter is not set, the script automatically sets the stem to "sxspipeline_YYYYMMDDTHHMMSS_" and appends log file and temp file names as needed.

(numerrs = 0) [string]
Number of errors from sxspipeline (output only).

(cleanup = yes) [boolean yes|no]
Delete temporary files if 'cleanup=yes'.

(clobber = no) [boolean yes|no]
Overwrites the existing output file if set to yes.

(chatter = 2) [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 filename. 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

  1. The following command recalibrates (Stage 1) and re-screens (Stage 2) all SXS data for sequence 100039010 that currently resides in the directory /data/100039010/sxs/event_uf, and the output is stored in a directory called /data/100039010_reproc/, as well as recalculating the SXS lost off GTI:
       sxspipeline indir=/data/100039010/sxs/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 \
          housekeeping=/data/100039010/sxs/hk/ah100039010sxs_a0.hk1 makefilter=/data/100039010/auxil/ah100039010/ah100039010.mkf \
          exended_housekeeping=/data/100039010/auxil/ah100039010/ah100039010.ehk calc_gtilost=yes
    
  2. The following command re-screens (Stage 2 only) SXS data for the same data set as in the previous example:
       sxspipeline indir=/data/100039010/sxs/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
    

NOTES

SEE ALSO

ahcalctime, ahpipeline, mxsgti, sxsanticopi, coordevt, sxssecid, sxsflagpix, sxsgain, sxspha2pi, ahfilter, ahgtigen, ahscreen

LAST MODIFIED

February 25, 2024