spectra (version 2.8)

You can also look at:
This routine extracts spectra for sources, generates response matrices, and plots the spectra.

Spectra are extracted in sky coordinates from the filtered event files. Event files are combined if the spectra extracted from them would have the same response matrix and if they can be extracted using the same region filter. Specifically, SIS data with different CCD modes (1, 2 or 4) are kept separate, and GIS data with different numbers of PHA bins are kept separate. Also, data from different instruments or in different modes (BRIGHT BRIGHT2 FAST PH MPC), and data with different image resolutions are kept separate. The spectra are grouped to have a minimum of 40 counts per group, and spectra are not extracted if they would have fewer than 500 events. GIS spectra are corrected for dead time using the deadtime FTOOL.

FITS spectrum files contain a WMAP extension containing an image of the extraction region with pixels outside the region set to -1. The FTOOL ascaarf uses this extension to determine what parts of the focal plane should be considered when calculating the ancillary response matrix. Since event files do not carry any information about previous region filters or the field of view of the detectors, these things must be explicitly accounted for when extracting spectra. The source region filter is followed by a number of other region filters which mask off "forbidden" regions of the focal plane. For the GIS this means using the standard region filter, which excludes the noisy outer ring and calibration source. For the SIS, things are a little more complicated. A set of region filters are used to mask off the inter-chip gaps and inactive CCD chips. Also, a set of region filters are generated to mask off the parts of the chips which are excluded by the area discriminators onboard ASCA.

GIS RMFs are static, and are retrieved from a collection of pre-generated files. SIS RMFs depend on epoch and location on the chip, so they must be generated using the FTOOL sisrmg. The following procedure is used to generate SIS RMFs in 2 or 4 CCD mode:

  1. Extract both a spectrum and an event list from the extraction region.
  2. Divide the event list into an event list for each chip and determine the number of counts on each chip.
  3. If the source is only on one chip, generate an RMF using the spectrum generated above.
  4. If the source is spread over more than chip, extract a spectrum from the event file for each chip, and then generate an RMF for each spectrum.
  5. Sum the individual RMFs, weighting by the number of events on each chip.

An ARF is generated for each spectrum using the ascaarf FTOOL.

Finally, each spectrum is plotted using xspec.

FTOOLS called:

  1. addrmf
  2. ascaarf
  3. deadtime
  4. grppha
  5. sisrmg
  6. xselect
STOOLS called:
  1. discrim_mask
  2. equals
  3. group_event_files
Utilities called:
  1. add_fits_keyword
  2. dump_table
  3. exception
  4. fetch_file
  5. file_to_log
  6. ftool_test
  7. generate_filename
  8. log_entry
  9. milestone
  10. parse_filename
  11. read_bintable
  12. read_fits_keyword
  13. read_parfile
  14. setup_parfile
  15. stool_test
  16. xselect_test