Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/ciao/ahelp/dmimgreproject.html
AHELP for CIAO 4.9

dmimgreproject

Context: tools

Synopsis

Replicates table value along axis of image

Syntax

dmimgreproject  infile imgfile outfile [method] [clobber] [verbose]

Description

`dmimgreproject' takes an input image and a table with two columns. The first column in the table must match the name of either of the axes of the input image (usually "x" or "y"). The coordinates along this image axis are interpolated with the chosen method to match the data in the table.

Example 1

dmimgreproject infile="table.fits[cols x,sum]" imgfile=img.fits
outfile=out.fits method=weight

Since the input file table.fits has an "X" column, the X-coordinates in the image are used to lookup values in the table. For each X value, the SUM (2nd) column is looked up. A linear interpolation/extrapolation (weight) is used to find the values. The SUM value that is found in the table is replicated for all Y values in the output image.

Example 2

dmimgreproject infile="table.fits[cols y=delta,mean]" imgfile=img.fits
outfile=out.fits method=closest

Using the DM filtering syntax we have renamed the 'delta' column 'y'. So similar to above, the 'y' values are now polled from the input image, the corresponding values looked-up in the table, this time the value closest to the requested Y position is used, and then that value is replicated for all X values in the output image.

Parameters

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

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

The input table

The input table must have 2 columns. A DM filter should be used to select desired columns, if necessary. The table should be sorted such that the first column is increasing (use dmsort to pre-sort file if necessary).

Parameter=imgfile (file required filetype=input)

The input image

The image used to a) get the coordinates to lookup in the table and b) determines the output image size.

Parameter=outfile (file required filetype=output)

The output file name

The output image which will match the input image w/ data along one axis repliated from input table

Parameter=method (string default=weight)

Interpolation method

There are several interpolation methods available

  • weight - a linear interpolation/extrapolation of the data values.
  • closest - the value closest to the requested coordinate
  • furthest - the value furthest from the requested coordinate
  • min - of the two neighboring data values, the minimum value
  • max - of the two neighboring data values, the maximum value
  • first - of the two neighboring data values, the first (lowest coord) value
  • last - of the two neighboring data values, the last (highest coord) value

Parameter=clobber (boolean default=no)

Remove output if it exists?

Used to specify whether or not to clobber existing file that has the same name as the specified output file

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

The tool chatter level

Verbose can be from 0 to 5, generating different amounts of debugging output.

Bugs

There are no known bugs for this tool.

See Also

dm
dmfiltering
tools
dmappend, dmcontour, dmellipse, dmfilth, dmimg2jpg, dmimgadapt, dmimgblob, dmimgcalc, dmimgdist, dmimgfilt, dmimghist, dmimghull, dmimglasso, dmimgpick, dmimgpm, dmimgproject, dmimgthresh, dmmaskbin, dmmaskfill, dmnautilus, dmregrid, dmregrid2, dmstat, evalpos, imgmoment, mean_energy_map, pileup_map

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.