Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 13 March 2017

How do I extract many spectra with one command?


There are three different stack inputs that may be used to obtain multiple spectra in a single command: rgrid, pgrid, and lgrid.

Grid Type Syntax
Rectangular rgrid(xmin:xmax:dx,ymin:ymax:dy)
Polar pgrid(xcen,ycen,rmin:rmax:dr,thetamin:thetamax:dtheta)
Linear lgrid(lmin:lmax:dl)

For example, to extract spectra for each of 100 sources in my_src.fits:

unix% dmextract \
      infile="acis_evt2.fits[sky=region(my_src.fits[component=lgrid(1:100:1)])][bin pi]" \
      outfile=my_pha2.fits

More information is available from ahelp stack; see the Creating Multiple Spectra section of the Using the Output of Detect Tools thread for another example.



Last modified: 13 March 2017
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.