Hitomi V005 released Dec 23, 2016

List of Changes


 Major changes introduced in this version:


    - arftable
      * Behavior change: Converts energy units of output file to be the same as those of the input
	RMF file if they are different.
      * New parameter:  writeevtfile (boolean): if set to yes, a file will be written listing the
        subset of photons that reach the focal plane unblocked by any object in the optical path.  
        Objects are specified by the parameters objecttype, imimagefile, objectheights, objectradii, 
        imagerotangles, xoffsets, and yoffsets.
      * Bug-fix: The raytracing photon history file is now read and processed in chunks of 1000000 
        rows, rather than all at once, in order to mitigate memory problems resulting from large files.

    - xrtraytrace
      * Behavior change: Accounts for a rotation between the reference frame of the Telescope
        Definition File (TDF) and the telescope physical coordinate system.  This angle is given
        by the TELFPROT keyword in the TDF MIRROR extension.

* General Applications:

    - ahgtigen
      * Bug-fix: Handling of the parameters cpkeyword and upkeyword was corrected. If upkeyword=yes,
        timing keywords are updated in all output GTI files, whereas previously, this update
        happened only for files resulting from a merging of GTI. If cpkeyword=all, keyword
        copying is now delegated solely to the maketime task, whereas previously, the copying
        was done a second time redundantly by ahgtigen.

    - ahpipeline:
      * Behavior change: MKF and EHK GTI are now copied to the end of unfiltered event files.
      * Behavior change: Updates timing keywords in the MKF and EHK GTI for all instruments and
        copies other keywords from unfiltered event file.
      * Behavior change: The EHK file is now replaced with the EHK2 file (which includes columns
        based on SXS antico rates) if the latter is successfully created.
      * Behavior change: For SXS screening, the PIXEALL2 label has been changed to PIXELALL3.
      * Parameter change: r2tol, bisectolshift, bsectolwidth (SXS gain fitting parameters):
        default values changed from 0.01, 0.1, and 0.2, respectively, to 0.001, 0.001, and 0.001.
      * Bug-fix: For SXS, the PIXEL column was omitted from lost fake GTI extensions; now included.
      * Behavior change: Moved proximity flagging from the first run of sxsflagpix to the second run of
      * Behavior change: For SXS, Perseus observation stop date and time have been changed from
        2016-03-08T00:38:00 to 2016-03-04T00:41:00.

  * Mission Applications:

    - aharfgen
      * Parameter change: auxtransfile:  If set to CALDB, a CALDB query is done.  Previously, the
        string CALDB was not detected and was passed unmodified to the called tasks.
      * Parameter change: regmode:  Now should be set to RADEC to indicate that the regionfile is in
        world coordinates, for consistency with coordinate terminology in other tools.  Previously, 
        the value SKY was used incorrectly to indicate world coordinates.

    - ahbackscal
      * NEW TOOL: Corrects the BACKSCAL keyword in a spectrum file that has been extracted using xselect.

    - ahcalcl32ti
      * Behavior change: TZEROn keyword is now written for L32TI column to make it effectively unsigned.

    - ahfilter
      * Bug-fix: Under certain conditions, the output EHK file was incorrectly deleted at the end
        of processing like a temporary file.  This happened when the output EHK file path contained
        more than one dot and the infileroot parameter was a non-empty string.  The parsing of
        file names has been corrected to avoid this outcome.

    - ahgainfit
      * Parameter change: r2tol (convergence criterion for R^2): default value changed from 0.01 to
      * Parameter change: bisectolshift (tolerance of shift to stop bisection method): default value 
        changed from 0.1 to 0.001.
      * Parameter change: bisectolwidth (tolerance of width to stop bisection method): default value 
        changed from 0.2 to 0.001.

    - ahmktim
      * Bug-fix: Corrected a double-free failure which sometimes occured when task was built with gcc
        5.4 with optimization.

    - ahnxbgen
      * Bug-fix: Incorrect Perl function call get_column_number() has been corrected to get_column_num().
      * Bug-fix: One case-sensitive test of regmode parameter is now case-insensitive.

    - ahsxtarfgen
      * Behavior change: Writes PSF fraction inside detector area and/or inside region to the screen.
      * New parameter: auxtransfile:  Auxiliary transmission file, containing transmission as a
        function of energy to be applied to final ARF.
      * Parameter change: skyregfile:  Wording of the parameter prompt was changed to make clear
        that this region file is in world coordinates (RADEC), not Cartesian SKY coordinates.
      * Bug-fix: In applying the contamination CALDB file, now reinitializes the sum of weights and
        weighted sum to zero for each fine energy bin.  Previously, this reinitialization was not
        done, so that incorrect transmission values for contamination were used in the ARF.

    - hxirspeffimg
      * Parameter change: auxtransfile:  If set to CALDB, a CALDB query is done.  Previously, the
        string CALDB was not detected and was treated as a normal filename.

    - sxsnxbgen
      * New parameter: picol:  Name of PI column to read from input event file.

  * HXI/SGD Applications:

    - sgdarfgen
      * Behavior change: Checks SGDID parameter vs. INSTRUME keyword in input file, and includes
        SGDID as part of output file name.

    - sgdevtid
      * Behavior change: Uses underscore instead of blank in fluorescence material names; e.g.,
        'CdTe btm' is now 'CdTe_btm'.
      * Bug-fix: Throws error if the program attempts to find a fluorescence line for a material
        that is absent from the CALDB file.  Previously, such fluorescence lines were silently
        omitted in event reconstruction.

  * SXI Applications:

    - sxiflagpix
      * Bug-fix: Program was segfaulting when the parameter echoflag was 'no' and the parameter
        echomap was 'yes'.  This bug was corrected by ignoring echomap when echoflag is 'no'.

    - sxipi
      * Bug-fix: Some CALDB files can have blocks of lines with the same timestamp.  Previously,
        CALDB files containing more than one such block were being read incorrectly.  The
        bug was fixed by correcting the flow of control in nested loops that process each group
        of equal times within each file.

