Extracting an image using XSELECT

Here we demonstrate how to extract an image from SXT Level 2 data using XSELECT. The PC mode 29th March 2017 observation of GRS 1915+105 is used for 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.

$ mkdir Results
$ 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/results/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 > save image ds9.im
Wrote image to file ds9.im
$ xsel:ASTROSAT-SXT-PC > plot image

The image above was extracted for the full energy range of the SXT: about 0.3-8.0 keV. However, the data can be filtered to produce images over any energy band within this range, using the command filter pha_cutoff, where the range must be given in terms of channels. For the SXT, 1 channel = 100 eV

$ xsel:ASTROSAT-SXT-PC > filter pha_cutoff 30 100
$ xsel:ASTROSAT-SXT-PC > extract image
 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      2011            0         0         0    164857
==================================================================
    Grand Total      Good    Bad: Time     Phase     Grade       Cut
         166868      2011            0         0         0    164857
   in  5068.8     seconds
 Image            has     2011 counts for 0.3967     counts/sec

$ xsel:ASTROSAT-SXT-PC > save image 0.3-1keV.im
Wrote image to file 0.3-1keV.im
$ xsel:ASTROSAT-SXT-PC > clear pha_cutoff
$ xsel:ASTROSAT-SXT-PC > filter pha_cutoff 100 800
$ 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    164057            0         0         0      2811
==================================================================
    Grand Total      Good    Bad: Time     Phase     Grade       Cut
         166868    164057            0         0         0      2811
   in  5068.8     seconds
 Image            has   164057 counts for  32.37     counts/sec

$ xsel:ASTROSAT-SXT-PC > save im 1-8keV.im
Wrote image to file 1-8keV.im
$ xsel:ASTROSAT-SXT-PC > exit
$ Save this session? >[ ] No