the hxmt data reduction guide - ihep

73
The HXMT Data Reduction Guide v2.04 (for hxmtsoftv2.04) HXMT Science Data Center 1 1 Institute of High Energy Physics, Chinese Academy of Sciences, Beijing 100049, China November 20, 2020

Upload: others

Post on 07-Dec-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

The HXMT Data Reduction Guidev2.04 (for hxmtsoftv2.04)

HXMT Science Data Center 1

1Institute of High Energy Physics, Chinese Academy of Sciences, Beijing 100049,China

November 20, 2020

Contents

1 Introduction 11.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Organization of this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 HXMT Instrument 22.1 High Energy X-ray telescope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Medium Energy X-ray telescope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Low Energy X-ray telescope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 HXMT Data Files 103.1 Definitions of Proposal ID, Observation ID and Exposure ID . . . . . . . . . . . . 103.2 The Directory Structure of Level 1 Data Product . . . . . . . . . . . . . . . . . . . 103.3 The Data Files of Level 1 Data Product . . . . . . . . . . . . . . . . . . . . . . . . 11

4 HXMT Data Analysis Overview 154.1 HXMTDAS overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 HE Data Analysis 195.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.2.1 hepical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.3 Screening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.3.1 hegtigen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.3.2 hescreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.4 Extracting High Level Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.4.1 hespecgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.4.2 helcgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.4.3 herspgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.4.4 hebkgmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.5 Special Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.5.1 hxmtscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.5.2 hespeccorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 ME Data Analysis 356.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.2.1 mepical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2.2 megrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6.3 Screening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.3.1 megtigen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.3.2 megticorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

i

Insight-HXMT6.3.3 mescreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.4 Extraction of high-level products . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.4.1 mespecgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.4.2 melcgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.4.3 merspgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436.4.4 mebkgmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

7 LE Data Analysis 467.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.2 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7.2.1 lepical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.2.2 lerecon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

7.3 Screening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.3.1 legtigen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.3.2 legticorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547.3.3 lescreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

7.4 High level products extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567.4.1 lespecgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567.4.2 lelcgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.4.3 lerspgen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587.4.4 lebkgmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

8 Barycentric correction tools and other tools 618.1 HXMT hxbary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618.2 HXMT hxbary2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628.3 hobs info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638.4 hprint detid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638.5 hgti create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638.6 hpipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

A Installation of the HXMTDAS 67A.0.1 Download HXMTDAS source code . . . . . . . . . . . . . . . . . . . . . . . 67A.0.2 Initialization and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

ii

List of Figures

2.1 Three main payloads onboard Insight–HXMT. In the red circle, there are 18 NaI(Tl)/CsI(Na)scintillation detectors for HE. The left side is three ME boxes. The right side is threeLE boxes. They all have different FOVs. . . . . . . . . . . . . . . . . . . . . . . . . 3

2.2 One detector module for HE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Calibration spectrum of 241Am. The data were accumulated over one day. The 59.5

keV line was corresponded to 50 Channel. . . . . . . . . . . . . . . . . . . . . . . . 52.4 Left: One detector box of ME. Right: Layout of FOVs in one detector box. . . . . 62.5 The emission lines of Ag generated in the detected spectrum of Si-PIN detectors

when the energy of incident X-ray is larger than 25.5 keV(K-edge of Ag) . . . . . . 72.6 Left: One detector box of LE. Right: four pieces of CCD236 . . . . . . . . . . . . . 9

3.1 Directory of Observation ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Directory of Exposure ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.3 An example of data files in an exposure directory. . . . . . . . . . . . . . . . . . . 133.4 Files Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.1 HE data reduction flow diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.2 The comparison between the raw light curve (upper panel) and the spike light curve

(lower panel) with binsize = 0.1s and Det ID = 16. . . . . . . . . . . . . . . . . . 225.3 The top panel is the light curve of event file after hepical and the bottom panel is

the light curve after hescreen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.4 hxmtscreen data reduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.1 ME data reduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

7.1 LE data reduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477.2 The peak of pedestal events of CCD 0 vs its temperature . . . . . . . . . . . . . . 487.3 The width of pedestal events of CCD 0 vs its temperature. . . . . . . . . . . . . . 497.4 The peak of pedestal events of CCD 0 vs its temperature (after 20180615) . . . . 497.5 The width of pedestal events of CCD 0 vs its temperature (after 20180615). . . . 507.6 The reconstructed events for CCD 0: raw light curve, single events light curve

