next up previous contents
Next: Fit the Spectrum Up: Extract and Fit the Previous: Create the Ancillary Region   Contents


Prepare the Spectrum

Assuming that source and background spectra have been extracted as in § 7.4.1 and 7.4.2, and the RMF and ARF created as in §7.4.5 and 7.4.6, spectral fitting will be demonstrated using HEASoft software.

Nearly all spectra will need to be binned for statistical purposes. The procedure grppha, located in the HEASARC folder in the Available Tools window, provides an excellent mechanism to do just that. While some users may prefer the Hera GUI, it is often easier and more useful to simply enter the commands in the Command Window, especially as only one command may be entered at a time using the GUI interface. (With the GUI, the commands are entered in the two ``GRPPHA'' text boxes, and the last command entered must be exit to avoid a hung session.) In light of this, only instructions for the Command Window are shown here.

The following commands not only group the source spectrum for Xspec but also associate the appropriate background and response files for the source.

To group the source spectrum using the Command Window, type:

grppha

and edit the parameters and file names as appropriate:

      Please enter PHA filename[] mos1_source_pi.fits ! input spectrum file name
      Please enter output filename[] mos1_grp.fits    ! output grouped spectrum
      GRPPHA[] chkey BACKFILE mos1_bkg_pi.fits        ! include the background spectrum
      GRPPHA[] chkey RESPFILE mos1_rmf.fits           ! include the RMF
      GRPPHA[] chkey ANCRFILE mos1_arf.fits           ! include the ARF
      GRPPHA[] group min 25                           ! group the data by 25 counts/bin
      GRPPHA[] exit

Upon exiting, the output file mos1_grp.fits will appear in your working directory.


next up previous contents
Next: Fit the Spectrum Up: Extract and Fit the Previous: Create the Ancillary Region   Contents
Lynne Valencic 2011-07-26