Simultaneous FittingXSPEC has the very useful facility of allowing models to be fitted simultaneously to more than one data file. It is even possible to group files together and to fit different models simultaneously. Reasons for fitting in this manner include:
As an example we will look at a case of fitting the same model to two different data files but where not all the parameters are identical. Again, this is an older dataset that provides a simpler illustration than more modern data. The massive X-ray binary Centaurus X-3 was observed with the LAC on Ginga in 1989. Its flux level before eclipse was much lower than the level after eclipse. Here, we'll use XSPEC to see whether spectra from these two phases can be fitted with the same model, which differs only in the amount of absorption. This kind of fitting relies on introducing an extra dimension, the group, to the indexing of the data files. The files in each group share the same model but not necessarily the same parameter values, which may be shared as common to all the groups or varied separately from group to group. Although each group may contain more than one file, there is only one file in each of the two groups in this example. Groups are specified with the data command, with the group number preceding the file number, like this:
XSPEC12>data 1:1 losum 2:2 hisum 2 spectra in use Spectral Data File: losum.pha Spectrum 1 Net count rate (cts/s) for Spectrum:1 1.401e+02 +/- 3.549e-01 Assigned to Data Group 1 and Plot Group 1 Noticed Channels: 1-48 Telescope: GINGA Instrument: LAC Channel Type: PHA Exposure Time: 1 sec Using fit statistic: chi Using test statistic: chi Using Response (RMF) File ginga_lac.rsp for Source 1 Spectral Data File: hisum.pha Spectrum 2 Net count rate (cts/s) for Spectrum:2 1.371e+03 +/- 3.123e+00 Assigned to Data Group 2 and Plot Group 2 Noticed Channels: 1-48 Telescope: GINGA Instrument: LAC Channel Type: PHA Exposure Time: 1 sec Using fit statistic: chi Using test statistic: chi Using Response (RMF) File ginga_lac.rsp for Source 1 Here, the first group makes up the file losum.pha, which contains the spectrum of all the low, pre-eclipse emission. The second group makes up the second file, hisum.pha, which contains all the high, post-eclipse emission. Note that file number is “absolute” in the sense that it is independent of group number. Thus, if there were three files in each of the two groups (lo1.pha, lo2.pha, lo3.pha, hi1.pha, hi2.pha, and hi3.pha, say), rather than one, the six files would be specified as da 1:1 lo1 1:2 lo2 1:3 lo3 2:4 hi1 2:5 hi2 2:6 hi3. The ignore command works on file number, and does not take group number into account. So, to ignore channels 1–3 and 37–48 of both files:
XSPEC12> ignore 1-2:1-3 37-48 The model we'll use at first to fit the two files is an absorbed power law with a high-energy cut-off:
XSPEC12> mo phabs * highecut (po)
After defining the model, we will be prompted for two sets of
parameter values, one for the first group of data files (losum.pha),
the other for the second group (hisum.pha). Here, we'll enter the
absorption column of the first group as
XSPEC12>mo phabs*highecut(po) Input parameter value, delta, min, bot, top, and max values for ... Current: 1 0.001 0 0 1E+05 1E+06 DataGroup 1:phabs:nH>100 Current: 10 0.01 0.0001 0.01 1E+06 1E+06 DataGroup 1:highecut:cutoffE> Current: 15 0.01 0.0001 0.01 1E+06 1E+06 DataGroup 1:highecut:foldE> Current: 1 0.01 -3 -2 9 10 DataGroup 1:powerlaw:PhoIndex> Current: 1 0.01 0 0 1E+24 1E+24 DataGroup 1:powerlaw:norm> Current: 100 0.001 0 0 1E+05 1E+06 DataGroup 2:phabs:nH>1 Current: 10 0.01 0.0001 0.01 1E+06 1E+06 DataGroup 2:highecut:cutoffE>/* ======================================================================== Model phabs<1>*highecut<2>*powerlaw<3> Source No.: 1 Active/On Model Model Component Parameter Unit Value par comp Data group: 1 1 1 phabs nH 10^22 100.000 +/- 0.0 2 2 highecut cutoffE keV 10.0000 +/- 0.0 3 2 highecut foldE keV 15.0000 +/- 0.0 4 3 powerlaw PhoIndex 1.00000 +/- 0.0 5 3 powerlaw norm 1.00000 +/- 0.0 Data group: 2 6 1 phabs nH 10^22 1.00000 +/- 0.0 7 2 highecut cutoffE keV 10.0000 = p2 8 2 highecut foldE keV 15.0000 = p3 9 3 powerlaw PhoIndex 1.00000 = p4 10 3 powerlaw norm 1.00000 = p5 ________________________________________________________________________
Notice how the summary of the model, displayed immediately above, is
different now that we have two groups, as opposed to one (as in all
the previous examples). We can see that of the 10 model parameters, 6
are free (i.e., 4 of the second group parameters are tied to their
equivalents in the first group). Fitting this model results in a huge
XSPEC12>newpar 10 1 Fit statistic : Chi-Squared 1.590267e+07 using 33 bins. Chi-Squared 4.084839e+06 using 33 bins. Total fit statistic 1.998751e+07 with 59 d.o.f. Test statistic : Chi-Squared 1.998751e+07 using 66 bins. Null hypothesis probability of 0.000000e+00 with 59 degrees of freedom Current data and model not fit yet. XSPEC12>fit ... ======================================================================== Model phabs<1>*highecut<2>*powerlaw<3> Source No.: 1 Active/On Model Model Component Parameter Unit Value par comp Data group: 1 1 1 phabs nH 10^22 20.6316 +/- 0.185277 2 2 highecut cutoffE keV 14.6866 +/- 5.59794E-02 3 2 highecut foldE keV 7.42555 +/- 9.02094E-02 4 3 powerlaw PhoIndex 1.18928 +/- 6.33109E-03 5 3 powerlaw norm 5.95641E-02 +/- 9.44254E-04 Data group: 2 6 1 phabs nH 10^22 1.31016 +/- 3.86477E-02 7 2 highecut cutoffE keV 14.6866 = p2 8 2 highecut foldE keV 7.42555 = p3 9 3 powerlaw PhoIndex 1.18928 = p4 10 3 powerlaw norm 0.313970 +/- 4.52066E-03 ________________________________________________________________________ Fit statistic : Chi-Squared 13992.93 using 33 bins. Chi-Squared 1316.02 using 33 bins. Total fit statistic 15308.95 with 59 d.o.f.
After fitting, this decoupling reduces
HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public Last modified: Friday, 23-Aug-2024 13:20:40 EDT |