(GRADE = 0), split events light curve (GRADE = 1) and more split events lightcurve (GRADE = 2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

7.7 The ratio of two-split/more-split events(binsize = 100s) of small CCDs to coveredCCDs for board 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

7.8 The reconstructed events for CCD 0 when hzscal is set to 5: raw light curve, singleevents light curve (GRADE = 0), split events light curve (GRADE = 1) and moresplit events light curve (GRADE = 2). . . . . . . . . . . . . . . . . . . . . . . . . 52

7.9 The energy spectra of single events (GRADE = 0), no reconstructed two splitevents, and the reconstructed two-split events (GRADE = 2). . . . . . . . . . . . 53

iii

Chapter 1

Introduction

1.1 Scope

This document is meant as a guide and reference for users who want to use HXMT data to extractscientific products.

1.2 Organization of this Guide

• Chapter 2 describes the HXMT instrument.

• Chapter 3 describes the HXMT data products.

• Chapter 4 describes the overview of data analysis software.

• Chapter5, 6 and 7 describe the data analysis method of HE, ME and LE, respectively.

• Chapter 8 describe the barycenter correction tools.

• Appendix A contains a description of how to install HXMTDAS package.

1

Chapter 2

HXMT Instrument

The Hard X-ray Modulation Telescope (HXMT) is a large X-ray astronomical satellite with a broadband in 1–250 keV. It was successfully launched on 15th June 2017 in China. It is a low earth orbittelescope with altitude of 550 km and inclination of 43 degrees. In order to fulfill the requirements ofthe broad band spectral and variability observations, three payloads are configured onboard HXMT,which are, High Energy X-ray telescope (HE) using 18 NaI(Tl)/CsI(Na) scintillation detectors for20–250 keV band, Medium Energy X-ray telescope (ME) using 1728 Si-PIN detectors for 5–30 keVband, and Low Energy X-ray telescope (LE) using 96 SCD detectors for 1–15 keV band. The threepayloads are integrated on a same supporting structure to achieve the same pointing direction, thusthey can simultaneously observe the same source. They all have collimators to confine differentkinds of field of view (FOV). Figure 2.1 shows the three main payloads onboard Insight-HXMTand their FOVs.

2.1 High Energy X-ray telescope

Similar to BeppoSAX/PDS and RXTE/HEXTE, HE adopts an array of NaI(Tl)/CsI(Na)PHOSWICHs as the main detectors as shown in the Figure 2.2. The diameter of each PHOSWICHis 190 mm. The thickness of NaI(Tl) and CsI(Na) is about 3.5 mm and 40 mm. The workingtemperature of PHOSWICHS is actively controlled in 18±2oC. The incident X-ray with most ofits energy deposited in NaI(Tl) is regarded as a NaI(Tl) event. CsI(Na) is used as an activeshielding detector to reject the background events from backside and events with partial energyloss in the NaI(Tl). The scintillation photons generated within the two crystals can be collectedby the same photomultiplier tube(PMT). Signals from the PMT(Hamamatsu R877–01) are pulseshaped to distinguish NaI(Tl) events and CsI(Na) events due to their different decay time. Theenergy loss, time of arrival and the pulse width with each detected event are measured, digitizedand telemetered to the ground. The CsI(Na) can be used as a gamma ray burst(GRB) monitor.The detected energy range in normal mode is about 50–800 keV and is changed to 250 keV–3 MeVin GRB mode for CsI(Na) if the high voltage of PMT is decreased.

The collimators of HE define 15 narrow FOV(5.7◦×1.1◦), 2 wide FOV(5.7◦×5.7◦) and a blindFOV which was covered with 2 mm thick tantalum. They also have different orientations with astep of 60 degrees, as shown in Figure 2.1. The FOV and orientation of each detector are shownin Table 2.1.

For each PHOSWICH detector, a radioactive source 241Am with an activity of 200 Bq is embed-ded into a plastic scintillator (BC–448M) and viewed by a separate Multi-Pixel Photon Counter.They all mounted in the collimator and used as an automatic gain control (AGC) detector. Acoincident measurement between the AGC detector (5.5 MeV alpha particle) and PHOSWICH de-tector (59.5 keV X-ray) will be labeled as a calibration event. The calibration events are saved likenorm events, just have a different flag to discriminate. The spectrum of calibration events is shown

2

Insight-HXMT

Figure 2.1: Three main payloads onboard Insight–HXMT. In the red circle, there are 18NaI(Tl)/CsI(Na) scintillation detectors for HE. The left side is three ME boxes. The right side isthree LE boxes. They all have different FOVs.

3

Insight-HXMT

Detector ID Field of View(FoV) orientation0 5.7◦ × 1.1◦ −60◦

1 5.7◦ × 1.1◦ 0◦

2 5.7◦ × 5.7◦ +60◦

3 5.7◦ × 1.1◦ 0◦

4 5.7◦ × 1.1◦ −60◦

5 5.7◦ × 1.1◦ +60◦

6 5.7◦ × 1.1◦ +60◦

7 5.7◦ × 1.1◦ −60◦

8 5.7◦ × 1.1◦ 0◦

9 5.7◦ × 5.7◦ −60◦

10 5.7◦ × 1.1◦ +60◦

11 5.7◦ × 1.1◦ 0◦

12 5.7◦ × 1.1◦ 0◦

13 5.7◦ × 1.1◦ +60◦

14 5.7◦ × 1.1◦ −60◦

15 5.7◦ × 1.1◦ +60◦

16 blind FoV17 5.7◦ × 1.1◦ −60◦

Table 2.1: The collimators of HE define 15 narrow FOV(5.7◦× 1.1◦), 2 wide FOV(5.7◦× 5.7◦) anda blind FOV which was covered with 2mm tantalum. They are distinguished by different detectorIDs. They also have different orientations with a step of 60 degrees

is Figure 2.3. In-flight performance shows that the line centroids of 59.5 keV are stable to betterthan 0.01 channels on a one day timescale. The response of NaI(Tl) is not uniform in its largesurface so the calibration events are just used as the gain control and are not suitable to calibratethe gain of NaI(Tl) detectors in-orbit. In the analysis of X-ray spectrum, the radioactive eventsshould be discarded.

Besides the active shielding of CsI(Na), HE also adopts the 18 plastic scintillators (6 on the topand 12 in the later sides of PHOSWICH detectors) as the anti-coincidence detectors(ACD). TheACD are always used to reject the particle background.

2.2 Medium Energy X-ray telescope

ME consists of 3 detector boxes as shown in Figure 2.4. Each box has 576 Si-PIN detector pixelsread out by 18 ASIC (Application Specified Integrated Circuit). Each ASIC is responsible forthe readout of 32 pixels. The working temperature of Si-PIN detectors in orbit is from −40oC to−10oC.

For each detector box, the collimators of ME confine 15 ASICs as narrow FOV(1o × 4o), 2ASIC as wide FOV(4o × 4o) and one blind FOV. The layout of the FOVs in one detector box isalso shown in Figure 2.4. Two in-orbit calibration radioactive sources (241Am) are installed in thecorner of two ASICs and each source illuminates four pixels. The FOV of each detector is shownin Table 2.2.

Si-PIN detectors are fixed on the ceramic chip by silver glue. When the energy of incidentX-ray photon is greater than 25.5 keV (K-edge of Ag), they have some probability of penetratingthe Si-PIN and react with silver. Ag emission lines will be generated due to the photoelectriceffect with electrons in K-shell of Ag and detected by the Si-PIN detectors. Figure 2.5 showedthat emission lines of Ag appeared in the detected energy spectrum when energy of incident X-rayphoton is larger than 25.5 keV in the ground calibration experiments.

4

Insight-HXMT

Figure 2.2: One detector module for HE.

Figure 2.3: Calibration spectrum of 241Am. The data were accumulated over one day. The 59.5keV line was corresponded to 50 Channel.

5

Insight-HXMT

Figure 2.4: Left: One detector box of ME. Right: Layout of FOVs in one detector box.

Field of View(FoV) Detector ID ASIC ID

1◦ × 4◦

0-255 0-7

352-575 11-17

576-831 18-25

928-1151 29-35

1152-1407 36-43

1504-1727 47-53

4◦ × 4◦256-319 8-9832-895 26-27

1408-1471 44-45

blind FoV320-351 10896-927 28

1472-1503 46

Calibration source

192 6352 11768 24928 291344 421504 47

Table 2.2: The ME collimators

6

Insight-HXMT

Figure 2.5: The emission lines of Ag generated in the detected spectrum of Si-PIN detectors whenthe energy of incident X-ray is larger than 25.5 keV(K-edge of Ag)

2.3 Low Energy X-ray telescope

LE also consists of three detector boxes and each box contains 32 CCD236 which is a kind of SweptCharge Devices (SCD). CCD236 is a second-generation SCD, which has been developed by e2vcompany. Each CCD236 is built with a sensitive area of about 4 cm2 and has four quadrants. Ineach quadrant, the L-shaped electrodes guide the charge towards the diagonal firstly and then toa common readout amplifier in the central region. In the continuous readout mode, the maximumreadout time is about 1 ms with a guaranteed energy resolution. Figure 2.6 shows the detector boxof LE and photograph of four pieces of CCD236. The working temperature in-orbit for CCD236is about from −75oC to −40oC.

For each detector box of LE, collimators define four kinds of FOVs as shown in Table 2.3.Twenty CCD236 have narrow FOVs with 1.6o × 6o . Six CCD236 have wide FOVs with 4o × 6o.Two CCD236 have blind FOVs and one of them has carried a 55Fe radioactive source. FourCCD236 have a very large FOV with about 50 − 60o × 2 − 6o.

For events with energy above the onboard threshold, the energy and the readout time of eachdetected event are measured, digitized and telemetered to the ground. Besides this, LE also hasthe forced trigger events, which record the amplitude of the noise or the pedestal offset for eachCCD detector every 32 ms. The forced trigger events are also saved as normal events, but with adifferent type.

The spreading of the charge cloud over several pixels may cause split events. These split eventsmay be read out in adjacent readout periods. In order to reduce the effect of the charged particles,the single events without split are selected to generate the spectrum and light curve of LE.

7

Insight-HXMT

Detector ID Field of View(FOV)0/32/64 1.6◦ × 6◦

1/33/65 4◦ × 6◦

2/34/66 1.6◦ × 6◦

3/35/67 1.6◦ × 6◦

4/36/68 1.6◦ × 6◦

5/37/69 4◦ × 6◦

6/38/70 1.6◦ × 6◦

7/39/71 1.6◦ × 6◦

8/40/72 1.6◦ × 6◦

9/41/73 1.6◦ × 6◦

10/42/74 1.6◦ × 6◦

11/43/75 4◦ × 6◦

12/44/76 1.6◦ × 6◦

13/45/77 blind FOV14/46/78 1.6◦ × 6◦

15/47/79 4◦ × 6◦

16/48/80 50 ∼ 60◦ × 2 ∼ 6◦

17/49/81 50 ∼ 60◦ × 2 ∼ 6◦

18/50/82 50 ∼ 60◦ × 2 ∼ 6◦

19/51/83 50 ∼ 60◦ × 2 ∼ 6◦

20/52/84 1.6◦ × 6◦

21/53/85 blind FOV22/54/86 1.6◦ × 6◦

23/55/87 1.6◦ × 6◦

24/56/88 1.6◦ × 6◦

25/57/89 1.6◦ × 6◦

26/58/90 1.6◦ × 6◦

27/59/91 4◦ × 6◦

28/60/92 1.6◦ × 6◦

29/61/93 1.6◦ × 6◦

30/62/94 1.6◦ × 6◦

31/63/95 4◦ × 6◦

Table 2.3: The FOV of LE telescope.

8

Insight-HXMT

Figure 2.6: Left: One detector box of LE. Right: four pieces of CCD236

9

Chapter 3

HXMT Data Files

3.1 Definitions of Proposal ID, Observation ID and Expo-sure ID

The observation data of Insight-HXMT is organized by Proposal-Observation-Exposure.Proposal ID is the unique ID of the approved proposal, which is assigned after the annual

proposal collection. The proposal ID is named like ”Paattmmm”, where ”aa” is the sequenceof the annual proposal collection, ”tt” is the type of proposal, ”mmm” is the given sequence ofproposal ID.

Observation is the continuous time for a specific target. The available time of Insight-HXMT isscheduled one by one observation. The observation ID is unique identification of the observation.The observation ID is composed of the sequence number (3 digits, start from 001). For exampleP0102005003, ”P0102005” is the proposal ID and ”003” is the sequence number, it means thisobservation is the 3rd observation of proposal P0102005.

Usually one observation lasts several hours and the data volume exceeds several GBs. To re-duce the single file size, an observation is man-made split into multiple segments (named exposure),which is only a time fragment in an observation without the traditional exposure concept of cameraor CCD image instrument. The duration of an exposure is usually three hours, except that fewexposures will exceed six hours. Exposure ID is the identification of the exposure, which is com-posed of exposure sequence + observation date + day sequence + sequence in day. For example,in exposure ID P010200500308-20171106-03-04, P010200500308 indicates it is the 8th exposure ofthe observation P0102005003, the date of exposure start is 20171106, this date is the 3rd day ofthe observation, and the exposure is the 4th exposure of this observation in 20171106. There isalso a short format Exposure ID used for filename. It only reserves part of exposure sequence, forexample P010200500308.

3.2 The Directory Structure of Level 1 Data Product

For Scientific user, data analysis starts from Level 1 data product. Level 1 data files are arrangedin a hierarchical directory tree with the cue of Observation ID - Exposure ID. The root directoryof every product is named by the Observation ID. There are three types of catalogues: List Files,Exposures Directory and Auxiliary Data for whole observation.

• List Files:Two List File are provided in root of 1L product. ”FileList.FITS” contains all files informa-tion of archived observation, include the name , path, size, type of file and md5 checksumand so on. ”ExpoList.XML” gives exposures list in this observation.

10

Insight-HXMT

Figure 3.1: Directory of Observation ID.

Figure 3.2: Directory of Exposure ID.

• Exposures Directory:Each exposure has a separate directory to store the scientific and the engineering data col-lected in the exposure period.

• Auxiliary Data Directory:Two Auxiliary Data Directories are designed in root directory. ”ACS” directory stores atti-tude and orbit data. ”AUX” is used for auxiliary data originated from ground segment, suchas EHK and so on. These ”ACS” and ”AUX” catalogues cover for whole observation period,distinguished from the same directory in exposure directory, which only covered exposureperiod.

There is a sub-level directory in each exposure directory. The sub-directory is divided accordingto source instrument. ”ACS” and ”AUX” contain the same data as homonymic catalogs in rootdirectory. ”HE”, ”ME” and ”LE” directories store Events and Engineering Data from HE, MEand LE telescope, respectively.

3.3 The Data Files of Level 1 Data Product

Data files of Level 1 Product are named as following format:”HXMT exposure-id type FFFFFF Vn L1P.FITS”The filename is composed with seven segments, ”HXMT”, ”exposure-id”, ”type”, ”FFFFFF”,”Vn”, ”L1P”, and ”FITS”. ”HXMT”, ”FFFFFF” , ”L1P”, and ”FITS” are fixed, and the restvary according to different exposure ID, file types, and file version. The capital letters are fixed,and the lowercase letters are variable according to different file types and exposures.

• HXMT - Fixed Prefix for all data files.

• exposure-id - Short format Exposure ID

11

Insight-HXMT

• type - Abbreviated name of file type

• FFFFFF - Reserved segment for future, filled with FF now

• Vn - File Version. V is fixed prefix, n is character from 1-9, a-z

• L1P - Fixed part. L1 indicate it is a Level 1 data file. P is abbreviation of PointingObservation-Mode

• FITS - Fixed file extension name, indicating this is a Fits format file.

This is an example of data files in an exposure directory (see Figure 3.3).All file types appear in above example are shown in the following table (see Figure 3.4):

12

Insight-HXMT

Figure 3.3: An example of data files in an exposure directory.

13

Insight-HXMT

Abbreviated Type Name Data Content HE-Evt HE_Events HE-RadEvt HE_Radioactive_Events HE-ShltEvt HE_Sheltered_Detector_Events HE-InsStat HE_Instrument_Status HE-TH HE_Temperature HE-Cnts HE_Counts HE-DTime HE_DeadTime HE-HV HE_High_Voltage HE-PM HE_Particle_Monitor ME-Evt ME_Events ME-RadEvt ME_Radioactive_Events ME-ShltEvt ME_Sheltered_Detector_Events ME-CirPara ME_Circuit_Parameter ME-InsStat ME_Instrument_Status ME-TH ME_Temperature ME-Cnts ME_Counts LE-Evt LE_Events LE-RadEvt LE_Radioactive_Events LE-ShltEvt LE_Sheltered_Detector_Events LE-WFOVEvt LE_Wide_FOV_Events LE-ForcedEvt LE_Forced_Trigger_Events LE-CirPara LE_Circuit_Parameter LE-InsStat LE_Instrument_Status LE-TH LE_Temperature LE-Cnts LE_Counts Att Attitude Orbit Orbit EHK Extend Housekeeping Data

Figure 3.4: Files Type.14

Chapter 4

HXMT Data Analysis Overview

4.1 HXMTDAS overview

The Insight-HXMT Data Analysis Software package (HXMTDAS) is to achieve the HXMT dataanalysis processing and extract scientific products. Its purpose is to achieve scientific products,such as energy spectra, light curves, Redistribution Matrix Files (RMF) and background files. Itprovides several tasks with each task is to accomplish a step of data analysis. These tasks arewritten in ftools style and are fully compatible with the HEASoft.

The processing procedures of HXMTDAS package is organized into three distinct stages forthe calibration, the screening and the extraction of high-level scientific products. The input isa observation (call exposure number) from the HXMT level 1 (1L) data products and has FITSformat. It has two run styles:

• Command Line style:

hepical evtfile=HXMT_P010130600202_HE-Evt_FFFFFF_V1_1RP.FITS

outfile=he_pi.fits evtnum=5 timedel=0.00008

• User interface style:

hepical evtnum=5 timedel=0.00008

hepical : ##############################################

hepical : HXMT HE task, hepical is running

Name of the input 1-L Event FITS file[] HXMT_P010130600202_HE-Evt_FFFFFF_V1_1RP.FITS

Name of the output calibrated Event FITS file[] he_pi.fits

hepical : HXMT HE task, hepical is running successfully!

hepical : ##############################################

Since the input parameters are important to these tasks, some common parameters are listedas follows:

• evtfile[filename], name of the input 1L/reconstructed/screened Event FITS file;

• outfile[filename/string], name of the output FITS file/output prefix for spectra/light curves;

• baddetfile[filename], name of the Bad Detector FITS file or NONE for none;

• userdetid[string], detectors selection of each payload, some regulations: a set of detectorswhich are delimited by comma or blank character with each other will constitute a spec-trum/light curve; more spectra/light curves is delimited by semicolon (”;”); ”-”(hyphen)means ”to”; it can be set to a file (e.g., @+filename);

15

Insight-HXMT

• starttime/stoptime[real], starting/stop time for summation (DEFAULT = 0.);

• minPI/maxPI[integer], minimum/maximum PI to consider (DEFAULT = 0).

Calibration

Telecope Task name DescriptionHE hepical remove spike events and calculate PI columnME mepical calculate PI column

megrade calculate event grade and deadtime of each FPGALE lepical calculate PI column and remove forced trigger events

lerecon reconstruct two split events and assign event grade

At this stage, the values of Pulse Invariant (PI) are calculated from the raw values of PulseHeight Amplitude (PHA) of each event, accounting for temporal changes in gain and energy offset.

Users are advised to download the new HXMT CALDB. If the parameter ’gainfile’ of thesetasks is set to CALDB (gainfile=CALDB), these tasks will use the gain files from CALDB.Otherwise, the parameter can be directly set to the path of gain file.

The HE task hepical can be used to find the spike events with the default parameterstimedel=0.00008 evtnum=5 lowchan=0 and highchan=255. If users who don’t care low energyband can set lowchan=35 (and then remove the low band at screening). The meaning of theseparameters is below:

• lowchan: low channel considered to remove spike events;

• highchan: high channel considered to remove spike events.

• timedel: time interval between two neighbor events for removing spike events;

• evtnum: continuous events number which two neighbor events satisfied ’timedel’ between’lowchan’ and ’highchan’;

The task megrade calculates the grade column for the input event file and writes the valuesin the output file. At the same time, higher grade events will be automatically removed from theevent list. This task can calculate the deadtime for each FPGA, which are required for mespecgenand melcgen. Other parameter ’binsize’ (DEFAULT = 1s) is used to set the time interval of eachdeadtime calculation.

The task lepical calculates the peak position of PHA distribution of forced trigger events withintegral time of ’maxtimedel’(DEFAULT = 60 s). The task lerecon reconstructs two-split event,and assigns grade (0:ALL; 1:Single Event; 2:Two-Split Event).

For these tasks, the GTI extension(s) present in the input file will be copied to the output filewithout changes.

There is a simple correlation between PI and energy (E, keV):

• HE: PI=256*(E-15)/370

• ME: PI=1024*(E-3)/60

• LE: PI=1536*(E-0.1)/13

16

Insight-HXMT

Screening

Telescope Task name DescriptionHE hegtigen generate a FITS GTI (good time interval) file

hescreen use GTI together with other criteria to screen the dataME megtigen generate a FITS GTI file

megticorr generate a new GTI file to eliminate some bad time intervalsfrom above GTI file

mescreen use GTI together with other criteria to screen the dataLE legtigen generate a FITS GTI file

legticorr generate a new GTI file to eliminate some bad time intervalsfrom above GTI file

lescreen use GTI together with other criteria to screen the data

The Good Time Intervals (GTIs) are calculated according to two sets of parameters, one relatedto the extended housekeeping (EHK) file, the other one related to temperature file (default criteria).For HE, particle flux file could be used (if users don’t want to use, please set ’pmfile’ to ’NONE’).The criteria associated to ”expr’ parameter (when ’defaultexpr’ parameter set to ”NONE”) foreach payload is listed below:

HE: ELV>10&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300

ME: ELV>10&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300

LE: ELV>10&&DYE_ELV>30&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300

We recommend users set ’defaultexpr’ to NONE and use expr parameter. If these GTI tasksreport the following error:”please set parameter ’expr’ when ’defaultexpr’=’NONE’”please use these tasks with the ’expr’ parameter, for example, hegtigen expr=”ELV > 10&&COR >8&&SAA FLAG == 0&&ANG DIST < 0.04&&T SAA > 300&&TN SAA > 300”.

Sometimes, there are still some bad time intervals in GTI files. The tasks of megticorr andlegticorr are used to eliminate these intervals and new GTI files are generated for ME and LE,respectively.

The screening criteria used to generate the cleaned event file are listed as follows:

• Removal of the bad time intervals (using the GTI file(’gtifile’) and GTIs in event file);

• Removal of the bad detectors(’baddetfile’ parameter);

• Removal of the bad events (events with higher grade);

For HE, ’anticoincidence’ can be used (set to ’yes’) to remove particle background; ’minpulsewidth’(DEFAULT = 54) and ’maxpulsewidth’ (DEFAULT = 70) are the minimum and maximum pulsewidth for NaI, respectively.

17

Insight-HXMT

Extracting high-level Products

Telescope Task name DescriptionHE hespecgen extract spectra

helcgen extract light curvesherspgen generate response filehebkgmap generate background file

ME mespecgen extract spectramelcgen extract light curvesmerspgen generate response filemebkgmap generate background file

LE lespecgen extract spectralelcgen extract light curveslerspgen generate response filelebkgmap generate background file

At this stage, the high-level products are extracted from the screened event file. The productsinclude the energy spectra, response file (RSP), light curves and background files.

The exposure time is the summation of all deadtime corrected GTIs.To extract a light curve, the bin size (’binsize’) of the light curves must be set. Sometimes, the

start or end of the GTIs may fall within a bin size and the column named ’fracexp’ in the light curvewill give the value as the proportion of the bin shortening for each bin. The deadtime correction (setparameter ’deadcorr’ to yes) is done bin by bin using the deadtime file (the parameter ’deadfile’).If the parameter of aligncorr set to yes and the parameter of attfile set to attitude file, the psf(point spread function) correction can be done bin by bin.

hebkgmap, mebkgmap and lebkgmap are used to generate background files for HE, ME andLE, respectively.

Other tools

• hxmtscreenThere are some different time intervals for different detectors of one telescope. For example,the GTIs of 18 detectors of HE may be different with each other. This task is used to filterthese event files generated by hescreen according to their common GTIs among all detectors.The output event file only includes a common GTI extension. The parameter ’usergtifile’can be set to ”NONE” or a text file (each line has a format of ”start-time stop-time”) andthe common GTI will consider the GTIs in text file. The task can also be used for ME andLE.

• hxbaryDo barycenter correction for HE, ME and LE. The time is corrected from TT to TDB(accuracy <1us) and written to a new column named TDB.

• hxbary2Do barycenter correction for HE, ME and LE. The time column is replaced by TDB time.

18

Chapter 5

HE Data Analysis

5.1 Introduction

This chapter contains the details of the current status of the HE data analysis.The processing procedures include three major steps: calibration (stage 1), screening (stage 2)

and extraction of high-level scientific products (stage 3). For stage 1, the EVT file is processed toproduce a calibrated EVT file; for stage 2, the calibrated EVT file is filtered by applying cleaningcriteria to produce a cleaned EVT file; for stage 3, the high-level scientific products are generated.The following sections describe the analysis steps that are presented in Fig. 5.1.

5.2 Calibration

5.2.1 hepical

This task mainly remove spike events and calculate PI values of HE event. The CsI events areremoved in this task by default.

The spike events are false signal and caused by electronic system. Generally, the light curveof spike is a ”burst”, which is not from the sources. Usually, it only happens in one detectorat the same time interval in a short moment.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input 1-L event FITS file.

• outfile [file name]Name of output calibrated event FITS file.

• gainfile [file name]Name of the input gain FITS file.If set to CALDB, use the file in the Calibration Database(DEFAULT=CALDB).

• seed [int]Input seed for random number generator.

• lowchan [int]Low channel considered to remove events led by electronic instrument(DEFAULT = 0).

19

Insight-HXMT

Spik

e Id

enti

fica

tio

n

‘h

ep

ica

l’

Even

t Fi

le S

cree

nin

g

‘h

escr

een’

En

erg

y S

pe

ctra

Ex

trac

tio

n

‘h

esp

ecge

n’

Ligh

t C

urv

es

Extr

acti

on

‘h

elc

gen’

Leve

l 1 F

ITS

File

s

GTI

Gen

erat

ion

‘h

egt

ige

n’

Bac

kgro

un

d G

ene

rati

on

‘h

eb

kgm

ap’

Res

po

nse

File

s Ex

trac

tio

n

‘h

ersp

gen’

Level 2 FITS Files

CA

LDB

Even

t Fi

le

GTI

File

Scre

ened

Ev

ent

File

Ligh

t C

urv

es

Res

pon

se

File

s

Ener

gy

Spe

ctra

Bac

kgro

un

d Fi

les

Figure 5.1: HE data reduction flow diagram.

20

Insight-HXMT

• highchan [int]High channel considered to remove events led by electronic instrument(DEFAULT = 255).

• timedel [real]Time interval between tow neighbor events for removing spike events (DEFAULT=0.00008).

• evtnum [int]Continuous events number which two neighbor events satisfied ’timedel’ between ’lowchan’and ’highchan’ to consider(DEFAULT = 5).

• glitchfile [file name]Name of the output file of spike events (DEFAULT = NONE).

• clobber [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists(DEFAULT=yes).

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• chatter[integer]Chatter Level (min=0, max=5)(DEFAULT=2). It is used to control the output message.

USAGE

- General usage

hepical evtfile=HXMT_P010129300302_HE-Evt_FFFFFF_V1_L1P.FITS outfile=he_pi.FITS

The structure (Event extension and GTIs extension) of HXMT P010129300302 HE-Evt FFFFFF V1 L1P.FITSSwill copy to the new files. And a column named PI is added in the new event file.

- If users want to get the spike events, please set glitchfile.

hepical glitchfile=he_spike.FITS

The default values to remove spike events are lowchan = 0 highchan = 255 timedel =0.00008 and evtnum = 5. Figure. 5.2 shows the comparison between the raw light curve andthe spike light curve removed by this tool (binsize = 0.1s).

21

Insight-HXMT

­1

Co

un

ts (

0.1

s)

100

200

300

400

500

Time(s)0 500 1000 1500 2000 2500 3000 3500

­1C

ou

nts

(0

.1s)

100

200

300

400

500

Figure 5.2: The comparison between the raw light curve (upper panel) and the spike light curve(lower panel) with binsize = 0.1s and Det ID = 16.

- This tool needs CALDB environment. The default gainfile is set to ’CALDB’. Users canalso assign the gain file, by:

hepical gainfile=/file/path/to/hxmt_he_gain_20171030_v1.fits

5.3 Screening

5.3.1 hegtigen

Generate a GTI FITS file.

PARAMETER

The parameters of this task are listed below:

• hvfile [file name]Name of the input 1-L High Voltage FITS file.

• tempfile [file name]Name of the input 1-L Temperature FITS file.

• ehkfile [file name]Name of the input 1-L EHK FITS file.

• outfile [file name]Name of output GTI FITS file.

• rangefile [file name]Name of the input parameter configure FITS file. Default is ’$HEADAS/refdata/herangefile.fits’.

22

Insight-HXMT

• ascendfile [file name]Name of the input fits for high bkg. Set ’$HEADAS/refdata/HE D0 C26-255 Ascend PHA Map.txt’or ’NONE’.

• descendfile [file name]Name of the input fits for high bkg. Set ’$HEADAS/refdata/HE D0 C26-255 Descend PHA Map.txt’or ’NONE’.

• defaultexpr [string]EHK Selection Expression: ’YES’ to use parameter ’herangefile’/ ’NO’ for user setting/’NONE’ to use parameter ’expr’ and only create a GTI extension.

• ELV [real]Pointing direction above Earth(>?deg) or < 0 for default.

• DYE ELV [real]Pointing direction above bright Earth(>?deg) or < 0 for default.

• SAA FLAG [bool]Exclude the data in SAA.

• T SAA [real]Time since SAA passage(>?s) or < 0 for default.

• TN SAA [real]Time to next SAA passage(>?s) or < 0 for default.

• COR [real]Min Cut-off Rigidity value(>?GeV ) or < 0 for default.

• MOON ANGLE[real]The Moon Angle is bigger than(>?deg) or < 0 for default.

• SUN ANGLE [real]The Sun Angle is bigger than(>?deg) or < 0 for default.

• ANG DIST [real]The offset angle from the pointing direction.

• pmfile [file name]Name of the input Particle Monitor FITS file.

• pmexpr [string]Selection Expression for Particle Monitor File (DEFAULT = ’NONE’).

• expr [string]Selection Expression for EHK file (DEFAULT=’NONE’), if defaultexpr=’NONE’, expr mustbe set.

• prefr [real]Pre-Time Interval factor [0,1].

• postfr [real]Post-Time Interval factor [0,1].

• clobber [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists(DEFAULT=’yes’).

23

Insight-HXMT

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words (DEFAULT=’yes’).

• chatter [integer]Chatter Level (min=0, max=5)(DEFAULT=2).

USAGE

- General usage

hegtigen hvfile=HXMT_P010129300302_HE-HV_FFFFFF_V1_L1P.FITS

tempfile=HXMT_P010129300302_HE-TH_FFFFFF_V1_L1P.FITS

ehkfile=HXMT_P010129300302_EHK_FFFFFF_V1_L1P.FITS

outfile=he_gti.FITS defaultexpr=NONE

expr="ELV>10&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300"

Currently, we recommend users set the parameter defaultexpr to ′NONE′, not to ′Y ES′/′NO′.

- If users want to use particle monitor, users should set pmfile and pmexpr correctly. Forexample:

hegtigen hvfile=HXMT_P010129300302_HE-HV_FFFFFF_V1_L1P.FITS

tempfile=HXMT_P010129300302_HE-TH_FFFFFF_V1_L1P.FITS

ehkfile=HXMT_P010129300302_EHK_FFFFFF_V1_L1P.FITS

outfile=he_gti.FITS defaultexpr=NONE

expr="ELV>10&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300"

pmfile=HXMT_P010129300302_HE-PM_FFFFFF_V1_L1P.FITS

pmexpr="Cnt_PM_0<100&&Cnt_PM_1<100&&Cnt_PM_2<100"

- If users want to set their own criteria for high voltage or temperature, users can modify theherangefile.fits and set the rangefile parameter. For example:hegtigen rangefile=./rangefile.fitsThe default value of herangefile.fits is ’$HEADAS/refdata/herangefile.fits’.

- History keywords in GTI file (GTIDesc extension):Users can ignore these keywords such as ’HISTORY P8 ELV = 5’, ’HISTORY P10 COR=5’,etc, when the parameter defaultexpr =′ NONE′, and users only concern the ’expr’ keyword(HISTORY P18 expr=”ELV > 10&&ANG DIST < 0.1&&SAA FLAG == 0”).

- This version has removed some regions where the background can not be estimated verywell, so the GTIs maybe less than these in previous version(2.0/2.01). If users don’t carethe background estimation, users can set the parameter ′ascendfile′ and ′descendfile′ to’NONE’, and will get more GTIs. For example:

hegtigen defaultexpr=NONE

expr="ELV>10&&COR>8&&SAA_FLAG==0&&ANG_DIST<0.04&&T_SAA>300&&TN_SAA>300

ascendfile=NONE descendfile=NONE

hvfile=HXMT_P010129300302_HE-HV_FFFFFF_V1_L1P.FITS

tempfile=HXMT_P010129300302_HE-TH_FFFFFF_V1_L1P.FITS

ehkfile=HXMT_P010129300302_EHK_FFFFFF_V1_L1P.FITS

outfile=he_gti.FITS

24

Insight-HXMT

5.3.2 hescreen

Selection some of the photons with special criteria in event file.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the calibrated event FITS file.

• outfile [file name]Name of output screened event FITS file.

• gtifile [file name]Name of the input GTI FITS file.

• baddetfile [file name]Name of the input bad detector configure file. Always set to ’$HEADAS/refdata/hedetectorstatus.fits’.

• userdetid [string]Detector ID (0-17) Selection (ID List).

• anticoincidence [bool]The logical anticoincidence selection used? (’yes’/’no’)(DEFAULT = ’yes’).

• eventtype [int]Type of Event:0:ALL; 1:X-ray; 2:Calibration Source (DEFAULT=1)

• starttime [real]Starting time for summation (DEFAULT = 0.).

• stoptime [real]Ending time for summation (DEFAULT = 0.).

• minPI [int]Minimum PI to consider.

• maxPI [int]Maximum PI to consider.

• minpulsewidth [int]Minimum Pulse Shape Discriminator for NaI and CsI (DEFAULT = 54).

• maxpulsewidth [int]Maximum Pulse Shape Discriminator for NaI and CsI (DEFAULT = 70).

• clobber[boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists(DEFAULT=yes).

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• chatter [integer]Chatter Level (min=0, max=5)(DEFAULT=2).

25

Insight-HXMT

USAGE

- General usage

hescreen evtfile=he_pi.FITS gtifile=he_gti.FITS outfile=he_screen.FITS

userdetid="0-17"

- If users don’t want to use logical anticoincidence array, users can set anticoincidence to ′no′

(DEFAULT=’yes’). We recommend users set this parameter ’yes’. Because the backgroundgeneration module need anticoincidence =′ yes′.

- The parameters of minpulsewidth and maxpulsewidth can be set to any values (DEFAULT=54,70), but for background generation, only the default values are considered.

- In order to estimate the background, the blind detector should be selected in this stage.

Example

In Figure 5.3, the upper panel shows the light curve of event file (obsID:P010129800201) afterperforming hepical. The bottom panel is the light curve after performing hescreen. The ”0-15,17”detectors are selected. And the NaI photons which have pulsewidth between 54 to 70 are selectedas well.

8000

10000

12000

14000

16000

18000

Counts/s

Entries = 93505495 binsize = 1

8000 10000 12000 14000 16000 18000 20000 22000 24000

Time(s) +1.8525e8

400

500

600

700

800

900

Counts/s

Entries = 3459369 binsize = 1

Figure 5.3: The top panel is the light curve of event file after hepical and the bottom panel is thelight curve after hescreen.

26

Insight-HXMT

5.4 Extracting High Level Products

5.4.1 hespecgen

This task is used to extract spectra of HE telescope.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• deadfile [file name]Name of the input 1-L Dead time FITS file.

• userdetid [string]Detector ID (0-17) Selection (ID List), such ”0-17; 0 1 2 3; 4,5,6,7; 8-10,11”

• eventtype [int]Type of Event:0:ALL; 1:X-ray; 2:Calibration Source (DEFAULT = 1).

• starttime [real]Starting time for summation (DEFAULT = 0.).

• stoptime [real]Ending time for summation (DEFAULT = 0.).

• minPI [int]Minimum PI to consider.

• maxPI [int]Maximum PI to consider.

• clobber [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists(DEFAULT=’yes’).

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=’yes’).

• chatter [integer]Chatter Level (min=0, max=5)(DEFAULT=2).

USAGE

- General usage

hespecgen evtfile=he_screen.FITS

deadfile=HXMT_P010129300302_HE-DTime_FFFFFF_V1_L1P.FITS

outfile=spec userdetid="0-15,17"

27

Insight-HXMT

5.4.2 helcgen

This task is used to extract light curve of HE telescope.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• deadfile [file name]Name of the input Dead time FITS file.

• binsize [real]Time Bin Size.

• userdetid [string]Detector ID (0-17) Selection (ID List), such ”0-15,17”.

• eventtype [int]Type of Event:0:ALL; 1:X-ray; 2:Calibration Source (DEFAULT = 1).

• starttime [real]Starting time for summation (DEFAULT = 0.)

• stoptime [real]Ending time for summation (DEFAULT = 0.)

• minPI [int]Minimum PI to consider.

• maxPI [int]Maximum PI to consider.

• deadcorr [bool]Correct light curve used dead time (yes/no) (DEFAULT = no).

• aligncorr [bool]Correct light curve used time-dependent PSF(alignment) correction, at the same time, usersshould set ’attfile’.

• attfile[file name]Name of the input 1-L Attitude FITS file (psf correction, set aligncorr=yes).

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

28

Insight-HXMT

USAGE

- General usage

helcgen evtfile=he_screen.FITS

deadfile=HXMT_P010129300302_HE-DTime_FFFFFF_V1_L1P.FITS

outfile=spec userdetid="0-15,17" binsize=1 minPI=9 maxPI=59

• To get a better background estimation, the PI of light curve of non-blind detectors is sug-gested to be in the range from 9 to 59.

5.4.3 herspgen

This task is used to generate the response file of spectrum.

PARAMETER

The parameters of this task are listed below:

• phafile [file name]Name of the input PHA FITS file.

• outfile [file name]Name of the output RSP FITS file.

• attfile [file name]Name of the input 1-L Attitude FITS file.

• ra [real]Source RA (degrees), from 0 to 360o (DEFAULT = -1).

• dec[real]Source DEC (degrees), form −90 to 90o (DEFAULT = -91).

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

- General usage

herspgen phafile=spec_g0_0-17.pha

attfile=ACS/HXMT_P010129300302_Att_FFFFFF_V1_1RP.FITS

outfile=he_rsp.fits ra=-1 dec=-91

• If users set ra and dec to −1 and −91, respectively, the task will read their values fromkeywords of spectrum file.

• If users set ra and dec, the task will generate the response file for this direction.

29

Insight-HXMT

herspgen phafile=spec_g0_0-17.pha

attfile=ACS/HXMT_P010129300302_Att_FFFFFF_V1_1RP.FITS

outfile=he_rsp.fits ra=86.3 dec=22.0

• This version can not generate response file for blind detector.

5.4.4 hebkgmap

The HE background is generated by hebkgmap. The background light-curve and spectrum aregenerated for all non-blind detectors.

USAGE

To see the usage, you could run ”hebkgmap -h” or ”fhelp hebkgmap”. The format of using thehebkgmap command may look like this:

Method 1: hebkgmap lc/spec he_screen.FITS ehkfile.fits gtifile.fits deadtime.fits

cname/specname chmin chmax outnam_prefix

Method 2: Using interactive method in prompt.

Method 3: hebkgmap sflag=lc/spec evtfile=he_screen.FITS

ehkfile=ehkfile.fits gtifile=gtifile.fits dtname=deadtime.fits

srcdat=lcname/specname chmin=chmin chmax=chmax

outnam=outnam_prefix

Parameters input

• lc/spec: [char]lc for background light curve and spec for background spectrum

• hescreen.FITS (include all events of blind detector 16): [fits file]the event file that includes the events of blind detecters.

• ehkfile.fits: [fits file]the EHK file for the observation

• gtifile.fits: [fits file]the GTI file for HE

• deadtime.fits: [fits file]the Dead Time file for HE

• lcname/specname: [file name]the ASCII file, in which the name of the light curves or the spectra you want to analysisshould be written

• chmin: [int]minimum channel for light curves or spectra

• chmax: [int]maximum channel for light curves or spectra

• outnam prefix: [char]the output prefix for the light curves or spectra

30

Insight-HXMT

Example

Here we present the general case for creating background files of light curves and spectra.(1) Generate background spectraIf spectrum of HE has been generated, spec g0 0-17.pha, then saves this name to an ASCII file

named specname.txt. The content of ASCII file specname.txt look like this:

spec_g0_0-17.pha

You may perform the command

hebkgmap spec he_screen.FITS ehkfile.fits gtifile.fits deadtime.fits specname.txt

0 255 he_specbkg

(2) Generate background lightcurveIf lightcurve of HE has been generated and its name is he g0 0-17.lc, then write the name of

light curve file to an ASCII file named lcname.txt. The content of ASCII lcname.txt should be likethis:

he_g0_0-17.lc

The channel range selected for the lightcurve is 9 to 59(roughly refers to 28–100 keV). Now youmay perform the command

hebkgmap lc hescreen.FITS ehkfile.fits gtifile.fits deadtime.fits

lcname.txt 9 59 he_lcbkg

5.5 Special Processing

hxmtscreen is used to re-screen the screened event file and hespeccorr is used to correct exposuretime(see Figure 5.4).

5.5.1 hxmtscreen

For a combined events files, there are more than one detector and each detector has its owngood time intervals. But, sometimes, users want to extract spectra/light curves at same timeintervals for different detectors. This task is used to re-screen the screened event files and acommon GTIs will be given.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input screened Event FITS file.

• outfile [file name]Name of the output new screened Event FITS file.

• usergtifile [file name]Name of the input User GTI file (txt format).

• userdetid [string]Detector ID Selection (ID List).

• clobber [integer]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

31

Insight-HXMT

Event File Screening

‘hescreen’

Energy Spectra Extraction

‘hespecgen’

Screened Event File Rescreening

‘hxmtscreen’

Screened Event File Rescreened Event File

User GTI

Exposure Time correction

‘hespeccorr’

Energy SpectrumEnergy Spectrum

Spike Identification

‘hepical’

Spike Event File

Figure 5.4: hxmtscreen data reduction.

32

Insight-HXMT

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

- General usage

hxmtscreen evtfile=he_screen.FITS outfile=he_screen2.FITS

userdetid="0-17" usergtifile=NONE

• If users set usergtifile to NONE, this task will only consider the GTI extensions fromevtfile. The format of user GTI file(parameter of usergtifile) is a ASCII format file, andeach line includes a good time interval, such ast1 t2t3 t4

• This task can be used to re-screen the HE/ME/LE screened file.

5.5.2 hespeccorr

The spike events have influence on exposure time. hespeccorr is used to correct the exposure timeof the spectrum by removing time intervals of spike events.

The corrected exposure time is very small, so this task can be skipped.

PARAMETER

The parameters of this task are listed below:

• phafile [file name]Name of the input PHA FITS file.

• glitchfile [file name]Name of the input HE Glitch-Event FITS file.

• deadfile [file name]Name of the input Dead time FITS file.

• clobber [integer] If ’clobber’=yes and outfile=filename, the file with the same name will beoverwritten if it exists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

33

Insight-HXMT

USAGE

- General usage

hespeccorr phafile=he_g0_0.pha glitchfile=glitch.fits \

deadfile=HXMT_P010129300302_HE-DTime_FFFFFF_V1_L1P.FITS

This task will correct the exposure time of phafile.

• glitchfile is created by hepical!

• This task is used to estimate exposure time when hepical lowchan = 0 highchan = 255.

• After correction, the exposure time(P010130600202 − 20170828 − 01 − 01) is modified from3055.327 to 3054.969(s). So, this correction does not need to be done.

34

Chapter 6

ME Data Analysis

6.1 Introduction

The processing procedures include three major steps: calibration (stage 1), screening (stage 2)and extraction of high-level scientific products (stage 3). For stage 1, the EVT file is processed toproduce a calibrated EVT file; for stage 2, the calibrated EVT file is filtered by applying cleaningcriteria to produce a cleaned EVT file; for stage 3, the high-level scientific products are generated.

Fig. 6.1 shows the ME data reduction.

6.2 Calibration

6.2.1 mepical

This task is used to calculate PI values of ME event.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input 1-L event FITS file.

• tempfile [file name]Name of the input 1-L temperature FITS file.

• outfile [file name]Name of output event FITS file.

• gainfile [file name]Name of the input gain FITS file. If set to CALDB, use the file in the Calibration Database.

• seed [int]Input seed for random number generator

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

35

Insight-HXMT

Gai

n co

rrec

tio

n

‘m

ep

ica

l’

Even

t Fi

le S

cree

nin

g

‘m

escr

een’

En

erg

y S

pe

ctra

Ex

trac

tio

n

‘m

esp

ecge

n’

Ligh

t C

urve

s Ex

trac

tion

‘m

elc

gen’

Leve

l 1 F

ITS

File

s

GTI

Gen

erat

ion

‘m

egti

gen’

Bac

kgro

un

d G

ene

rati

on

‘m

ebkg

map

Res

po

nse

File

s Ex

trac

tio

n

‘m

ersp

gen’

Level 2 FITS Files

CA

LDB

Even

t Fi

le

GTI

File

Scre

ened

Ev

ent

File

Ligh

t C

urv

es

Res

pon

se

File

s

Ener

gy

Spe

ctra

Bac

kgro

un

d Fi

les

Gra

de a

nd

Dea

dti

me

Cal

cula

tio

n

‘m

egra

de’

Even

t Fi

le

meg

tico

rr

GTI

File

Figure 6.1: ME data reduction.

36

Insight-HXMT

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General Usagemepical evtfile=HXMT P010130600202 ME-Evt FFFFFF V1 1RP.FITStempfile=HXMT P010130600202 ME-TH FFFFFF V1 1RP.FITS outfile=me pi.FITS

6.2.2 megrade

This task is used to calculate grade values of ME calibrated event and calculate dead time of eachFPGA.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input calibrated event FITS file.

• outfile [file name]Name of output event FITS file.

• deadfile [file name]Name of output dead FITS file. If set to NONE, this file can’t be created.

• binsize [real]Time interval to create dead FITS file.

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General Usagemegrade evtfile=me pi.FITS outfile=me grade.FITS deadfile=dead.FITS

• If users want to get dead time less than 1 second, users can set the parameter of binsize ≤1 (such as 0.1).

• The binsize of this task should be less than the binsize of melcgen in order to get accuratedeadtime correction.

6.3 Screening

6.3.1 megtigen

This task is used to generate a FITS GTI file.

37

Insight-HXMT

PARAMETER

The parameters of this task are listed below:

• tempfile [file name]Name of the input 1-L Temperature FITS file.

• ehkfile [file name]Name of the input 1-L EHK FITS file.

• outfile [file name]Name of output event FITS file.

• rangefile [file name]Name of the input parameter configure FITS file. Always set to ’$HEADAS/refdata/merangefile.fits’.

• defaultexpr [string]EHK Selection Expression: YES to use parameter ’merangefile’/ NO for user setting/ NONEto use parameter ’expr’ and only create a GTI (for EHK) extension.

• ELV [real]Pointing direction above Earth(>?deg) or < 0 for default.

• DYE ELV [real]Pointing direction above bright Earth(>?deg) or < 0 for default.

• SAA FLAG [bool]Exclude the data in SAA.

• T SAA [real]Time since SAA passage(>?s) or < 0 for default.

• TN SAA [real]Time to next SAA passage(>?s) or< 0 for default.

• COR [real]Min Cut-off Rigidity value(>?GeV ) or < 0 for default.

• MOON ANGLE[real]The Moon Angle is bigger than(>?deg) or < 0 for default.

• SUN ANGLE [real]The Sun Angle is bigger than(>?deg) or < 0 for default.

• ANG DIST [real]The offset angle from the pointing direction <?deg or <= 0 for default.

• expr [string]Selection Expression for EHK file (DEFAULT=NONE), if defaultexpr=NONE, expr mustbe set.

• prefr [real]Pre-Time Interval factor [0,1].

• postfr [real]Post-Time Interval factor [0,1].

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

38

Insight-HXMT

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General Usagemegtigen defaultexpr=’NONE’ expr=”ELV > 10&&COR > 8&&SAA FLAG == 0&&ANG DIST < 0.04&&T SAA > 300&&TN SAA > 300”tempfile=HXMT P010130600202 ME-TH FFFFFF V1 1RP.FITSehkfile=HXMT P010130600202 EHK FFFFFF V1 1RP.FITS outfile=me gti.FITS

• History keywords in GTI file (GTIDesc extension)Users can ignore these keywords such as ’HISTORY P8 ELV=5’, when the parameter defaultexpr =′

NONE′, and users only concern the expr keyword for event selection.

6.3.2 megticorr

megticorr is an auxiliary software to select GTI of ME according to the GTI file generated bymegtigen and a new GTI file is . While megticorr could also be used to select the good pixels ofME and generate a good pixel file, which will be used in mescreen and mebkgmap.

USAGE

(1) GTI update

megticorr evtfile oldgtiname newgtiname

• ’evtfile’ is the event file name generated by megrade;

• ’oldgtiname’ is the GTI name generated by megtigen

• ’newgtiname’ is the out file name for the updated GTI.

(2) GTI update and pixel selection

megticorr megradename oldgtiname newgtiname $HEADAS/refdata/medetectorstatus.fits newmede-tectorstatus.fits

• ’evtfile’ is the event file name generated by megrade;

• ’oldgtiname’ is the GTI name generated by megtigen;

• ’newgtiname’ is the out file name for the updated GTI.

• ’$HEADAS/refdata/medetectorstatus.fits’ is the file name of old pixel status of ME.

• ’newmedetectorstatus.fits’ is output file name for the updated pixel status.

6.3.3 mescreen

Use GTI together with other criteria to screen the ME data.

39

Insight-HXMT

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the calibrated event FITS file.

• outfile [file name]Name of output screened event FITS file.

• gtifile [file name]Name of the input gti FITS file.

• baddetfile [file name]Name of the input bad detector configure file. Always set to ’$HEADAS/refdata/medetectorstatus.fits’.

• userdetid [string]Detector ID (0-53) Selection (ID List).

• starttime [real]Starting time for summation (DEFAULT = 0.).

• stoptime [real]Ending time for summation (DEFAULT = 0.).

• minPI [int]Minimum PI to consider.

• maxPI [int]Maximum PI to consider.

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General Usagemescreen evtfile=me grade.fits gtifile=me gti.fits outfile=me screen.fits userdetid=”0-53” baddetfile=newmedetectorstatus.fits

• the bad detectors will be removed this task. In the old version, the default file of bad detectorfile is $HEADAS/refdata/medetectorstatus.fits. But in this version, the bad detector fileshould originated from megti module.

• Currently, the blind FOV detectors must be included in this stage and these detectors willbe used by background modules.

40

Insight-HXMT

6.4 Extraction of high-level products

6.4.1 mespecgen

This task is used to extract spectra from the screened event file.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• deadfile [file name]Name of the input Dead time FITS file(created in megrade task).

• userdetid [string]Detector ID (0-53) Selection (ID List), such ”0-53”

• starttime [real]Starting time for summation (DEFAULT = 0.)

• stoptime [real]Ending time for summation (DEFAULT = 0.)

• minPI [int]Minimum PI to consider

• maxPI [int]Maximum PI to consider

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General Usagemespecgen evtfile=me screen.fits deadfile=dead.fits userdetid=”0 1 2 3 4 5 6 7 11 12 1314 15 16 17 18 19 20 21 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 4950 51 52 53;10 28 46” outfile=pha

• Currently, only small FOV detectors can be used to generate spectra. The detector ID listfor small FOV is: 0 1 2 3 4 5 6 7 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 29 30 31 3233 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53.

41

Insight-HXMT

6.4.2 melcgen

This task is used to extract light curves from screened event files.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• deadfile [file name]Name of the input Dead time FITS file.

• binsize [real]Time Bin Size.

• userdetid [string]Detector ID (0-53) Selection (ID List), such ”0-17; 0 1 2 3; 4,5,6,7; 8-10,11”

• starttime [real]Starting time for summation (DEFAULT = 0.)

• stoptime [real]Ending time for summation (DEFAULT = 0.)

• minPI [int]Minimum PI to consider

• maxPI [int]Maximum PI to consider

• deadcorr [bool]Correct light curve used dead time (yes/no) (DEFAULT = no).

• aligncorr [bool]Correct light curve used time-dependent PSF(alignment) correction, at the same time, usersshould set ’attfile’

• attfile[file name]Name of the input 1-L Attitude FITS file (psf correction, set aligncorr=yes)

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

42

Insight-HXMT

USAGE

• General Usagemelcgen evtfile=me screen.fits deadfile=dead.fitsuserdetid=”0 1 2 3 4 5 6 7 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 29 30 31 32 33 3435 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53” outfile=lg binsize=1

• In order to get accurate background, only small FOV detectors can be used to generate lightcurves. The detector ID list for small FOV is: 0 1 2 3 4 5 6 7 11 12 13 14 15 16 17 18 19 2021 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53.

6.4.3 merspgen

This task is used to generate the response file of spectrum.

PARAMETER

The parameters of this task are listed below:

• phafile [file name]Name of the input PHA FITS file.

• outfile [file name]Name of the output RSP FITS file.

• attfile [file name]Name of the input 1-L Attitude FITS file.

• ra [real]Source RA (degrees), from 0 to 360o.

• dec[real]Source DEC (degrees), form −90 to 90o.

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

- General usagemerspgen phafile = spec g0 0.fits attfile = ACS/HXMT P010129300302 Att FFFFFF V 1 1RP.FITSoutfile = le rsp.fits ra = −1 dec = −91

• If users set ra and dec to −1 and −91, respectively, the task will read their values from thekeywords of spectrum file.

43

Insight-HXMT

6.4.4 mebkgmap

The background of ME for small FOV is generated by mebkgmap. The background spectrum andlight curve are generated from the screened event file, which is generated by mescreen and includesall events of blind detectors.

USAGE

Like hebkgmap, you can execute ”mebkgmap -h” for help. The format looks like this:

Method 1: mebkgmap lc/spec screen.FITS ehkfile.fits gtifile.fits deadtime.fits

tempname lcname/specname chmin chmax outnam_prefix baddetfile

Method 2: Using interactive method in prompt.

Method 3: mebkgmap sflag=lc/spec evtfile=screen.FITS ehkfile=ehkfile.fits

gtifile=gtifile.fits dtname=deadtime.fits tempname=tempname

srcdat=lcname/specname chmin=chmin chmax=chmax outnam=outnam_prefix

baddetfile=baddetfile

Parameters input:

• lc/spec: [char]lc for background light curve and spec for background spectrum

• mescreen.FITS(include all events of blind detectors 10, 28, 46): [fits file]the event file that includes the events for blind detecters.

• ehkfile.fits: [fits file]the EHK file for the observation

• gtifile.fits: [fits file]the GTI file for ME

• deadtime.fits: [fits file]the Dead Time file for ME

• tempfile.fits: [fits file]the temperature file for ME

• lcname/specname: [file name]the ASCII file, in which the name of the light curves or the spectra you want to analysisshould be written

• chmin: [int]minimum channel for light curves or spectra

• chmax: [int]maximum channel for light curves or spectra

• outnam prefix: [char]the output prefix for light curves or spectra

• baddetfile: [char]the file name of ME detector status including the information of bad pixels

44

Insight-HXMT

Example

Here we present the general case for creating background files of light curves and spectra.(1) Generate background spectrumIf small FOV spectrum of ME has been generated and its name mespec.pha, then save these

names to specname.txt. The content of ASCII file specname.txt should be like this:

mespec.pha

Now you can execute the command

mebkgmap spec mescreen.FITS ehkfile.fits gtifile.fits deadtime.fits tempfile.fits

specname.txt 0 1023 me_specbkg

If the file including bad pixel information generated by megti is ’newdet.fits’ , the backgroundspectrum could be generated by

mebkgmap spec mescreen.FITS ehkfile.fits gtifile.fits deadtime.fits tempfile.fits

specname.txt 0 1023 me_specbkg newdet.fits

(2) Generate background lightcurveIf lightcurve of ME has been generated and its name is me.lc. Save this name to lccname.txt.

The channel range for the lightcurve is 119 to 290(roughly refers to 10–20 keV).

mebkgmap lc mescreen.FITS ehkfile.fits gtifile.fits deadtime.fits tempfile.fits

lcname.txt 119 290 me_lcbkg

If the file including bad pixel information generated by megti is ’newdet.fits’, the backgroundlight curve could be generated by

mebkgmap lc mescreen.FITS ehkfile.fits gtifile.fits deadtime.fits tempfile.fits

lcname.txt 119 290 me_lcbkg newdet.fits

45

Chapter 7

LE Data Analysis

7.1 Introduction

The LE processing procedures include three major steps: calibration (stage 1), screening (stage 2)and extraction of high-level scientific products (stage 3). 7.1 shows the LE data reduction.

7.2 Calibration

7.2.1 lepical

This task is used to calculate PI values of LE event files and remove pedestal noise (which arecalculated from forced trigger event) for each event.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input 1-L event FITS file.

• outfile [file name]Name of output event FITS file.

• tempfile [file name]Name of the input 1-L temperature FITS file.

• gainfile [file name]Name of the input gain FITS file. If set to CALDB, use the file in the Calibration Database.

• maxtimedel [real]Accumulate time interval (s) for calculation noise.

• clobber [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists (DEFAULT=yes).

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• chatter [integer]Chatter Level (min=0, max=5)(DEFAULT=2). It is used to control the output message.

46

Insight-HXMT

Gai

n co

rrec

tio

n

‘le

pic

al’

Even

t Fi

le S

cree

nin

g

‘le

scre

en’

En

erg

y S

pe

ctra

Ex

trac

tio

n

‘le

spec

gen’

Ligh

t C

urve

s Ex

trac

tion

‘le

lcg

en’

Leve

l 1 F

ITS

File

s

GTI

Gen

erat

ion

‘le

gtig

en’

Bac

kgro

un

d G

ene

rati

on

‘le

bkg

map

Res

po

nse

File

s Ex

trac

tio

n

‘le

rsp

gen’

Level 2 FITS Files

CA

LDB

Even

t Fi

le

GTI

File

Scre

ened

Ev

ent

File

Ligh

t C

urv

es

Res

pon

se

File

s

Ener

gy

Spe

ctra

Bac

kgro

un

d Fi

les

Even

t R

eco

nst

ruct

ion

‘le

reco

n’

Even

t Fi

le

legt

icor

r

GTI

File

Figure 7.1: LE data reduction.

47

Insight-HXMTP

ed

est

al

Peak

(C

han

nel)

40

60

80

100

120

140

Time(s)0 2000 4000 6000 8000 10000 12000 14000

C)

oT

em

era

ture

(

­56

­55

­54

­53

­52

­51

­50

­49

­48

­47

­46

Figure 7.2: The peak of pedestal events of CCD 0 vs its temperature .

USAGE

- General usagelepical evtfile=HXMT P010129900101 LE-Evt FFFFFF V1 L1P.FITStempfile=HXMT P010129900101 LE-TH FFFFFF V1 L1P.FITS outfile=le pi.FITS

- If users want to see the pedestal events, users can set pedestalfile not to NONE.hepical pedestalfile=le pedestal.FITSThe output file includes columns of ”Time”, ”Peak” and ”Width”, which describe the time,peak (96 columns) and width (96 columns) of the pedestal events, respectively.Figure. 7.2 and 7.3 show the peak and width of pedestal events of CCD 0 vs its temperature.The peak and width always are constant with the small change of temperature (from −50o to−55o). But after 20180615, the CCD temperature control has some problem (still in normalworking range), the peak and width vary greatly with the change of temperature (Fig. 7.4and Fig. 7.5, P011466107804). Luckily, this problem only has influence on pedestal noise andthe lepical can meet the requirement of large peak/width range of pedestal events.

7.2.2 lerecon

This task is used to reconstruct two split events, and assign grade.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input 1-L event FITS file.

• outfile [file name]Name of output event FITS file.

• instatusfile[file name]Name of the input 1-L detector status FITS file.

48

Insight-HXMTP

edest

al

Wid

th (

Channel)

2

3

4

5

6

7

8

9

10

Time(s)0 2000 4000 6000 8000 10000 12000 14000

C)

oT

em

era

ture

(

­56

­55

­54

­53

­52

­51

­50

­49

­48

­47

­46

Figure 7.3: The width of pedestal events of CCD 0 vs its temperature.

Pedest

al

Peak (

Channel)

160

180

200

220

240

Time(s)0 1000 2000 3000 4000 5000 6000 7000 8000 9000

C)

oT

em

era

ture

(

­50

­49

­48

­47

­46

­45

­44

­43

­42

­41

­40

Figure 7.4: The peak of pedestal events of CCD 0 vs its temperature (after 20180615) .

49

Insight-HXMTP

edest

al

Wid

th (

Channel)

8

9

10

11

12

13

14

15

16

Time(s)0 1000 2000 3000 4000 5000 6000 7000 8000 9000

C)

oT

em

era

ture

(

­50

­49

­48

­47

­46

­45

­44

­43

­42

­41

­40

Figure 7.5: The width of pedestal events of CCD 0 vs its temperature (after 20180615).

• hzscale [interger]A scale to calculate split events, e.g. two events with time interval less than 10us×hzscalewill be reconstructed to one event(two-split event)(DEFAULT=1).

• clobber [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists(DEFAULT=yes).

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• chatter [integer]Chatter Level (min=0, max=5)(DEFAULT=2).

USAGE

- General usagelerecon evtfile=le pi.FITS instatusfile=HXMT P010129900101 LE-InsStat FFFFFF V1 L1P.FITSoutfile=le recon.FITSThere are three grades: 0 means normal events (single events), 1 means split events (two splitevents) and 2 means more split events (> 2). Figure. 7.6 shows the raw events light curve(binsize = 0.1s) and the light curves for GRADE = 0, 1, 2, respectively. The light curve ofraw events has some spikes which is due to continuous split events. Figure. 7.7 shows theratio of two-split/more-split events of small CCDs of board 0 to covered CCDs of board 0.The more-split events number is linear with particle background.

50

Insight-HXMTC

ounts

/0.1

s

0

20

40

60

80

100

120

0 2000 4000 6000 8000 10000 12000 14000

Counts

/0.1

s

0

5

10

15

20

25

30

0 2000 4000 6000 8000 10000 12000 14000

Counts

/0.1

s

0

1

2

3

4

5

6

7

8

9

10

Time(s)0 2000 4000 6000 8000 10000 12000 14000

Co

unts

/0.1

s

0

1

2

3

4

5

6

7

8

9

10

Figure 7.6: The reconstructed events for CCD 0: raw light curve, single events light curve(GRADE = 0), split events light curve (GRADE = 1) and more split events light curve(GRADE = 2).

rati

o o

f 2­s

pli

t/co

rved

0

2

4

6

8

10

12

Time(s)0 2000 4000 6000 8000 10000 12000 14000

rati

o o

f m

ore

­sp

lit/

corv

ed

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Figure 7.7: The ratio of two-split/more-split events(binsize = 100s) of small CCDs to coveredCCDs for board 0.

51

Insight-HXMTC

ounts

/0.1

s

0

20

40

60

80

100

120

0 2000 4000 6000 8000 10000 12000 14000

Counts

/0.1

s

0

5

10

15

20

25

30

0 2000 4000 6000 8000 10000 12000 14000

Counts

/0.1

s

0

1

2

3

4

5

6

7

8

9

10

Time(s)0 2000 4000 6000 8000 10000 12000 14000

Counts

/0.1

s

0

1

2

3

4

5

6

7

8

9

10

Figure 7.8: The reconstructed events for CCD 0 when hzscal is set to 5: raw light curve, singleevents light curve (GRADE = 0), split events light curve (GRADE = 1) and more split eventslight curve (GRADE = 2).

• the hzrescal parameterThe light curve of two-split events (shown in Fig. 7.6) has some spikes which maybe due tomore-split event has event missing (pixel energy deposit below threshold). In order to reducetheir cases, users can enlarge hzrecal. Figure. 7.8 shows the reconstructed events for CCD0 when hzscale = 5 is set to 5. The spike number is significantly decreased and the numberof single events is reduced by 1.3%.

CasA is used to check the two-split event and Figure. 7.9 shows the energy spectra of singleevents, no reconstructed two split events, and the reconstructed two-split events.

7.3 Screening

7.3.1 legtigen

This task is used to generate a FITS GTI file.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input 1-L event FITS file.

• instatusfile[file name]Name of the input 1-L detector status FITS file.

52

Insight-HXMTC

ou

nts

/Ch

an

nel

50

100

150

200

250

300

350

400

450

0 200 400 600 800 1000 1200 1400

Co

un

ts/C

han

nel

50

100

150

200

250

300

350

Channel

0 200 400 600 800 1000 1200 1400

Co

un

ts/C

han

nel

10

20

30

40

50

60

70

Figure 7.9: The energy spectra of single events (GRADE = 0), no reconstructed two split events,and the reconstructed two-split events (GRADE = 2).

• tempfile [file name]Name of the input 1-L Temperature FITS file.

• ehkfile [file name]Name of the input 1-L ehk FITS file.

• outfile [file name]Name of output event FITS file.

• rangefile [file name]Name of the input parameter configure FITS file. Always set to ’$HEADAS/refdata/lerangefile.fits’.

• defaultexpr [string]EHK Selection Expression: YES to use parameter ’lerangefile’/ NO for user setting/ NONEto use parameter ’expr’ and only create a GTI extension.

• ELV [real]Pointing direction above Earth(>?deg) or < 0 for default.

• DYE ELV [real]Pointing direction above bright Earth(>?deg) or < 0 for default.

• SAA FLAG [bool]Exclude the data in SAA.

• T SAA [real]Time since SAA passage(>?s) or < 0 for default.

• TN SAA [real]Time to next SAA passage(>?s) or < 0 for default.

• COR [real]Min Cut-off Rigidity value(>?GeV ) or < 0 for default.

53

Insight-HXMT

• MOON ANGLE[real]The Moon Angle is bigger than(>?deg) or < 0 for default.

• SUN ANGLE [real]The Sun Angle is bigger than(>?deg) or< 0 for default.

• ANG DIST [real]The offset angle from the pointing direction(<?deg) or <= 0 for default.

• expr [string]Selection Expression for EHK file (DEFAULT=NONE), if defaultexpr=NONE, expr mustbe set.

• prefr [real]Pre-Time Interval factor [0,1].

• postfr [real]Post-Time Interval factor [0,1].

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General usagelegtigen defaultexpr=NONEexpr=ELV > 10&&DY E ELV > 30&&COR > 8&&ANG DIST < 0.04&&SAA FLAG ==0&&T SAA > 300&&TN SAA > 300evtfile=NONE instatusfile=HXMT P010130600202 LE−InsStat FFFFFF V 1 1RP.FITStempfile=HXMT P010130600202 LE − TH FFFFFF V 1 1RP.FITSehkfile=../AUX/HXMT P010130600202 EHK FFFFFF V 1 1RP.FITS outfile=le gti.fits

• parameter of evtfileIf this parameter is not set to NONE (or is set to a wrong file), the trigger event rate willbe considered to calculate the good time intervals. But in 1L data, the time of data overflowhas been abandoned.

• Now, we recommend users set the defaultexpr to NONE and use expr as selection expressionof GTIs.

• Since the legti module can modify the output of this task, the evtfile can be set to NONE.

7.3.2 legticorr

legti is an auxiliary software to select GTI of LE according to the GTI file generated by legtigen.

54

Insight-HXMT

USAGE

legticorr evtfile oldgtiname newgtiname

• ’evtfile’ is the event file name generated by lerecon.

• ’oldgtiname’ is the GTI name generated by legtigen.

• ’newgtiname’ is the out file name for the updated GTI.

7.3.3 lescreen

Use GTI together with other criteria to screen the LE data.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the calibrated event FITS file.

• outfile [file name]Name of output screened event FITS file.

• gtifile [file name]Name of the input gti FITS file.

• baddetfile [file name]Name of the input bad detector configure file. Always set to ’$HEADAS/refdata/ledetectorstatus.fits’.

• userdetid [string]Detector ID (0-95) Selection (ID List).

• eventtype [int]Type of Event:0:ALL; 1:Single Event; 2:Two-split Event

• starttime [real]Starting time for summation (DEFAULT = 0.).

• stoptime [real]Ending time for summation (DEFAULT = 0.).

• minPI [int]Minimum PI to consider.

• maxPI [int]Maximum PI to consider.

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

55

Insight-HXMT

USAGE

• General usage

lescreen evtfile = le recon.fits gtifile = le gti.fits userdetid=0−95 eventtype=1 outfile=le screen.fits

• In order to get accurate background, only small FOV detectors are used to do analysis. Thedetector ID list for small FOV is: 0 2-4 6-10 12 14 20 22-26 28-30 32 34-36 38-42 44 46 5254-58 60-62 64 66-68 70-74 76 78 84 86-90 92-94.

• Currently, the blind FOV detectors must be included in this stage and these detectors willbe used by background modules. The blind FOV detector ID list is:13,45,77.

• So, the parameter of userdetid should be set to 0 2-4 6-10 12 14 20 22-26 28 30 32 34-3638-42 44 46 52 54-58 60-62 64 66-68 70-74 76 78 84 86 88-90 92-94; 13,45,77.

• The GTI file is better originated from legti module.

7.4 High level products extraction

7.4.1 lespecgen

This task is used to extract spectra.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• userdetid [string]Detector ID (0-95) Selection (ID List), such ”0-31; 0 1 2 3; 4,5,6,7; 8-10,11”

• eventtype [int]Type of Event:0:ALL; 1:Single Event; 2:Two-Split Event

• starttime [real]Starting time for summation (DEFAULT = 0.)

• stoptime [real]Ending time for summation (DEFAULT = 0.)

• minPI [int]Minimum PI to consider

• maxPI [int]Maximum PI to consider

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

56

Insight-HXMT

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General usagelespecgen evtfile=le screen.fits userdetid=”0 2-4 6-10 12 14 20 22-26 28-30 32 34-36 38-4244 46 52 54-58 60-62 64 66-68 70-74 76 78 84 86-90 92-94;13 45 77” outfile=pha eventtype=1

• To get a accurate background, we recommend users use the detector list ”0 2-4 6-10 12 1420 22-26 28 30 32 34-36 38-42 44 46 52 54-58 60-62 64 66-68 70-74 76 78 84 86 88-90 92-94”and single event.

7.4.2 lelcgen

This task is used to extract light curves.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the screened event FITS file.

• outfile [file name]Name of the output prefix to PHA FITS file.

• binsize [real]Time Bin Size.

• userdetid [string]Detector ID (0-95) Selection (ID List), such as ”0-95; 0 1 2 3; 4,5,6,7; 8-10,11”

• eventtype [int]Type of Event:0:ALL; 1:Single Event; 2:Two-Split Event

• starttime [real]Starting time for summation (DEFAULT = 0.)

• stoptime [real]Ending time for summation (DEFAULT = 0.)

• minPI [int]Minimum PI to consider

• maxPI [int]Maximum PI to consider

• aligncorr [bool]Correct light curve used time-dependent PSF(alignment) correction, at the same time, usersshould set ’attfile’

• attfile[file name]Name of the input 1-L Attitude FITS file (psf correction, set aligncorr=yes)

57

Insight-HXMT

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

USAGE

• General usagelelcgen evtfile=le screen.fits outfile=lg binsize=1 userdetid=0 − 95

• In order to get accurate background, only small FOV detectors can be used to generate lightcurves. The detector ID list for small FOV is: 0 2-4 6-10 12 14 20 22-26 28 30 32 34-36 38-4244 46 52 54-58 60-62 64 66-68 70-74 76 78 84 86 88-90 92-94.

7.4.3 lerspgen

This task is used to generate the response file of spectrum.

PARAMETER

The parameters of this task are listed below:

• phafile [file name]Name of the input PHA FITS file.

• outfile [file name]Name of the output RSP FITS file.

• attfile [file name]Name of the input 1-L Attitude FITS file.

• tempfile[file name]Name of the input 1-L Temperature FITS file.

• ra [real]Source RA (degrees), from 0 to 360o.

• dec[real]Source DEC (degrees), form −90 to 90o.

• (clobber=no) [boolean]If ’clobber’=yes and outfile=filename, the file with the same name will be overwritten if itexists.

• (history=yes) [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words.

• (chatter = 2) [integer]Chatter Level (min=0, max=5)

58

Insight-HXMT

USAGE

- General usagelerspgen phafile = spec g0 0.fits temp=HXMT P010130600202 LE−TH FFFFFF V 1 1RP.FITSattfile = ACS/HXMT P010129300302 Att FFFFFF V 1 1RP.FITS outfile = le rsp.fitsra = −1 dec = −91

• If users set ra and dec to −1 and −91, respectively, the task will read their real values fromspectrum file.

7.4.4 lebkgmap

The background of LE for small FOV is generated by lebkgmap. The background spectrum andlight curve are generated from screened event file, which is generated by lescreen and includes allevents of blind detectors.

Uasge

Run ”lebkgmap -h” for help. The format of using lebkgmap is:

Method 1: lebkgmap lc/spec screen.fits gtifile.fits lcname/specname chmin chmax outnam_prefix

Method 2: Using interactive method in prompt.

Method 3: lebkgmap sflag=lc/spec evtfile=screen.FITS gtifile=gtifile.fits

srcdat=lcname/specname chmin=chmin chmax=chmax outnam=outnam_prefix

Parameters input

• lc/spec: [char]lc for background light curve and spec for background spectrum

• lescreen.FITS (include all events of blind detectors 13,21,45,53,77,85): [fits file]event file that includes the events for ALL blind detecters.

• gtifile.fits: [fits file]the GTI file for LE

• lcname/specname: [file name]the ASCII file, in which the name of the light curves or the spectra you want to analysisshould be written

• chmin: [int]minimum channel for light curves or spectra

• chmax: [int]maximum channel for light curves or spectra

• outnam prefix: [char]the output prefix for light curves or spectra

Example

(1) Generate background spectrumIf small FOV spectrum of LE has been generated and its name lespec.pha, then save its name tospecname.txt. Run the command:

lebkgmap spec lescreen.FITS gtifile.fits specname.txt 0 1535 le_specbkg

59

Insight-HXMT

(2) Generate background light curveIf lightcurve of LE has been generated and its name is le.lc, save its name to lcname.txt. The

channel range for the lightcurve is 106 to 1069 (roughly refers to 1.0–10 keV). Run the command:

lebkgmap lc lescreen.FITS gtifile.fits lcname.txt 106 1069 lebkg

60

Chapter 8

Barycentric correction tools andother tools

8.1 HXMT hxbary

Changing the arrival time of a photon from TT (Terrestrial Time) to TDB (Barycentric DynamicTime).The arrival times of photons are corrected to the solar system barycentric center, considering thetime delay due to the movement of the spacecraft and the earth, the proper motion of the object,and the relativistic effects (Einstein delay, shapiro delay). After barycentering, a new columnnamed ”TDB” is added in the last column of the extension, in MET seconds to the referenceepoch. Thus, to compute the MJD time from barycentered files, referred to the TDB system, oneshould use one of the following formulae,MJD(TDB) = (MJDREFI+MJDREFF)+(TDBTIME+TIMEZERO)/86400.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input event FITS file.

• orbitfile [file name]Name of the orbit FITS file

• ra [real]Right ascension of the object (in degrees)

• dec [real]Declination of the object (in degrees)

• eph [int]the choice of the ephemeris, 1 for DE200 and 2 for DE405

• tdbtdtfile [string]the path of the TDB correction file (DEFAULT=$HEADAS/refdata/TDB.1950.2050) Fair-head L. Bretagnon P., 1990, A&A 229,240

61

Insight-HXMT

• iftephfilethe path of the IF TDB correction file (DEFAULT=$HEADAS/refdata/TIMEEPH short.te405)Irwin A. W., Fukushima T., 1999, A&A, 348, 642

• eph200filethe path of the DE200 ephemeris file (DEFAULT=$HEADAS/refdata/DE200.1950.2050)

• eph405filethe path of the DE405 ephemeris file (DEFAULT=$HEADAS/refdata/DE405.1950.2050)

• history [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• chatter [int] Chatter level

USAGE

hxbary evtfile=PATH/to/event.fits orbitfile=PATH/to/orbit.fits \

ra=86.2 dec=22.01 eph=2

8.2 HXMT hxbary2

Changing the arrival time of a photon from TT (Terrestrial Time) to TDB (Barycentric DynamicTime). It is quite similar with hxbary, while the extension number and the column number canbe specified to do SSB corrections.

PARAMETER

The parameters of this task are listed below:

• evtfile [file name]Name of the input event FITS file.

• exten num [int]The extension to be corrected.

• exten col [int]The column number in the extension to be corrected.

• orbitfile [file name]Name of the orbit FITS file

• ra [real]Right ascension of the object (in degrees)

• dec [real]Declination of the object (in degrees)

• eph [int]the choice of the ephemeris, 1 for DE200 and 2 for DE405

• tdbtdtfile [string]the path of the TDB correction file (DEFAULT=$HEADAS/refdata/TDB.1950.2050)

• iftephfilethe path of the IF TDB correction file (DEFAULT=$HEADAS/refdata/TIMEEPH short.te405)

62

Insight-HXMT

• eph200filethe path of the DE200 ephemeris file (DEFAULT=$HEADAS/refdata/DE200.1950.2050)

• eph405filethe path of the DE405 ephemeris file (DEFAULT=$HEADAS/refdata/DE405.1950.2050)

• Clobber [boolean]If ¡¯clobber¡¯=yes and outfile=filename, the file with the same name will be overwritten ifit exists. exists(DEFAULT=yes).

• History [boolean]If ’history=yes’ the parameter values and other information are written in HISTORY key-words(DEFAULT=yes).

• Chatter [int]Chatter level

USAGE

hxbary evtfile=PATH/event.fits exten_num=1 exten_col=1 orbitfile=PATH/orbit.fits

ra=86.2 dec=22.01 eph=2

8.3 hobs info

Print some information for observations.

USAGE

Run ”hobs info -h” for help. The format of using hobs info is:

hobs_info data_path

Example:

hobs_info ./P0101299/

8.4 hprint detid

Print the information of detectors of Insight-HXMT.

USAGE

hprint_detid

8.5 hgti create

Create GTI file for Insight-HXMT with the same information as the GTI sample.

63

Insight-HXMT

USAGE

hgti_create GTI_sample.fits gti.txt out.fits

’GTI sample.fits’ is GTI file name, which could be generated by legtigen/megtigen/hegtigen.’gti.txt’ is input file name, which includes two columns START and STOP time. ’out.fits’ is theout file name.

Example:

hgti_create LE_oldgti.fits gti.txt out.fits

hgti_create ME_oldgti.fits gti.txt out.fits

hgti_create HE_oldgti.fits gti.txt out.fits

8.6 hpipeline

The ’hpipeline’ generate a shell script contains all the modules of the Insight-HXMT Data Anal-ysis Software (HXMTDAS) to produce cleaned, calibrated Events data, and Hight Level dataproduction (Spectra, Lightcurves).

USAGE

hpipeline -i /DATA_PATH/ExpID/ -o /OUTPUT_PATH/ -b bash-script-name.sh

PARAMETERS

-i, --input=/DATA_PATH/ExpID/

Input archieved data directory. The directory is named by

Exposure ID (P010129900101-20170727 for example).

-I [optional], --inputlist=INPUTLIST.txt

A text file that records multiple input dir, each dir takes one

line

-o, --output=outdir

Out put directory to save all the production

-O [optional], --outputlist=OUTPUTLIST.txt

A text file that records multiple output dir, each dir takes one

line

-b, --bash=bash-script-file.sh

The pipeline does not directly call the modules, it save all the

commands and corresponding parameters to a script file. Use -b

parameter to name this script file

OPTIONALS

--hxbary [optional]

A flag determine wheter to carry out Barycentric correction (add

new column named TDB to file)

--hxbary2 [optional]

A flag determine wheter to carry out Barycentric correction

64

Insight-HXMT

(modify the column Time instead of adding new column named TDB

to file)

-r, --ra=RA

right ascension of barycentering correction (unit: degree)

-d, --dec=DEC

declination of barycentering correction (unit: degree)

-v, --version=VERSION

The pipeline is compatible with HXMTsoft version 2.04 and

previous version (v2.02, v2.02). The default version is 2.04.

Since there are few usage differences between version 2.04 and

version 2.02, specify the version number if you want to use

HXMTsoft v2.02 (version 2.04 is better and recommended)

--LE_LC_EMIN=energy

lower limits for LE lightcurve (unit: keV). Effective LE energy

range is 1--10 keV

--LE_LC_EMAX=energy

upper limits for LE lightcurve (unit: keV). Effective LE energy

range is 1--10 keV

--LE_LC_BINSIZE=binsize

binsize of LE lightcurve (unit: second)

--ME_LC_EMIN=energy

lower limits for ME lightcurve (unit: keV). Effective ME energy

range is 10--35 keV

--ME_LC_EMAX=energy

upper limits for ME lightcurve (unit: keV). Effective ME energy

range is 10--35 keV

--ME_LC_BINSIZE=binsize

binsize of ME lightcurve (unit: second)

--HE_LC_EMIN=energy

lower limits for HE lightcurve (unti: keV). Effective HE energy

range is 27--250 keV

--HE_LC_EMAX=energy

upper limits for HE lightcurve (unti: keV). Effective HE energy

range is 27--250 keV

--HE_LC_BINSIZE=binsize

binsize of HE lightcurve (unit: second)

--HE_ONLY

only produce modules for HE instrument

65

Insight-HXMT

--ME_ONLY

only produce modules for ME instrument

--LE_ONLY

only produce modules for LE instrument (you can do --HE_ONLY and

--ME_ONLY at the same time)

-c, --clean

delete the events file generated in process, keep screen file

only (default keeps all)

-p, --parallel

setup environmental variables for parallel processing

EXAMPLES

This is a typical invocation:

hpipeline -i P0101029900101-20170727/ -o Crab_outdir/ -b Crab_pipeline.sh

This parses the folder of the input path, and generate Spectra and Lightcurves for Crab Nebula.Here is an more comprehensive example:

1. generate the Spectra and Lightcurves of the three telescopes

2. select the energy range and time bin for the Lightcurves

3. and finally carry out a bary-centeral correction on the photons

4. We also setup the environment variables for parallel processin (setup PFILES)

hpipeline -i P0101029900101-20170727/ -o Crab_outdir --hxbary -r 83.63322083 -d 22.014461

-b Crab_pipeline.sh --HE_LC_EMIN=27 --HE_LC_EMAX=200 --ME_LC_EMIN=10 --ME_LC_EMAX=35

--LE_LC_EMIN=1 --LE_LC_EMAX=10 --LE_LC_BINSIZE=0.1 --ME_LC_BINSIZE=1 --HE_LC_BINSIZE=5

--clean --parallel

66

Appendix A

Installation of the HXMTDAS

A.0.1 Download HXMTDAS source code

(1)Download HXMTDAS source code (new installation)Download HXMT SOURCE CODE

gunzip hxmtsoftv2.04.tar.gz

tar vxf hxmtsoftv2.04.tar

cd hxmtsoftv2.04

cd BUILD_DIR

./configure --prefix=DIR (DIR, install path)

make

make install

(2)If you have installed HXMTDAS on your computer.For example, your source code is located in /home/hxmtsoft directory.Source your HEADAS environment, eg, source install/x86 64-apple-darwin13.4.0/headas-init.shDownload the HXMTDAS SOURCE CODE, and then use commands below in sequence:

gunzip hxmtsoftv2.04.tar.gz

tar vxf hxmtsoftv2.04.tar

cd hxmtsoftv2.04

cp -r hxmt /home/hxmtsoft/

rm -r hxmt/BUILD_DIR

hmake

hmake install

(3)If you want to use the lastest HEAsoft, and install hxmt and HEAsoft at the same time.step 1:Download the HEAsoft from HEASARC.Please make sure the source code must have ’attitude’ and ’heacore’ componentsUse commands gunzip and tar to decompress the package.step 2:Download the HXMTDAS.

gunzip hxmtsoftv2.04.tar.gz

tar vxf hxmtsoftv2.04.tar

67

Insight-HXMT

step 3:copy the hxmt component from HEADAS package to HEAsoft package.step 4:Change the directory to HEAsoft/BUILD DIRopen the configure file and modify ’mpfit required=no’ to ’mpfit required=yes’

./configure --prefix=DIR (DIR, installation path) --with-components=hxmt (for example --with-components=heacore tcltk external attitude heasptools heatools heagen demo suzaku swift Xspec integral maxi nicer nustar hitomi xmm glast ftools GSSC heasim hxmt)

make

make install

A.0.2 Initialization and Setup

for tcsh:

setenv HEADAS DIR/PLATFORM

alias hxmtinit ’source \$HEADAS/headas-init.csh’

for bash:

export HEADAS=DIR/PLATFORM

alias hxmtinit=". $HEADAS/headas-init.sh"

In the examples above, (PLATFORM) is a placeholder for the platform- specific string denotingyour machine’s architecture, for example: i686-pc-linux-gnu-libc2.12.

68

Bibliography

69