* SXS Applications: 

    - sxsextend
      * NEW TOOL: Reruns tasks sxspha2pi, sxsperseus (if necessary), and ahscreen in order to
        produce SXS event files in extended energy mode.  `

    - sxsanticolc
      * Behavior change: Sets TUNIT keywords for output RATE and ERROR columns. Previously, these
        keywords were omitted.

    - sxsflagpix
      * Behavior change: If MXS GTI times do not overlap with the time range of the input file.
        prints log message and skips MXS flagging.  Previously in this case, the task threw
        an error.

    - sxsgain
      * Parameter change: r2tol (convergence criterion for R^2): default value changed from 0.01 to
      * Parameter change: bisectolshift (tolerance of shift to stop bisection method): default value
        changed from 0.1 to 0.001.
      * Parameter change: bisectolwidth (tolerance of width to stop bisection method): default value
        changed from 0.2 to 0.001.
      * Behavior change: Instead of using theoretical average when determining the temperature from
        the fitted shift, now uses the tabulated profile average.

    - sxsperseus
      * Behavior change:  For extended energy mode, reads columns EPIE and EPI2E rather than EPI and EPI2,
        and writes columns EPIEPER and EPI2EPER rather than EPIPER and EPI2PER.
      * Bug-fix: Now checks whether PI or PIE column already exists before inserting it into the output file.
      * Parameter change:  binwidth (PI bin width for extended energy range): Default value changed
        from 0.5 eV to 1.0 eV.

    - sxspha2pi
      * Behavior change: In extended energy mode, automatically adds "E" to column name in ADDEPICOL
        parameter to form the name of the output column for energy with secondary correction.
      * Behavior change: Now writes PIOFFST and PIWIDTH keywords (PI energy offset and bin width) in
        non-extended-energy mode.  (Similar keywords PIEOFFST and PIEWIDTH were already written for
        extended energy mode.)
      * Bug-fix: Skips events with PIXEL=NULL to guard against a segfault.  Normally, this condition
        is never encountered because the PROC_STATUS column should indicate a bad event, but PROC_STATUS
        has not been updated in teh pre-pipeline for this condition.

    - sxspixgti
      * Behavior change: Updates timing keywords if upkeyword=yes (upkeyword is also passed to the
        called task ahgtigen, as before).

    - sxsregext
      * New parameter: extended (boolean):  extended=yes causes the PIE column to be read from the
        event file rather than the PI column.
      * Behavior change:  Substitutes USER=sxsregext for USER=[user name] in output header to
        facilitate unit testing.
      * Parameter change:  regmode: WCS coordinates for the regionfile are now indicated by
        regmode=RADEC rather than regmode=SKY.

  * Libraries:
    - ahgain
      * Bug-fix: Memory leak eliminated in deallocation of fit results structure.

    - rmflib
      * Behavior change: CHANNEL column in EBOUNDS RMF extension changed from I type to J.

Patch Hitomi V005a released Jan 18, 2017

List of Changes


 * Mission Applications:

   - aharfgen , ahsxtarfgen , hxirspeffimg
      New parameter: polydeg (string): polynomial order for the internal fitting. For the HXI, the DEFAULT value sets the polynomial order 
      to 5. For the SXI and SXS, the DEFAULT value sets the polynomial order to an internal test for the best polynomial order.
      Other allowed values are 1 to 5 for the HXI and 1 to 10 for the SXI and SXS. This parameter has been added for debugging pourpose
      and should not be changed  
   - ahsxtarfgen
      Behavior change: the default behavior is changed since the polynomial order to provide a stable fit solution is tested internally
      with a minimization technique. The parameter value polydeg determine whether or not the routine should use the default behavior.
      This change does not effect the standard energy range analysis for all instruments and SXS recommended extended energy range.

   - xrtraytrace 
      Bug-fix: correct the behavior of decresing area with increasing number of input photons for large region. This affects the raytracing 
      output when run with flat or beta model in conjunction with very large regions (~above 12 arcmin) and number of events larger than
      200000 on axis.     
      Bug-fix: correct a calculation that affect the flat or beta model for a specific combination of roll angle and offaxis angles. The effect
      is the distortion of the image from the telescope resulting in capturing less photons in ths final effective.
      For photon list input the treatment of the thermal shield was corrected however this correction is smaller or negligeble for small 
      offaxis angles ( < 20 arcmin). 

 * SXI
   - sxipi 
      Bug-fix : debug statement array out of range for window mode data when reading CTI from CALDB giving seg fault. No effect on the actual
      calculation but just on the print statements

   - mxstime
      Bug-fix : fine gti overlapping  are checked using the puselenght and compare the afterglow lenght. For files where the start of the mxs is 
      outside of the start of file the code was not using the correct pulselenght from the last row. This is only affected if the afterglow 
      flag is set to yes.

Patch Hitomi V005b released Mar 6, 2017

List of Changes


 * Mission Applications:
  - sxinxbgen  change to account in the exposure for the correction due to the ACTY dependence 
               new paramter added 'regionfile2' to allow different specification for the background region
               and source region 
  - hxinxbgen, sxinxbgen, sxsnxbgen change in the exposure calculation

 Note : the tar file of the patch b includes also the patch a