bcmppha -- Converts a CGRO/BATSE TYPE II trigger file to a TYPE I pha file
bcmppha data_dir infile outfile filemode chan_start chan_stop list_lc
plot_lc device ns1 ns2 (nb1 nb2 nb3 nb4)
The BCMPPHA program makes source and background Type I PHA files, which can be used with the XSPEC package for gamma-ray burst data analysis, from BATSE Type II PHA files for trigger data. A BATSE Type II PHA trigger file can be obtained from the BFITS file using the FTOOLS: "FBBFT2PHA". A TYPE II pha file contains one extension with one or more spectra stored as rows. A TYPE I pha file contains only one spectrum in an extension. This task has two file modes, Source, and Background. "Source" makes a source file and "Background" makes a background file. One needs to know the light curves to determine a source region and a background region. The light curve is displayed to help to determine a source region if plot_lc is set to be 'yes'.
Currently only the following OGIP standards are supported by this task:
HDUCLAS1/HDUVERS1 = 'SPECTRUM'/'1.*.*'
(commonly also known as "PHAVERSN=1992a")
HDUCLAS2 = 'TOTAL'/'NET'/'BKG'
HDUCLAS3 = 'TYPE:II'
HDUCLAS4 = 'COUNT'/'RATE'
1. The first example below will converts her_bfits_0_2213.pha to a source file her_s_0_2213.pha. No light curve in ASCII is requested. Start with channel number of 1 and end with channel number of 128 for this source region.
bcmppha her_0_2213.pha her_s_0_2213.pha source
Main BCMPPHA Ver 1.0.0
Please enter data directory[]./data
Please enter typeII PHA filename[]her_0_2213.pha
Please enter output filename[] her_s_0_2213.pha
Please enter file mode Background or Source[] s
List Time History? yes or no[]n
Please enter Start Channel[1]
Please enter Stop Channel (1:256) [128]
Plot Time History? yes or no[]no
Please enter Start Point of Source[] 5
Please enter End Point of Source[] 17
... written the PHA data Extension
Completed BCMPPHA Ver 1.0.0
2. The second example below will converts her_0_2213.pha to a background file her_b_0_2213.pha. The light curve in ASCII is requested. Start with channel number of 1 and end with channel number of 128 for the background region.
Please enter data directory[]./data
Please enter typeII PHA filename[]her_bfits_6_143.pha
Please enter output filename[] her_b_6_143.pha
Please enter file mode Background or Source[] b
List Time History? yes or no[]no
Main BCMPPHA Ver 1.0.0
Please enter Start Channel[]1
Please enter Stop Channel (1:256) []128
on a interactive menu, click on plot, the go to the plot, click right mouse button to determine
b1, b2, b3, and b4 (click left mouse button will give the current coodinate):
Chose spectra number: b 1
Chose spectra number: b 2
Chose spectra number: b 3
Chose spectra number: b 4
... written the PHA data Extension
Completed BCMPPHA Ver 1.0.0
comppha