Merge SXT level2 fits files

For producing SXT merge event files, either of the tools julia or sxtevtmerger can be used. Step by Step instructions for both tools is given below. We are using PC mode 29th March 2017 observation of GRS 1915+105 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.

Julia tool to merge SXT cleaned level2 event files

$ ls -d -1 $PWD/20170328_G06_033T01_9000001116_level2*/sxt/*/sxt.01/*cl.evt > evtfilelist
$ julia
 _       _ _(_)_     |  Documentation: https://docs.julialang.org
(_)     | (_) (_)     |
   _ _   _| |_  __ _  |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.0 (2020-08-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   
$ julia>]

Note: on typing “]”, julia prompt changes to “(@v1.5) pkg>”).

$ (@v1.5)  pkg> add SXTMerger
Updating registry at `~/.julia/registries/General`
######################################################################## 100.0%
Resolving package versions...
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
$ julia> using SXTMerger
$ julia> sxt_l2evtlist_merge("evtfilelist","GRS_1915_sxt_merged_cl.evt")
Merged event file: GRS_1915_sxt_merged_cl.evt successfully written!

Sxtevtmerger tool usage

$ bash sxt_merger_make.sh

This will automatically define the command name after putting the tool in a directory “auxpyscrpt” in your home environment.

$ sxtevtmerger -h
=========================================================================
 
    Running SXT GTI Coorector and Events Merger Script
     Task: sxt_gti_corr_evt_merger_v05.py
     Version: 0.02 Release Date: 2017-06-13

    Developed By Sunil Chandra, TIFR, Mumbai, 09, June, 2016
     Recently Updated on 22 February 2018

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Description: This tool merges the events files after correcting for overlapping exposures in GTIs. It also create merged mkf and lbt files.
Precautionary Remark:: Merging events files is always risky job so please use this script only if it is suited for. Never merge two events files from two different instruments.
 Updates dated 2018-02-22 : Included a filter over events list => The events files with (exposure = 0 and number of row = 0) will be omitted from the updated list...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=========================================================================

Usage: sxt_gti_corr_evt_merger_v07.py [options]

 

Options:
  -h, --help            show this help message and exit
  -l KEEP_LOG, --keep_log=KEEP_LOG
                        Write YES/NO flag for notifying the script about the
                        time overlap logfile
  -f FULL_PATH_FILE_LIST, --filelist=FULL_PATH_FILE_LIST
                        Input File List with full path of level2 cleaned
                        events files
  -s SOURCE, --sname=SOURCE
                        The Source Name for output files.
  -d DUP_EVT_FLAG, --dup_evt_flag=DUP_EVT_FLAG
                        The Flag for duplicate events removal.   0: NO, 1:
                        YES.
  -e HEAD_UPDT_FLAG, --head_updt_flag=HEAD_UPDT_FLAG
                        The Flag for duplicate events removal.   0: NO, 1:
                        YES.
  --orbital_gap_time=ORBITAL_GAP_TIME
                        The Flag for orbital gap time ..thi gap if exists will
                        be simply ignored. Default = 5 s

The command-line options for this tool are as earlier :

sxtevtmerger -f INPUTEVENTSLISTFILE -s SOURCE_NAME

or

sxtevtmerger –filelist=INPUTEVENTSLISTFILE --sname=SOURCE_NAME

where “INPUTEVENTSLISTFILE (user-defined)” is an input file with the lists of events files (with full path). If this list file is not present in the current directory, one can give it with its path. “SOURCE_NAME (user-defined)” is the name of the source user wish to make it a part of the output file name.

sxtevtmerger –filelist=evtfilelist --sname=GRS_1915

Assuming the data directory *level2/sxt/ is the current directory.