02.02.2014 Views

SPEX User's Manual - SRON

SPEX User's Manual - SRON

SPEX User's Manual - SRON

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.12 Fit: spectral fitting 25<br />

Table 2.4: ∆χ 2 as a function of confidence level, P, and degrees of freedom, ν.<br />

ν<br />

P 1 2 3 4 5 6<br />

68.3% 1.00 2.30 3.53 4.72 5.89 7.04<br />

90% 2.71 4.61 6.25 7.78 9.24 10.6<br />

95.4% 4.00 6.17 8.02 9.70 11.3 12.8<br />

99% 6.63 9.21 11.3 13.3 15.1 16.8<br />

99.99% 15.1 18.4 21.1 13.5 25.7 27.8<br />

2.12 Fit: spectral fitting<br />

Overview<br />

With this command one fits the spectral model to the data. Only parameters that are thawn are changed<br />

during the fitting process. Options allow you to do a weighted fit (according to the model or the data),<br />

have the fit parameters and plot printed and updated during the fit, and limit the number of iterations<br />

done.<br />

Here we make a few remarks about proper data weighting. χ 2 is usually calculated as the sum over all<br />

data bins i of (N i − s i ) 2 /σi 2, i.e. n∑<br />

χ 2 (N i − s i ) 2<br />

= , (2.1)<br />

i=1<br />

where N i is the observed number of source plus background counts, s i the expected number of source<br />

plus background counts of the fitted model, and for Poissonian statistics usually one takes σ 2 i = N i .<br />

Take care that the spectral bins contain sufficient counts (either source or background), recommended<br />

is e.g. to use at least ∼10 counts per bin. If this is not the case, first rebin the data set whenever you<br />

have a ”continuum” spectrum. For line spectra you cannot do this of course without loosing important<br />

information! Note however that this method has inaccuracies if N i is less than ∼100.<br />

Wheaton et al. ([1995]) have shown that the classical χ 2 method becomes inaccurate for spectra with<br />

less than ∼ 100 counts per bin. This is not due to the approximation of the Poisson statistic by a normal<br />

distribution, but due to using the observed number of counts N i as weights in the calculation of χ 2 .<br />

Wheaton et al. showed that the problem can be resolved by using instead σ 2 i = s i , i.e. the expected<br />

number of counts from the best fit model.<br />

The option ”fit weight model” allows to use these modified weights. By selecting it, the expected number<br />

of counts (both source plus background) of the current spectral model is used onwards in calculating the<br />

fit statistic. Wheaton et al. suggest to do the following 3-step process, which we also recommend to the<br />

user of <strong>SPEX</strong>:<br />

1. first fit the spectrum using the data errors as weights (the default of <strong>SPEX</strong>).<br />

2. After completing this fit, select the ”fit weight model” option and do again a fit<br />

3. then repeat this step once more by again selecting ”fit weight model” in order to replace s i of the<br />

first step by s i of the second step in the weights. The result should now have been converged (under<br />

the assumption that the fitted model gives a reasonable description of the data, if your spectral<br />

model is way off you are in trouble anyway!).<br />

There is yet another option to try for spectral fitting with low count rate statistics and that is maximum<br />

likelyhood fitting. It can be shown that a good alternative to χ 2 in that limit is<br />

C = 2<br />

σ 2 i<br />

n∑<br />

s i − N i + N i ln(N i /s i ). (2.2)<br />

i=1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!