Combine any number of observations. If desired, create
corresponding exposure maps and exposure-corrected images.
merge_all evtfile [asol] [dtffile] chip [refcoord] [xygrid] [energy]
[merged] [expmap] [expcorr] [intdir] [clobber] [mode]
This script takes a list of level=2 event files, reprojects them to a given
RA and Dec, and combines them. It can then make a combined exposure
map and an exposure-corrected image. If only one event file is input,
it is treated as a merged event file. One may first use the script to
create a merged file and then run it a second time using this merged
file as input, omitting the parameters "refcoord" and
"merged".
Note that the script may be used to simply combine a
set of two or more level=2 event files. In this case, the only parameters
which are needed are "evtfile", "chip",
"refcoord", and "merged".
If a combined aspect histogram exists from a previous run, and it is in the
"intdir" and retains its original name, the script will use
this instead of creating a new one.
It is possible to provide an energy filter. However, region filters
are not supported: this is because the "xygrid" is the
region filter for the exposure map, and the image size and shape must
match that of the exposure map. Filters (to remove sources, etc.) can
be applied to the event file prior to running the script, if desired.
The script may be used to combine HRC observations (S- or I-array),
but it can only make exposure maps and exposure-corrected images for
the HRC-I configuration.
Merged files are, in general, not suitable for spectral analysis. The
exposure map and exposure corrected image do not contain statistical
errors, and therefore cannot be used to obtain meaningful values for
source fluxes.
merge_all evtfile=@events.lis chip="0:3" refcoord="42.4356 -20.6754"
merged=combined.fits
Combine a stack of input level=2 event files. The
output level=2 event file will be reprojected to
the coordinates 42.4356, -20.6754, and will contain data for
ACIS-I (ccd_id 0 through 3).
merge_all evtfile="data1.fits,data2.fits,data3.fits" asol=@asol.lis
chip="0,1,2,3,6,7" refcoord=data3.fits
xygrid="3056.5:4056.5:#1000,3024.5:4044.5:#1020" energy=spectrum.dat
merged=data123.fits expmap=expmap123.fits expcorr=expcorr123.fits
Combine three level=2 event files using a time-sorted stack of asol
files. Reproject the data to match the tangent point in
data3.fits. Create a full-resolution exposure map as well as
an exposure-corrected image of a portion of the data using a
spectral weights file.
merge_all evtfile=hrcdata.fits asol=pcad_asol.fits
dtffile=hrc_dtf1.fits chip=hrc-i xygrid="1:16384:#128,1:16384:#128"
energy=1 expmap=hrc_expmp.fits expcorr=hrc_expcorr.fits intdir=.
Make an exposure map and exposure-corrected image for a
single HRC-I observation. Write temporary files to the
current directory.
Parameter=evtfile (file required filetype=input stacks=yes)
Input level 2 file(s)
Comma-separated list or file stack of input level=2 event files.
Region filters should not be used. Can use a merged file made
from a previous run of the script.
Parameter=asol (file filetype=input stacks=yes)
Input aspect solution file(s)
Comma-separated list or file stack of aspect solution (asol) files.
These are only required if you are creating an exposure map.
The script assumes that the aspect files are arranged in
chronological order. If you have not altered the original
filenames, a simple "ls" will put them in order, as the time is
listed in the filename.
Input DTF files
SComma-separated list or file stack of DTF file name(s). Only
necessary when creating an exposure map for HRC-I observations.
ACIS CCD numbers or "HRC-I" or
"HRC-S"
Either ccd_id(s) for the ACIS CCDs you want or "HRC-I" or
"HRC-S". If entering ccd_ids, can use either a range
(seperated by ":" or "-") or a
comma-separated list.
Tangent point to which data is reprojected
Either "RA Dec" or an level=2 event file to which the
tangent point of observations will be reprojected. Do not need
for single observations or if using an already-merged file.
Input grid specification
Input grid for creating the exposure map and exposure-corrected
image; should be of the same form expected by the tool
mkexpmap: "xmin:xmax:#(no. of x
bins),ymin:ymax:#(no. of y bins)"; for example,
"0.5:8192.5:#1024,0.5:8192.5:#1024". Do not need if
only using the script to merge data.
Parameter=energy (string filetype=input units=keV)
Energy value or spectral weights file for mkinstmap
Either an energy value (in keV) or a normalized spectral weights
file. This will be used to calculate the instrument map, see
"ahelp mkinstmap" for details on the format of the
spectral weights file.
The script uses a decimal test to see if the value is a number
or a file, so spectral weight filenames cannot consist entirely
of numbers; "2" is not a valid filename, but "2.wgt" is.
Output merged event file name
Not required if inputting an already-merged file or single
level=2 event file.
Output exposure map
Not required if only merging data.
Output exposure corrected image.
Leave blank if output is not desired.
Directory for intermediate products
Directory where intermediate products are placed - default is
/tmp, and intermediate products are deleted from /tmp when the
script finishes. If the tmpdir is set to anything other than
/tmp, the intermediate data products are not deleted by
merge_all.
Overwrite output files if they already exist?
There are several improvements in version 3.5 of merge_all:
-
Bug fix: Temporary filenames have a timestamp value as the
root, rather than hardwired names. This means that multiple
instances of merge_all may be run without conflict, as long
as the appropriate PFILES environment variables are set.
-
The script tests whether the "energy" value is monochromatic
or a spectrum file, and exits early if the spectrum file
does not exist. The script uses a decimal test to see if
the value is a number or a file, so spectral weight
filenames cannot consist entirely of numbers; "2" is not a
valid filename, but "2.wgt" is.
-
Error messages now contain the name of the script.
Two new hidden parameters have been added to mkinstmap - a
tool called by merge_all - to allow the ACIS dead area
correction to be taken into account: "pbkfile" and "dafile".
UPDATED in February 2007: Since merge_all runs mkinstmap with
a merged event file, it IS NOT appropriate to try to apply the
ACIS dead area correction while running this script. Users
who wish to apply this calibration should use the step-by-step
exposure maps threads, online at
http://cxc.harvard.edu/ciao/threads/imag.html.
The script has also been updated to not prompt the user for
parameters that have been supplied on the command line.
The syntax of the asphist tool was updated for this release:
the GTI filter is attached to the event file instead of the
aspect solution file(s). For a detailed explanation of the
syntax change, refer to the asphist help file ("ahelp
asphist").
|