NAME

burstt90t50 - Calculate the T90 and T50 intervals and write results to GTI output file.

USAGE

burstt90t50 lcfile gtifile outfile

DESCRIPTION

Read a lightcurve and GTI which defines burst intervals. Calculate the 90% and 50% total accumulated rate intervals (T90 and T50) within the burst. The input lightcurve needs columns defining time and rate (or counts) set by parameters tcol and rcol respectively. If the input parameter gtifile does not specific which extension contains the GTI, it is assumed to be in the 4th extension (as is expected for burstfinder-type GTI files): the parameter must explicitly specify the extension if this is not desired.

The task computes the cumulative total intensity at each binned interval, and estimates the T90 and T50 times by finding those intervals where the 5% and 95% total (for T90) and 25% and 75% (for T50) occur and interpolating within those intervals. In computing the cumulative total, only positive values are considered, unless usenegative is set to 'yes'.

The resulting intervals are written to an output GTI with two extensions, one for each of T90 and T50. In the special case of a burstfinder-type input gtifile, T90 is written to the first extension and T50 to the second, filling in these extensions with the values found.

PARAMETERS

lcfile [filename]
The input lightcurve file.

gtifile [filename]
The input GTI file. If no extension is specified, and gtifile is a burstfinder-type file with six extensions, the total interval is read from the 4th extension automatically; otherwise it reads the first extension.

outfile [filename]
The output GTI file. If set to NONE or left blank, the new GTI information will overwrite the input GTI file (This requires clobber to be 'yes'). If the input gtifile is a burstfinder-type file (6 extensions with total interval in the 4th), outfile will contain T90 in the first extension, T50 in the second, and all other extensions will be copied from the input gtifile. Otherwise outfile will contain two extension with T90 and T50 respectively.

(rcol = "RATE") [string]
Column in the input lightcurve containing count or rate information. Default is "RATE".

(tcol = "TIME") [string]
Column in the input lightcurve containing time information. Default is "TIME".

(usenegative = no) [boolean]
When computing T90 and T50 intervals, whether to include negative values in computing accumulated totals. Default is "no".

(uselast = no) [boolean]
If including negative values in computing accumulated totals, it is possible to cross a T90 or T50 threshold more than once. If more than one starting time solution is found, the earliest (first) is always considered. If 'uselast' is set to "yes", define the interval end by the latest of all possible intervals. if set to "no" (default), use the earliest. Ignored if 'usenegative' is "no".

(cleanup = yes) [boolean]
Remove all temporary files on completion if set to yes (default). Not used in this tool.

(clobber = no) [boolean]
Overwrites pre-existing output files if set to yes. Default is no.

(chatter = 1) [integer, 0 - 3]
Chatter level for output. Set to 0 to suppress output, or to 1 (default), 2, or 3 for increasing the chatter of the output.

(debug = no) [boolean]
Diagnostic output is printed out on the screen if set to yes (yes/[no]).

(logfile = !DEFAULT) [string]
Log filename. If set to DEFAULT, uses the name of the task (i.e. burstt90t50.log) and, if preceded by "!" clobber any pre-existing log file. If set to NONE, no log file is created. Default is "!DEFAULT"

(history = yes) [boolean]
If set to yes, record the task parameters run in the header of the output file in the HISTORY keywords. Not enabled in this current version.

(mode = ql) [string ql|hl|q|h]
Mode to query the parameter file. Acceptable values include: "ql" (query and learn/remember), "hl" (hidden and learn/remember), "q" (query but don't remember), "h" (hidden).

EXAMPLES

  1. Define the T90 and T50 intervals for a burst in the lightcurve "cgbm_sgm_1h_user.lc", and the total burst interval contained in the GTI file "cgbm_sgm_1h_dur.gti", which has six extensions, with the total burst interval defined by the 4th extension. Read the column TIME for time and RATE for rates in the input lightcurve. Replace the first and second extensions of "cgbm_sgm_1h_dur.gti" with the computed T90 and T50 intervals respectively. Consider only the positive values in the column RATE (default) when computing intervals.

    burstt90t50 lcfile=cgbm_sgm_1h_user.lc gtifile=cgbm_sgm_1h_dur.gti outfile=NONE rcol=RATE tcol=TIME clobber=yes
    
    1. Define the T90 and T50 intervals for a burst in the lightcurve "cgbm_sgm_025h_user.lc", and the total burst interval contained in the GTI file "cgbm_sgm_025h_dur.gti" using the GTI found in the 4th extension. Read the column TIME for time and RATE for rates in the input lightcurve. Include all values in the interval for RATE, including negative values, when computing the running total to define T90 and T50. If more than one solution for the end of T90 and T50 is found, use the earliest solution (shortest interval; default). Replace the first and second extensions of "cgbm_sgm_025h_dur.gti" with the computed T90 and T50 intervals respectively.

      burstt90t50 lcfile=cgbm_sgm_025h_user.lc gtifile=cgbm_sgm_025h_dur.gti+4 outfile=NONE rcol=RATE tcol=TIME clobber=yes usenegative=yes
      
    2. Define the T90 and T50 intervals using the columns TIME and RATE in the first extension of "example.lc" and the total burst interval defined by the first extension of "example_burst.gti". Write the T90 and T50 GTIs to a new file "example_t90t50.gti".

      burstt90t50 lcfile=example.lc+1 gtifile=example_burst.gti+1 outfile=example_t90t50.gti rcol=RATE tcol=TIME  clobber=no
      

    SEE ALSO

    burstfinder - Find the total burst interval in a lightcurve
    cgbm_bstgti - Find the total burst interval in an event file

    LAST MODIFIED

    July 2025 (burstt90t50 v0.7b)