Skip to the navigation links
Last modified: December 2009

AHELP for CIAO 4.2


Context: tools


Add new columns to a table.


dmpaste infile pastefile outfile [clobber] [verbose]


`dmpaste' copies infile to outfile, pasting on extra columns from the pastefile, which may be a single file or a stack of files. Column names in the pastefile cannot duplicate names in the input file. All files must have the same number of rows. Analogous to the unix `paste' command.

Example 1

dmpaste "data1.fits[EVENTS]" "data2.fits[EVENTS][cols tg_r,tg_d]"

This pastes extra columns tg_r, tg_d from data2.fits onto the columns already present in data1.fits, making a new file data3.fits.

Example 2

dmpaste "data1.fits[EVENTS]" data2.fits data3.fits

This pastes all the columns from data2.fits onto the data1.fits table.

Example 3

dmpaste "data1.fits[EVENTS][cols -pha]" "data2.fits[EVENTS][cols pha]"

Replace the pha column in data1.fits by the one in data2.fits.


name type ftype def min max reqd
infile file input       yes
pastefile file input       yes
outfile file output       yes
clobber boolean   no      
verbose integer   0 0 5  

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input file name

The input file used as the basis for the new file. The output file will contain all columns from the input file and the header from the input file.

Parameter=pastefile (file required filetype=input)

Input paste file list

All the columns in pastefile will be pasted on to infile. If pastefile is a stack, the columns from all the files in the stack will be used.

Parameter=outfile (file required filetype=output)

output file name.

The output file containing a version of infile with the extra columns appended.

Parameter=clobber (boolean default=no)

Clobber exisiting files?

Used to specify whether to clobber output file if it already exists.

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

Amount of diagnostic chatter, 0 (least) to 5 (most).


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

See Also

dmfiltering, dmopt
dmappend, dmarfadd, dmgroup, dmgti, dmjoin, dmmerge, dmsort, dmtcalc, dmtype2split

Last modified: December 2009