xrtgrblcspec indir=<output from xrtgrblc>
instem=<stem name> outdir=<output dir>
outstem=<stem for output files> srcra=<source RA>
srcdec=<source Dec>
This task is a direct follow-up task for xrtgrblc. It is designed to work
with the output files from that task, when the option
cleanspec='no'
(intermediate spectra, events, and ARF
files are not cleaned). This task does basically has two stages: 1 - Determine
time intervals to extract spectra from; 2 - Extract and possibly fit those spectra.
The first stage is done by attempting to fit the output light curves from xrtgrblc. Three models are tried in Xspec - power, bknpower, and bkn2po using initial guesses determined from the light curves themselves. The best fit is chosen by way of a series of F-tests. If running with interactive='yes', then the user is prompted whether they like the fit, and are allowed to fit the light curve manually if not, or just enter time intervals for spectrum extractions.
The second stage takes the time intervals from the first stage, determines how to extract a source and background spectrum, then does so. If requested, the extracted spectra are fit with an absorbed power-law model, and plotted to the requested plot device (file-devices only).
The output from this task is a set of source PHA files, one for each time interval found (and split on XRTVSUB changes if neccessary), and the corresponding background PHA and PSF corrected ARF. They are named as follows:
outdir/OUTSTEM_xpcetsrt[1-3].pha
outdir/OUTSTEM_xpcetbgt[1-3].pha
outdir/OUTSTEM_xpcetsrt[1-3].arf
outdir/OUTSTEM_xpcetsrtt.pha
outdir/OUTSTEM_xpcetbgtt.pha
outdir/OUTSTEM_xpcetsrtt.arf
where OUTSTEM is the value of the parameter outstem
. There
would be a similar set of files for WT mode, although this depends on which
modes are active during which intervals (and if there are "enough" counts - see
minpcphacts
and minwtphacts
params). If there are
different RMF requirements for a single mode (PC/WT) during an interval, the
PHA's will be split accordingly, with the last character before the file
extension being [a-z].
For example, if the first PC interval requires two RMFs (say, due to a change in the substrate voltage), there would be the following set of PHA's for the first interval (not shown are the corresponding bkg spectra and the ARFS):
outdir/OUTSTEM_xpcetsrt1.pha
outdir/OUTSTEM_xpcetsrt1a.pha
In addition, if autospecfit='yes'
, for each interval (including
the total), there will be a plot generated of the fitted spectrum:
outdir/OUTSTEM_xpwetsrt[1-3t]_ph.gif
plotftype
parameter.
Lastly, there will be a plot of the fitted light curve, either the best automatically fitted light curve, or the user fit light curve:
outdir/OUTSTEM_xpwetsrmb_lc.gif
plotftype
parameter.
If interactive='yes'
, the light curve automatic fitting is
performed, and the best fit is chosen by way of a series of F-tests. The user
is then prompted for a QDP plot device, and the best-fit light curve is plotted
there. The user is then prompted if they think the fit is acceptable. If they
do not, an interactive Xspec session (Xspec v12) is started with the PC and WT
fittable light curves preloaded (PC is dataset 1, and WT is dataset 2, if both
are extant).
At this point the user has three options. First, they can fit the light curve using one of the three default models, trying to get a better fit through whatever means. In this case, when the Xspec session is ended, the fitted time breaks from the model parameters will be read out, and used to define spectral intervals.
NOTE:If using a standard power-law type model(powerlaw, bknpower, or bkn2po), and both PC and WT data are used, then all model parameters must be linked, with the exception of the normalization. If they are not, the behavior of this task is undefined. Run "help newpar" within Xspec for more information about linking parameters.
Second, the user can choose to fit a different model to the light curve
data. In this case, the time breaks for the spectral intervals can be manually
entered from the Xspec prompt by running the tcl procedure
set_timebreaks
and following the prompts. It should be noted that
the total start and stop times for each mode will define the absolute edges of
the spectral intervals. Any times that are excluded by using the
ignore
command in Xspec will be excluded from any and all spectra.
If no time breaks are set using the set_timebreaks
procedure, then
there will only be a single interval considered.
Lastly, the user can choose to simply enter the time breaks manually using
the above set_timebreaks
procedure, and not fit any model to the
data. Or simply, exit Xspec with no model defined to consider the entire light
curve as the only interval.
In all three of the above cases, GRB flares and any intervals that the user
does not want included in the output spectra, can be excluded using the
ignore
command in Xspec.
In the following simple example, the total light curve will be considered as a single interval, excluding any times before 1000s after the BAT trigger.
. . . !XSPEC12>set xs_echo_script 0; *********************************************************************** * * * Fit the light curve using ONLY powerlaw, bknpower or bkn2pow models * * Exclude any flares that you don't want included in the spectral fit * * by using the ignore command. When you are finished quit Xspec. * * * * If you have both PC and WT data, then the parameters MUST be linked * * for the rest of the script to function as expected. The exeption to * * this is the normalization parameter - this can be independent for * * each mode. * * * * If you are unable to get a decent fit with these models, do: * * * * XSPEC12> set_timebreaks [ MST | MET ] * * * * and follow the prompts to manually enter the time breaks * * to use for spectral fitting intervals. Then quit as usual. * * * * * * NOTE: If time breaks are entered manually, the fit is assumed not * * to give valid time breaks, and the user-entered values will * * be used instead. * * * * NOTE: If you are unable to exit Xspec, use: * * * * XSPEC12> xs_old::exit * * * *********************************************************************** XSPEC12>ignore 1:**-1000.0 2:**-1000.0 339 channels (1-339) ignored in spectrum # 1 6 channels (1-6) ignored in spectrum # 2 XSPEC12>exit Finishing up... Do you really want to exit? (y)
No time breaks were set, so the entire light curve is considered a single interval, but without the first 1000s in either mode.
In the following simple example, the total light curve will be considered as two intervals, excluding any times before 1000s after the BAT trigger in the first interval. The first interval will be from 1000s after the trigger to 10000s after the trigger, and the second interval will be from 10000s to the end of the light curve.
. . . !XSPEC12>set xs_echo_script 0; *********************************************************************** * * * Fit the light curve using ONLY powerlaw, bknpower or bkn2pow models * * Exclude any flares that you don't want included in the spectral fit * * by using the ignore command. When you are finished quit Xspec. * * * * If you have both PC and WT data, then the parameters MUST be linked * * for the rest of the script to function as expected. The exeption to * * this is the normalization parameter - this can be independent for * * each mode. * * * * If you are unable to get a decent fit with these models, do: * * * * XSPEC12> set_timebreaks [ MST | MET ] * * * * and follow the prompts to manually enter the time breaks * * to use for spectral fitting intervals. Then quit as usual. * * * * * * NOTE: If time breaks are entered manually, the fit is assumed not * * to give valid time breaks, and the user-entered values will * * be used instead. * * * * NOTE: If you are unable to exit Xspec, use: * * * * XSPEC12> xs_old::exit * * * *********************************************************************** XSPEC12>ignore 1:**-1000.0 2:**-1000.0 339 channels (1-339) ignored in spectrum # 1 6 channels (1-6) ignored in spectrum # 2 XSPEC12>set_timebreaks Have you excluded the flares that you want to (y or n)? y Enter the time ([s] since Trigger) of break 1 (-1 to end): 10000 Enter the time ([s] since Trigger) of break 2 (-1 to end): -1 XSPEC12>exit Finishing up... Do you really want to exit? (y)
Passing the option 'MET' to the set_timebreaks
procedure will
enable you to use MET time instead of the time since the BAT trigger (MST =>
MET Since Trigger, in this context).
cleanspec='no'
in xrtgrblc
.
outstem
parameter from xrtgrblc.
trigfrombat
parameter) of the burst
(MET[s]). If <= 0.0, then the value from one of the input light curve
headers is used.
plotftype='/gif'
, displaycmd='xv'
would work
(provided xv is installed).
July 2009