batphasimerr transforms an XSPEC "fake" BAT spectrum into a more realistic estimate of the instrument response. This is especially useful for making proposals or estimating the feasibility of a BAT project. Since the BAT is a background-dominated instrument, it is important to use this tool to get a better handle on the statistical uncertainties.
batphasimerr operates on the spectrum file "in-place." It converts a counts spectrum to a rate spectrum, if necessary. It estimates the background rate using the user-specified background file, and then the statistical uncertainty. Finally, it randomizes the rate, using that the statistical uncertainty.
The user should first make an XSPEC "fake" spectrum. Please use the procedure described below. There are really only three differences: randomization should be set to "NO"; the exposure should be set to "1E9"; and the batphasimerr task should be run to adjust the spectrum after the fakeit step.
Here are the step by step instructions.
Here is an example XSPEC session showing how a power law model can be simulated (photon index 2.05, normalization 10.5). The desired exposure is 10 ks. The response matrix was taken from CALDB. The background rates were taken from bkg_det.fits.
1. Create the model in XSPEC.
XSPEC>model pow Model: powerlaw<1> Input parameter value, delta, min, bot, top, and max values for ... 1 0.01 -3 -2 9 10 1:powerlaw:PhoIndex>2.05 1 0.01 0 0 1E+24 1E+24 2:powerlaw:norm>10.5 --------------------------------------------------------------------------- --------------------------------------------------------------------------- Model: powerlaw<1> Model Fit Model Component Parameter Unit Value par par comp 1 1 1 powerlaw PhoIndex 2.05000 +/- 0.00000 2 2 1 powerlaw norm 10.5000 +/- 0.00000 --------------------------------------------------------------------------- ---------------------------------------------------------------------------
2. Make a fake spectrum.
XSPEC>fakeit none For fake data, file # 1 needs response file: swbresponse20030101v007.rsp ... and ancillary response file: (blank) Use randomization in creating fake data? (y) NO Input optional fake file prefix (max 4 chars): xxx Fake data filename (xxxswbresponse20030101v007.fak) [/ to use default]: crab.fak Exposure time, correction norm (1, 1): 1E9, 1 Net count rate (cts/s) for file 1 7.8508E-02+/- 8.8605E-06 using response (RMF) file... swbresponse20030101v007.rsp Chi-Squared = 1.5999669E-04 using 80 PHA bins. Reduced chi-squared = 2.0512396E-06 for 78 degrees of freedom Null hypothesis probability = 1.00
3. Estimate BAT uncertainties.
XSPEC>batphasimerr crab.fak 10000.0 bkg_det.pha swbresponse20030101v007.rsp batphasimerr 1.0 -------------------------------------------------------- Spectrum file: crab.fak -------------------------------------------------------- File modified in place: crab.fak --------------------------------------------------------
4. Load the simulated spectrum back into XSPEC.
XSPEC>data crab.fak Net count rate (cts/s) for file 1 7.8351E-02+/- 8.4527E-05 using response (RMF) file... swbresponse20030101v007.rsp 1 data set is in use Chi-Squared = 71.96701 using 80 PHA bins. Reduced chi-squared = 0.9226540 for 78 degrees of freedom Null hypothesis probability = 0.671
5. Proceed with your simulation.