Extract source spectrum

The SXT science data can be stored in two modes (i) Photon Counting (PC) mode and (ii) Fast Windowed Photon Counting (FW) mode. In the PC mode, data from the entire 600 × 600 pixels of CCD is collected with a read-out time of ∼ 2.4 s. On the other hand, in the FW mode 150 × 150 pixel window in the centre of CCD is used with readout time (∼ 0.278 s) one order of magnitude lower than the PC mode.

Here we demonstrate how to extract source spectra and make them suitable for fitting in XSPEC. The PC mode observation of GRS 1915+105 is used as an example. The observation id is G06_033T01_9000001116. The test data used here is available in the public domain and can be downloaded from the astrobrowser portal.

$ cd results
$ xselect

                         **  XSELECT V2.4j  **
$ Enter session name >[ ] xsel
$ xsel:NICER > read event  GRS_1915_sxt_merged_cl.evt
$ Enter the Event file dir >[ ] ./
Got new mission: ASTROSAT
$ Reset the mission? >[ ] yes

 Notes: XSELECT set up for      ASTROSAT
 Time keyword is TIME       in units of s
 Default timing binsize =   5.0000

Setting...
 Image  keywords   = X          Y           with binning =    1
 WMAP   keywords   = X          Y           with binning =    1
 Energy keyword   = PI                     with binning =    1

Getting Min and Max for Energy Column...
Got min and max for PI:     0   1023

Got the minimum time resolution of the read data:   2.3775
MJDREF =  5.5197000000000E+04 with TIMESYS = UTC
 Number of files read in:            1

******************** Observation Catalogue ********************

Data Directory is: /path_to_present_directory/
HK Directory is: /path_to_present_directory/
       TELESCOP    INSTRUME    DATAMODE    DATE-OBS    OBJECT       ORB_NUM
      1 ASTROSAT    SXT         PC          2017-03-29  GRS 1915+105     8118
$ xsel:ASTROSAT-SXT-PC > extract image
extractor v5.36    26 Feb 2020
 Getting FITS WCS Keywords
 Doing file: /path_to_present_directory/GRS_1915_sxt_merged_cl.evt
100% completed
          Total      Good    Bad: Time     Phase     Grade       Cut
         166868    166868            0         0         0         0
=================================================================
    Grand Total      Good    Bad: Time     Phase     Grade       Cut
         166868    166868            0         0         0         0
   in  5068.8     seconds
 Image            has   166868 counts for  32.92     counts/sec

 
$ xsel:ASTROSAT-SXT-PC > plot image
$ xsel:ASTROSAT-SXT-PC > filter region ds9.reg
$ xsel:ASTROSAT-SXT-PC > show filters
 
*** SELECTIONS ***

     NONE

 *** FILTERS ***

 Spatial selections have been read in from: ds9.reg
$ xsel:ASTROSAT-SXT-PC > extract spectrum
extractor v5.36    26 Feb 2020
 Getting FITS WCS Keywords
 Doing file: /path_to_present_directory/GRS_1915_sxt_merged_cl.evt[regfilter("xsel_region.xsl",X,Y)]
100% completed
          Total      Good    Bad: Time     Phase     Grade       Cut
         138211    138211            0         0         0         0
=================================================================
    Grand Total      Good    Bad: Time     Phase     Grade       Cut
         138211    138211            0         0         0         0
   in  5068.8     seconds
 Spectrum         has   138211 counts for  27.27     counts/sec
 ... written the PHA data Extension
$ xsel:ASTROSAT-SXT-PC > save spectrum sxt_spectra.pha
Wrote spectrum to sxt_spectra.pha
$ xsel:ASTROSAT-SXT-PC > exit
Save this session? >[ ] no

This spectrum can then be passed through grppha to make it suitable for use in XSPEC. The recent Ancillary Response File (ARF), Response Matrix Files (RMF), and background spectrum can be found here: https://www.tifr.res.in/~astrosat_sxt/dataanalysis

