An Example of a Simple XSPEC Session
In the following example, we use XSPEC to simulate a Crab spectrum expected in the HEPC, LEPC, and SIXA detectors, using the response matrices available in the US SXG CF anonymous ftp node. We assume a Crab spectrum with
- NH = 3.0E21
- Photon Spectral Index = 2.05
- Normalization = 10.0
Note that for the SIXA spectrum, the response matrix is normalized to a maximum effective area of 1.0. XSPEC renormalizes it to the correct value of 1735 in the fakeit command.
!xspec 16:33:21 16-Jun-95 XSPEC> model wabs powerlaw Input parameter value, delta, min, bot, top, and max values for ... Mod parameter 1 of component 1 wabs nH 10^22 1.000 1.0000E-03 0. 0. 1.0000E+05 1.0000E+06 0.3 Mod parameter 2 of component 2 powerlaw PhoIndex 1.000 1.0000E-02 -3.000 -2.000 9.000 10.00 2.05 Mod parameter 3 of component 2 powerlaw norm 1.000 1.0000E-03 0. 0. 1.0000E+05 1.0000E+06 10.0 --------------------------------------------------------------------------- mo = wabs[1] (powerlaw[2]) Model Fit Model Component Parameter Value par par comp 1 1 1 wabs nH 10^22 0.300000 +/- 0. 2 2 2 powerlaw PhoIndex 2.05000 +/- 0. 3 3 2 powerlaw norm 10.0000 +/- 0. --------------------------------------------------------------------------- 3 variable fit parameters XSPEC> fakeit none For fake data, file # 1 needs response file: hepc.rmf Use counting statistics in creating fake data? (y) Input optional fake file prefix (max 12 chars): Override default values for file # 1 Fake data filename (hepc.fak): T, A, Bkg, cornorm ( 1.0000 , 1.0000 , 1.0000 , 0. ): Net count rate (cts/cm^2/s) for file 1 3114. +/- 56.43 Chi-Squared = 111.7 using 128 PHA bins. Reduced chi-squared = 0.8934 XSPEC> fakeit none For fake data, file # 1 needs response file: lepc.rmf Use counting statistics in creating fake data? (y) Input optional fake file prefix (max 12 chars): Override default values for file # 1 Fake data filename (lepc.fak): T, A, Bkg, cornorm ( 1.0000 , 1.0000 , 1.0000 , 0. ): Net count rate (cts/cm^2/s) for file 1 8323. +/- 91.23 Chi-Squared = 98.38 using 128 PHA bins. Reduced chi-squared = 0.7871 XSPEC> fakeit none For fake data, file # 1 needs response file: sixa.rmf Use counting statistics in creating fake data? (y) Input optional fake file prefix (max 12 chars): Override default values for file # 1 Fake data filename (sixa.fak): T, A, Bkg, cornorm ( 1.0000 , 1.0000 , 1.0000 , 0. ): 1.0,1735.0 Net count rate (cts/cm^2/s) for file 1 3.697 +/- 4.7748E-02 Chi-Squared = 756.5 using 1007 PHA bins. Reduced chi-squared = 0.7535 XSPEC> quit
For additional examples and a complete description of the XSPEC system, click here.