Hitomi relaese V002 May 10 2016

List of Changes

*******************************************************************************
                                    HITOMI
********************************************************************************
Major changes introduced in this version:

  * HEASOFT

    - arftable: 
      * Bug-fix: all string comparisons are now case-insensitive.

    - barycen:
      * Bug-fix: TIME column values of zero no longer result in an error.
      * Behavior change: no longer restricted to EVENTS and GTI extensions.
      * Behavior change: adjust TIME column values by the TIMEZERO keyword, 
        if present.

    - xrtraytrace
      * Bug-fix: check validity of source and psrcfile parameters.
      * Behavior change: write DATE, DATASUM, and CHECKSUM keywords to the
        output files.

    - xrtreftable: 
      * Behavior change: write DATE, DATASUM, and CHECKSUM keywords to the
        output files.

    - searchflickpix
      * Bug-fix: correct the keywords describing the output coordinate columns.
      * Bug-fix: all string comparisons are now case-insensitive.

    - heasim
      * New feature: can now assign time when simulating burst sources with
        subexposure mode engaged.
      * Bug-fix: it was possible for an array index to be out-of-bounds in
        the find_index() routine.
      * Behavior change: warn user if the point source or centroid of an
        extended source falls on a detector gap or outside the field-of-view.

    - gtiinvert:
      * Bug-fix: correctly handle case where outfile=infile.
      * Behavior change: skip input rows where START or STOP column values
        are NULL.
      * Behavior change: copy the HDUCLAS1 keyword from the input file.


  * General Applications:

    - aberattitude:
      * Removed feature: aspect calculation is removed; use aspect task.

    - ahcalctime:
      * Bug-fix: indir and outdir parameter values were not used correctly.

    - ahgtigen:
      * Bug-fix: perform validity check for all parameter values.
      * Behavior change: now accepts any type of input file, including HK.
      * Behavior change: change default value for postfr parameter to 1.

    - ahpipeline:
      * Bug-fix: correct problems when searching for input files.
      * Behavior change: replace general HK1 and HK2 input files with general
        HK file.

    - hxipipeline, sgdpipeline, sxipipeline, sxspipeline:
      * New parameters: add new parameters from sxspha2pi task (see sxspha2pi).
      * New parameter: screenlost - choose if SXS lost events should be
        screened during cleaning.
      * Bug-fix: check for valid DATAMODE.
      * Bug-fix: correct writing of coordinate and checksum keywords to the
        output files.
      * Bug-fix: create SXI bad image files when there are multiple event files.
      * Bug-fix: read DATACTLM keyword from SXI event files when cleaning to
        find the correct GTI extension created by sximodegti.
      * Behavior change: set cpkeyword parameter to 'yes' in ahscreen call.
      * Behavior change: during the cleaning step, filter using GTI extension
        attached to the unfiltered event file.
      * Behavior change: add GTI extension to all reconstructed event files
        missing a GTI extension.
      * Behavior change: change the default value for the bad_status parameter
        for SXI.
      * Behavior change: skip SXI input files with DATACLASS=00000000.
      * Behavior change: skip files with an empty GTI extension during
        screening instead of exiting with an error.
      * Behavior change: change name of output driftfile from sxsgain.
      * Behavior change: no longer merge the SXS lost GTI file.
      * Behavior change: write timing keywords to the pixel 12 GTI extension.

    - ahscreen:
      * Bug-fix: copy only the EVENTS extension from input file.
      * Behavior change: no longer use the GTI attached to event file when
        merging GTI files.
      * Behavior change: copy all keywords from the 1st input event file to
        the GTI extension in the output event file.
      * Behavior change: allow input event files to be merged without screening.

    - attconvert: 
      * Bug-fix: Correct existence check of the output file to allow the
        cfitsio error message to be displayed.

    - det2att2:
      * Behavior change: store the TELDEF file name into the teldeffile
        parameter if the input value was "CALDB".


  * Mission Applications:

    - aharfgen:
      * Bug-fix: perform validity check for all parameter values.
      * Behavior change: when calling hxirspeffimg, set the vigfile parameter
        value to "NONE".

    - ahgainfit:
      * Bug-fix: correct calculation of the width uncertainity from Chi^2.
      * Bug-fix: all string comparisons are now case-insensitive.

    - ahexpmap:
      * Bug-fix: correct handling of input energies when the specmode parameter
        is set to "MONO". 
      * Bug-fix: correct accumulation of multiple intervals for partial pixels.
      * Behavior change: only process gatevalve CALDB file if the GATEVALV
        keyword is "CLOSE" in the event file.
      * Behavior change: include inactive pixels in partial pixel lists. 
      * Behavior change: show bad columns and charge injection rows on exposure
        map and efficiency map images.

    - ahmkehk:
      * Bug-fix: all string comparisons are now case-insensitive.
      * Bug-fix: added check for -999 in the RA_NOM, DEC_NOM, and PA_NOM
        keywords which represents NULL.
      * Bug-fix: ensure that the telescope and SAA vertex longitudes are both
        in the range (-180,+180) degrees before comparing them.

    - ahmkregion:
      * Bug-fix: all string comparisons are now case-insensitive.
      * Bug-fix: correct how coordpnt results are read from the log file.

    - ahnxbgen:
      * Behavior change: set parameters, prefr=0 and postfr=1, when running
        the maketime tool.

    - ahsxtarfgen:
      * Bug-fix: check for a GATEVALV keyword value of "CLOSE" instead of
        "CLOSED".
      * Bug-fix: exit with error instead of crashing when the minimum number of
        photons per energy (minphoton parameter) is not satisfied.

    - ahtime:
      * Bug-fix: all string comparisons are now case-insensitive.
      * Bug-fix: set the START column value to NULL when the SampleCnt column
        value is NULL for SXS lost GTI files.
      * Bug-fix: skip duplicate rows in the input lookup tables.

    - camssim:
      * Bug-fix: all string comparisons are now case-insensitive.

    - hxirspeffimg:
      * New feature: write an output ARF file in addition to the RSP file.
      * Behavior change: do not write the RSP and ARF files if there are
        insufficient photons.


  * HXI/SGD Applications:

    - hxievtid:
      * Help: define meaning of STATUS column bits in help file.

    - hxisgddtime:
      * Bug-fix: exit with error when tool fails to read/write a keyword.
      * Bug-fix: correct writing of the LIVETIME keyword.
      * Behavior change: write ONTIME, LIVETIME, EXPOSURE, and DEADC keywords
        to the WMAP and GTI extensions, if they are present.

    - hxisgdexpand:
      * Bug-fix: all string comparisons are now case-insensitive.

    - hxisgdsff:
      * Bug-fix: all string comparisons are now case-insensitive.

    - hxisgdmerge:
      * Bug-fix: all string comparisons are now case-insensitive.

    - sgdarfgen:
      * Bug-fix: all string comparisons are now case-insensitive.

    - sgdevtid:
      * Help: define meaning of STATUS column bits in help file.
      * Bug-fix: correct DISTANCE0 column description in output file.


  * SXI Applications:

    - sxiflagpix:
      * Help: define meaning of STATUS column bits in help file.

    - sximodegti:
      * Behavior change: remove check for area discrimination.
      * Behavior change: change name of input column DATACLASS to DATACTLM.

    - sxipi:
      * Help: define meaning of updated STATUS column bits in help file.

    - sxirmf:
      * Bug-fix: correct the calculation of the RMF weighting factor.


  * SXS Applications: 

    - mxsgti:
      * Bug-fix: perform validity check on parameter values.

    - mxstime:
      * Bug-fix: the fine GTI were not calculated correctly when both 1) an
        input MXS interval has a STOP value defined but no START value and 
        2) the afterglow time is larger than the MXS pulse spacing.
      * Behavior change: set the HDUCLAS1 keyword to "GTI" in the output GTI
        files.

    - sxsflagpix:
      * Behavior change: set the Hitomi bit of PROC_STATUS (17th bit) to
        1 (meaning bad event) for rows where PIXEL=NULL.

    - sxsgain:
      * Bug-fix: correct calculation of Chi^2 width uncertainity.
      * Behavior change: support GTI files with no DETNAM keyword set.
      * Behavior change: allow extended syntax with input GTI file names.

    - sxsmkrmf: 
      * New tool: create an SXS RMF file and/or an RSP file for selected 
        SXS pixels and grades.

    - sxspha2pi:
      * New parameter: secphacol - PHA column used to compute EPI2.
      * New parameter: scaleepi - set to 'yes' to scale EPI values by
        pixel-dependent factors in CALDB (parameter: scalefile).
      * Bug-fix: correct EPI values for baseline events with PHA < 0.
      * Bug-fix: check if output TEMP column exists before trying to add it.
      * Bug-fix: correct CALDB code name for scalefile.
      * Behavior change: exit with error if there are no rows in the input
        event or drift files.

    - sxspixgti:
      * New parameter: gtilost - input SXS lost GTI file to merge with other
        GTI files.
      * Bug-fix: memory leak related to calculating TSTART/TSTOP.
      * Bug-fix: correct validity checking of parameters.

    - sxsregext: 
      * New tool: extract SXS data products from an event file using a region and
        selection of grades.

    - sxssamcnt:
      * Behavior change: exit with error if there are no rows in the input
        event file.
      * Behavior change: handle case where TRIG_LP is larger than WFRB_WRITE_LP.
      * Behavior change: for lost GTI files, set SampleCnt1 and SampleCnt2 to
        NULL if row has negative interval (EL_STOP_LP < EL_START_LP).

    - sxssecid:
      * Bug-fix: was not skipping rows where the TIME column value is NULL.


  * Libraries:

    - perl: 
      * Bug-fix: correct how the TIMEZERO keyword in handled when merging GTI.
      * Bug-fix: after merging GTI, an empty table no longer results in an
        error.
      * Bug-fix: check validity of mgtime parameters before calling tool.
      * Behavior change: include date and time strings in DATE-OBS and
        DATE-END keywords instead writing separate TIME-OBS and TIME-END
        keywords.
      * Behavior change: support retrieving files from REFDATA.

    - libahgain:
      * Bug-fix: memory leak when computing Chi^2 uncertainty in the fitted
        width.

    - libarfgen:
      * Behavior change: add TELESCOP keyword to output ARF file.

    - libcoordfits:
      * Bug-fix: fix memory leak.

    - librmflib:
      * Behavior change: write DETNAM keyword to MATRIX and EBOUNDS extensions.