next up previous contents
Next: MFIT Commands Up: Spectral Fitting with MFIT Previous: Spectral Fitting with MFIT

Spectral Fitting

Fitting is done by the standard forward-folding technique. A parameterized photon flux model is evaluated, the photon model is multiplied by the detector response matrix (DRM) to obtain the count rate model, and this count rate model is compared to the count rate data. The parameters of the photon flux model are varied so as to minimize the deviation between the count rate model and data, as determined by the tex2html_wrap_inline1880 function. It is important to remember the fitting is done so as to try to match the counts observed by the detector. While plots and values of the ``observed photon flux'' are output, these are calculated from the more fundamental count rate data in a model-dependent manner.

Because the photon flux model usually includes shape parameters which make the model nonlinear, the minimization is done via the Levenberg-Marquardt algorithm (see Numerical Recipes by Press et al.). One improvement that we have made is that tex2html_wrap_inline1880 is evaluated with variances estimated from the model rather than from the data.

To fit the data, select one of the Fit ... commands. WINGSPAN will now ask for the `fit channel range'. This is the range of channels that you want to include in the fit and must be a subset of the plot channel range. If you do not use the entire plot channel range, the default, the spectral model will still be calculated and displayed for the plot channels outside of the fit channel range, but the excluded channels will not be used in the fit.

The spectral model consists of a sum of model terms. The terms consist of popular and/or physical spectral forms, such as a power law, a ``Comptonized'' spectrum, or a Black Body spectrum. These terms are listed in the Appendix. Quite frequently your model will consist of only one term. WINGSPAN will list the available model terms, asking you if you wish to Use, Omit or Drop the term from your model. ``U'' for Use indicates that you wish to include the term in your model. ``O'' for Omit indicates that you do not wish to include the term in your model, but wish to leave it in the list for possible future inclusion. ``D'' for Drop indicates that you do not wish to include the term in your model, and that you wish to have it removed from the list since you are sure you will not want to use it later (if you change your mind you will be able to reactivate all of the terms). In response to the prompt for ``U'', ``O'' or ``D'', you can also input a number to skip forwards or backwards to the numbered term.

Each model term is a parameterized function, e.g. the parameters of a power law are the amplitude and the slope or index. In all cases, the first parameter of a term is its amplitude or intensity. After selecting a term for Use, you will be prompted for parameter guesses. For each parameter, you must input the value of your guess and whether the parameter value is to be varied to optimize the fit or held fixed. For example, in fitting a suspected narrow line feature, you might allow the line amplitude (strength) and centroid to vary, but might hold the line width fixed at a small value (small compared to the detector's resolution, which is built into the DRM). For each parameter, enter return in order to use the defaults, or enter a numeric value to change the guess and/or enter ``F'' or ``V'' for the variation status. You need not enter any value for varying amplitude parameters, because WINGSPAN/MFIT will always automatically optimize these parameters. After you have finished your model selection, or if you wish to reuse a previous selection, you can skip ahead with Control Z. Do not use Control Z if you are not using the VMS operating system. You can enter a large number (e.g., 99) to skip to the end of the model list.

After you have selected your model term(s), made parameter guesses and variation status selections, your choices are reviewed. If you are satisfied, WINGSPAN/MFIT will perform the nonlinear fit to optimize the parameter values of your model. This is an iterative process. After the fit is done, the value of tex2html_wrap_inline1880 , the number of degrees-of-freedom of the data and model, and the model parameters and their uncertainties will be displayed. The estimated parameter uncertainties are obtained from the covariance matrix, which is based upon the derivatives for tex2html_wrap_inline1880 with respect to the model parameters (see Numerical Recipes by Press et al.). The covariance matrix is also output, normalized so that values range from -1 (complete anti-correlation) to 0 (uncorrelated) to +1 (complete correlation). Also output are the global correlation coefficients, which, for each parameter, is the worst case correlation against any linear combination of the other varying parameters (see Statistical Methods by W. T. Eadie et al.).

At this point, if you are not satisfied with the fit, you may modify your fit instructions. WINGSPAN/MFIT has been designed to do model fitting in a robust and convenient manner, but it will sometimes fail. Nonlinear fitting is much more difficult than linear fitting. The Levenberg-Marquardt algorithm is an iterative process dependent upon the parameter guesses. Typical failure modes are 1) an error message about a ``singular matrix'', 2) very large estimated parameter uncertainties, or 3) absurd parameter values. The two most common causes of a fitting failure are a) one or more parameters have been guessed at values very far from the best value, or b) one is attempting to fit a parameter which is very poorly constrained by the data. If you suspect problem a), you should fix the values of the parameters you are uncertain about (by marking the parameter with ``F''), fit the remaining parameters, and plot the result in order to obtain guidance about the parameter values. Problem a) should never occur for an amplitude parameter because WINGSPAN/MFIT normally robustly determines the values of these parameters. When you obtain better parameter value guesses, you can then release those parameter to vary to their optimum value (by marking with ``V''). If you suspect problem b) because of a ``singular matrix'' message or a very large parameter uncertainty, you should fix all doubtful parameters at reasonable values and retry the fit. After obtaining a good fit, you can then experiment with varying some of the formerly fixed parameters. Nonlinear fitting requires some judgement from the user.


next up previous contents
Next: MFIT Commands Up: Spectral Fitting with MFIT Previous: Spectral Fitting with MFIT

Robert S. Mallozzi
Thu Sep 5 10:38:07 CDT 1996

[image 4K] BATSE Home Page
Responsible Manager: Charles Meegan
Web Curator: Valerie Connaughton
Last Updated: November 8, 1996.