Last modified: December 2013

AHELP for CIAO 4.12


Context: tools


Append multiple blocks/extensions to an existing output file.


dmappend infile outfile [verbose]


The dmappend tool is a simple tool to append several related blocks/extensions to an existing output file.

Duplicate Block Names

A block cannot be appended if it has the same name as a block already in the file. To see block names, use 'dmlist filename blocks'. To workaround this limitation, rename the block before appending. The data model (DM) syntax can be used to rename the block "on the fly"; see "ahelp dm" for details.

GTIs from the Input File

When appending a block from one FITS file to another FITS file, the GTIs from the input file are applied to the output. To avoid this, e.g. if you are only appending a REGION block, use a subspace filter to ignore the input GTIs:

unix% dmcopy "evt2_repro.fits[@gti.fits]" evt2_new_gti.fits
unix% dmappend "evt2_repro.fits[region][subspace -time]" evt2_new_gti.fits


Example 1

dmappend "tmp.fits[region]" evt1a.fits

Takes the block called "region" in file tmp.fits and appends it to evt1a.fits. evt1a.fits must already exist.

Example 2

dmappend "acis*.fits" output.fits

Will find all files in the current directory with names that start with "acis" and end in ".fits" and will append the first `interesting' block (see the DM documentation) from each to separate blocks in the existing output.fits file. The block names of all input files and the initial output file should be all different.

Example 3

dmappend @data.lis output.fits

Will open the text file "data.lis" and append the blocks listed in the file to the existing output file, output.fits. If "data.lis" has two lines containing dmcontreg.fits and acisf01712N002_cntr_img2.fits, and output.fits is '273_109cnts_evt2.fits'; then this event file which originally had the GTI extensions and the event list will now contain also a region file and an image extension.


name type ftype def min max reqd stacks
infile file input       yes yes
outfile file output       yes  
verbose integer   0 0 5    

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input stacks=yes)

Input file name(s).

CIAO stacks may be a single filename, a comma-delimited list of names, or '@' followed by the name of a text file containing one filename on each line. Each filename may use the full CIAO DM virtual file syntax.

For one or multiple input files, there should be only one single output file.

Parameter=outfile (file required filetype=output)

The output file name (must exist).

The output file name that must already exist. The input tables/images will be converted to format of the output file. Each input file will be appended as a separate extension/block.

Parameter=verbose (integer default=0 min=0 max=5)

display level(0-5)


See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

dmfiltering, dmopt
centroid_map, contour_map, dmcontour, dmellipse, dmfilth, dmgroup, dmgti, dmimg2jpg, dmimgadapt, dmimgblob, dmimgcalc, dmimgdist, dmimgfilt, dmimggrad, dmimghist, dmimghull, dmimglasso, dmimgpick, dmimgpm, dmimgproject, dmimgreproject, dmimgthresh, dmjoin, dmmaskbin, dmmaskfill, dmmerge, dmnautilus, dmpaste, dmregrid, dmregrid2, dmsort, dmstat, dmtcalc, dmtype2split, dragon_scales, emodel, evalpos, grow_from_max, hexgrid, imgmoment, map2reg, mean_energy_map, merge_too_small, mkregmap, pathfinder, pileup_map