• No results found

3.5 Binary systems and two families of GRBs

4.1.2 Software

Firstly the HEASoft software package 3 must be installed and access to calibration database CALDB4available.

XRT

Level 2 data are analyzed by FTools5 which are a set of software meant for working with fits files.

General analysis of XRT data firstly involves XSelect6which can filter photons based on energy, time, region, grade (quality/precision), etc. using other FTools. It creates typical spectral PHA file which is read in XSpec. It has many other applications but for this work the mentioned are enough. To run all the necessary commands in XSelect it has to happen within XSelect environment, or, all the commands may be typed in a text file (with .xco extension) and invoked when starting XSelect which will then execute them all one by one. By adding an exit command at the end the whole process may be completed with a single command line. Due to point spread function a point source will look like a line in WT data image, so, photons need to be filtered by position. During region selection

a DS97 program will be prompted showing WT image, then region may be selected and

information saved as a text file with .reg extension. This file will be used during region filtering. Knowing the region information (position of center of circle, radius of circle and inner circle in the case of annulus), the same file may be written independently of DS9 and then used by XSelect.

The next step is to generate exposure map with xrtexpomap which takes the previously generated spectral file and instrument response files. All input parameters may be entered in a single command line when invoking the program.

Next step is to create an arf-response file with xrtmkarf with spectral file and exposure map. All input parameters may be entered in a single command line.

The final step may involve grppha which is mainly used to rebin the energy bins in order to have a minimum counts per bin. Since XRT data will be fitted with BAT data

which can only be done with χ2 statistics, the XRT data need to be bin to minimum of

20 counts per energy bin so they can be fitted based on χ2. All input parameters may be entered in a single command line. Also bad channels which fall outside range 0.3 − 10 keV should be marked. 3https://heasarc.nasa.gov/lheasoft/ 4https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/caldb_intro.html 5 https://heasarc.gsfc.nasa.gov/ftools/ftools_menu.html 6 https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/ftools/xselect/xselect.html 7http://ds9.si.edu/site/Home.html

The spectral file, the arf-response file, and RMF-response file (which is the same for all the burst in a given yearly periods) can now be loaded into XSpec and fitted.

XSpec has its own environment but similar to XSelect all the commands (including final ”exit” command) may be written to a text file with .xcm and then invoked when starting XSPec which will run all the commands and exit.

Python:

All of these tasks are one-dimensional and can be run one by one within a programing language such as Python. There is no need for special Python packages from which these tools may be run and operated. It is possible to invoked them from Python the same way they would be started from operating system environment, and all the FTool tasks can be completed with a single command line.

User just needs to choose time period (with respect to GRB trigger), binning, region extension, model to fit, and run the Python script which has been written in the course of this work to simplify and speed up analysis. Since XSelect and XSpec have their own environments, text files with .reg, .xco, and .xcm extensions may be written by Python and invoked with the tools. With XSpec there is possibility to export results in a text file, or to log the XSpec output to a text file (.log extension). These text files may be read with Python and fitting information obtained. For XSPec there is also option to use Python package PyXspec which is specially design to operate XSpec from Python.

Information such as trigger time, burst position, trigger number, instrument informa- tion, etc. - which are needed in these FTool sequences - may be obtained from LEVEL 2 data files with Python package PyFITS which is used to manipulate FITS files. This is the basic chain. Additionally, some unnecessary files will be created during sequences and may be deleted at the end; plots from XSpec may be saved or imported into Python and from there make the plots, information from fitting saved or used for additional calcula- tion; option to include background, option to run just XSpec with different model; folders created, deleted, files moved, etc.

All of this can be repeated for many time bins by running the process over and over again (in a single script), just with different time periods, or by using Python module for multiprocessing which then runs all different time bins at the same time on different processors and combines results in the end. This can be useful when using small computer cluster with relatively strong processors like the one at G9 at La Sapienza University. Good practice is to allow for few seconds before new process starts because some times running XSelect at the same time on many processors may result in crash. Similar Python script has be written to do this.

BAT

First FTool is batbinevt which has many purposes including to filter photons from Level 2 files based on energy and time, and to do energy binning thus producing a spectral PHA file. Next batphasyserr and batupdatephakw are used to account for systematic errors. Then batdrmgen is run to produce response file. Then grppha to mark bad channels and other tasks. Finally XSpec may be run.

As in the XRT case all the commands with input parameters may be run on a single line and the processes are one dimensional. The Python script for BAT is similar to the one of XRT: inputs are time bin(s), binning, and other optional information such as light curve binning, mask weighing, checking the ”fkey” parameter, etc. Again, for different time bins, jobs may be distributed to different processors and results combined in the end.

Joint XRT-BAT

Finally script which implements two previous procedures is made to do joint analysis of XRT and BAT. The input parameters for both XRT and BAT are as in individual cases and final results contain fit information (parameters and statistics) and plots. Again the jobs for different instruments or time bins may be distributed to different processors.