Skip to the navigation links
Last modified: 18 May 2010

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/bugs/merge_all.html

Bugs: merge_all


merge_all is not a CIAO tool; it is a script which is available for download from the Scripts page.


Caveats

  1. dmmerge issue: extra GTI blocks in merged event file (16 Apr 2007)

Bugs

  1. Incorrect results when combining observations done with an offset (25 Jun 2009)


Caveats

  1. dmmerge issue: extra GTI blocks in merged event file (16 Apr 2007)

    The dmmerge tool is called by the merge_all script. Details on the problem are available on the dmmerge bug page.

    Workaround:

    A "[subspace -expno]" filter was added to the dmmerge command in merge_all v3.6 as a workaround for this problem. Users no longer need to filter the data before using it as input to merge_all.

    Note that the addition of the subspace filter means that any user who intends to create lightcurves binned on exposure number from the merged output cannot use merge_all, since that information is eliminated from the subspace. (In general, lightcurves are binned on time.)


Bugs

  1. Incorrect results when combining observations done with an offset (25 Jun 2009)

    This bug affects a small percentage of observations. For instance, roughly 5% of observations done with Chandra in 2008 used a pointing offset.

    When merge_all runs dmmerge to combine the event files, it creates a custom lookup table containing merging rules for header keys. Instead of omitting the DETNAM, ROLL_NOM, and SIM_Z header values that differ by more than the tolerance in dmmerge, it always uses the value from the first file.

    The dz values in the aspect solution are relative to the SIM_Z in the event header. If the observation was done with an offset, the aspect solution files for the second observation is not corrected for the difference in SIM_Z between the files. The result is that the combined exposure map and fluxed image will be wrong, as seen in this image:

    [The merged dataset (left) and merged exposure map (right).]

    The white box has the same WCS coordinates in both frames, illustrating how the exposure map is offset from the event data.

    Check if the observation was done with an offset: Use the Chandra Target Information page to see if an observation was done with an offset. For instance, ObsId 5826 used a Y offset of -0.5 arcmin.

    Workaround:

    The merged data created by the workaround below is appropriate for getting an approximation of the flux. It should not be used for source detection or other science analyses. The output from reproject_image is not an integer image and therefore breaks the Poisson assumptions in wavdetect, csmooth, and other CIAO tools.

    To create a merged, fluxed image:

    1. Create a full-resolution image and matching exposure map for each observation by following the appropriate CIAO Imaging thread.

      Let's call these files image1, image2, expmap1, and expmap2.

    2. Reproject image2 to match image1. Reproject expmap2 to match expmap1:

      reproject_image image2 image1 image2_proj method=sum
      reproject_image expmap2 expmap1 expmap2_proj method=average
      
    3. Sum the two event images together. Sum the two exposure map images together.

      dmimgcalc image1 image2_proj image add
      dmimgcalc expmap1 expmap2_proj expmap add
      
    4. Divide the merged event image by the merged exposure map to create a fluxed image:

      dmimgcalc image expmap flux div
      

    If you have any questions or problems with the workaround, please contact the Helpdesk for assistance.


Last modified: 18 May 2010