|
|
|
|
SynopsisThe CIAO filtering syntax for images Syntax[filter nameA=min1:max1,nameB=min2:max2] [filter #1=min1:max1,#2=min2:max2] [min1:max1,min2:max2] [filter nameA=shape(parameters),nameB=REGION(region_filename)] [filter name=REGION(region_filename)][opt full] [filter @filter.lis] [shape(parameters)] DescriptionThis help file is split up into the following sections:
See `ahelp dmimages' for information on the logical and physical coordinate systems used for images. 1. IMAGE FILTERING ON LOGICAL COORDINATESTo filter an image on its logical coordinates, dmcopy "im.fits[#1=257:512,#2=1:100]" subset.fits pulls out a 256 x 100 subset of the image. dmcopy "im.fits[(#1,#2)=circle(145,356,25)]" circle.fits sets everything outside the specified circle to zero (unless the BLANK keyword is defined in which case that value is used). The default behaviour of a filter like this is to also shrink the resulting image to be as small as possible surrounding the circle. To suppress this behaviour, and get a big, almost empty, image (the same size as im.fits) with a small circle in the middle, use the "opt full" modifier as shown below: dmcopy "im.fits[(#1,#2)=circle(145,356,25)][opt full]" circle.fits One can explicitly set the value to be used for pixels lying outside the filter using the 'opt null' directive, e.g. dmcopy "im.fits[(#1,#2)=circle(145,356,25)][opt null=-100]" circle.fits 2. IMAGE FILTERING ON PHYSICAL COORDINATESTo filter on the original physical coordinates, we refer to the physical axis names: dmcopy "im.fits[x=4096.5:4213.5,y=4142.3:6120.1]" subset.fits You can also use a region filter: dmcopy "im.fits[(x,y)=circle(4096,4096,12)]" circle.img This will give you a square image bounding the given circle, and set to zero all pixels outside the circle. If you wish to mark these pixels as "invalid", you can use the "opt null" syntax described in "ahelp dmopt": dmcopy "im.fits[(x,y)=circle(4096,4096,12)][opt null=-999]" circ2.img Note that not all programs will recognise that such pixels are to be ignored, although both ds9 and dmstat do. 3. IMAGE FILTERING ON WORLD COORDINATESYou can also use world coordinates in a region filter: dmcopy 'im.fits[(x,y)=circle(11:03:28.4,-20:11:23.2,20.1\")]' circ.img Note: The arcsecond symbol should work on the command line, but you may have problems using the parameter interface (pset). However, you can't use the world coordinates when filtering on a one dimensional range - i.e. [x=11:03:28.2:11:03:32.1] won't work, you would have to do use "(x,y)=rectangle(...)" instead. BugsSee the bugs page for the Data Model library on the CIAO website for an up-to-date listing of known bugs. See Also
|
![]() |
The Chandra X-Ray
Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA. Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2004. All rights reserved. |