$ grppha
$ Please enter PHA filename[ ] sxt_spectra.pha
$ Please enter output filename[ ] sxt_spectra_grp.pha
  -------------------------
  MANDATORY KEYWORDS/VALUES
  -------------------------
  --------------------------------------------------------------------
  --------------------------------------------------------------------
  EXTNAME   - SPECTRUM        Name of this BINTABLE
  TELESCOP  - ASTROSAT        Mission/Satellite name
  INSTRUME  - SXT             Instrument/Detector
  FILTER    - NONE            Instrument filter in use
  EXPOSURE  - 1364.7          Integration time (in secs) of PHA data
  AREASCAL  - 1.0000          Area scaling factor
  BACKSCAL  - 9.58510E-02     Background scaling factor
  BACKFILE  - none            Associated background file
  CORRSCAL  - 1.0000          Correlation scaling factor
  CORRFILE  - none            Associated correlation file
  RESPFILE  - none            Associated redistribution matrix file
  ANCRFILE  - none            Associated ancillary response file
  POISSERR  - TRUE            Whether Poissonian errors apply
  CHANTYPE  - PI              Whether channels have been corrected
  TLMIN1    - 0               First legal Detector channel
  DETCHANS  - 1024            No. of legal detector channels
  NCHAN     - 1024            No. of detector channels in dataset
  PHAVERSN  - 1.2.0           OGIP FITS version number
  STAT_ERR  - FALSE           Statistical Error
  SYS_ERR   - FALSE           Fractional Systematic Error
  QUALITY   - TRUE            Quality Flag
  GROUPING  - FALSE           Grouping Flag
  --------------------------------------------------------------------
  --------------------------------------------------------------------
$ GRPPHA [ ] group min 30
$ GRPPHA [ ] chkey backfile SkyBkg_comb_EL3p5_Cl_Rd16p0_v01.pha
$ GRPPHA [ ] chkey ancrfile sxt_pc_excl00_v04_20190608.arf
$ GRPPHA [ ] chkey respfile sxt_pc_mat_g0to12_gmod.rmf
$ GRPPHA [ ] exit
 ... written the PHA data Extension
 ...... exiting, changes written to file : sxt_spectra_grp.pha
 ** grppha 3.1.0 completed successfully
$ xspec
  XSPEC version: 12.11.0
 Build Date/Time: Fri Jul 24 21:58:05 2020

$ XSPEC12>data sxt_spectra_grp.pha

1 spectrum  in use

Spectral Data File: sxt_spectra_grp.pha  Spectrum 1
Net count rate (cts/s) for Spectrum:1  2.719e+01 +/- 7.335e-02 (99.7 % total)
 Assigned to Data Group 1 and Plot Group 1
  Noticed Channels:  1-677
  Telescope: ASTROSAT Instrument: SXT  Channel Type: PI
  Exposure Time: 5069 sec
 Using fit statistic: chi
 Using Background File                SkyBkg_comb_EL3p5_Cl_Rd16p0_v01.pha
  Background Exposure Time: 2.447e+05 sec
 Using Response (RMF) File            sxt_pc_mat_g0to12_gmod.rmf for Source 1
 Using Auxiliary Response (ARF) File  sxt_pc_excl00_v04_20190608.arf

$ XSPEC12>cpd /xw
$ XSPEC12>pl ld
$ XSPEC12>ig **-0.5 7.0-**
    20 channels (1-20) ignored in spectrum #     1
    78 channels (600-677) ignored in spectrum #     1

$ XSPEC12>pl
$ XSPEC12>setpl en
$ XSPEC12>pl

$ XSPEC12>ipl
$ PLT> hardcopy spectra.ps/ps
$ PLT> exit
$ XSPEC12>gain fit

Input parameter value, delta, min, bot, top, and max values for ...
             1       0.01(      0.01)       0.01        0.5        1.5          5
Resp source_1_spec_1: slope>1,-1

Input parameter value, delta, min, bot, top, and max values for ...
             0       0.01(      0.01)         -1         -1          1          1
Resp source_1_spec_1: offset>

One should use fixed gain slope = 1. Only gain offset should be kept free. Once you have decided appropriate gain offset value (best fit) then these values can be frozen in the model so that the model fitting doen’t get affected.

$ XSPEC> systematic 0.02

The users are supposed to use 3% (as suggested by LAXPC team) systematic when fitting LAXPC and SXT data together so in that case no need to add extra 2% because of SXT only.

$ XSPEC12>save all spectra.xcm
$ XSPEC12>exit
$ XSPEC: quit