Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 29 March 2018

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]" \

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: 29 March 2018
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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.