This button is the entry point to the FORTRAN spectral deconvolution package MFIT. When this option is selected, WINGSPAN will do two safety checks. It will check that you have made a background model and if you haven't will ask if you want to continue. It will also check to see whether you have changed the background model since a lookup file was read or saved. If the background model has been changed but has not been saved to a lookup file, WINGSPAN will inform you of this and give you the option of exiting the command, so that you can save the new selections in a lookup file. The purpose of this is to leave some audit trail of the decisions used to create the background subtracted spectra. Plots created by WINGSPAN/MFIT will display the lookup file name as a note on the bottom of the page. Also, saving a lookup file protects the work done to get to this point, and allows for easy restoration of a session for additional spectral fitting. The main MFIT window selection buttons are shown in Figure 11.
Some options become available only after fitting the data.
If this is the first invocation of the Fit Spectrum / MFIT command for the current FITS data file, WINGSPAN will search for a Detector Response Matrix (DRM) file whose name is based upon the FITS data file's name. (DRM_GEN produces filenames in the expected convention.) If the file is not found, WINGSPAN will prompt you to enter the correct DRM file name for the burst. If the DRM file has separate entries for the direct and air scattering matrices, you will be prompted by a menu asking if the Earth Scattering Matrix should be included. This allows you to compare fit results obtained with and without the scattering matrix.
This button allows setting of user preferences for plotting, filenames, etc. It is identical to the Preferences button on the main menu. See section 2.1.6.
This pulldown menu allows selection of the specific spectrum or spectra to be deconvolved. Individual items are described below.
When this option is selected, WINGSPAN will activate the Burst History window and display the message ``Click on spectrum to fit''. WINGSPAN will wait for you to select a spectrum from the time history by positioning the mouse cursor on one of the time bins and clicking the left mouse button once. You may choose any combined time bin on the window; it need not be part of a selected Source Interval. The background-subtracted spectrum corresponding to the time bin you selected will be available for spectral analysis in MFIT.
These two commands give the user access to selections of data without having to do any extra effort. Fit Last... simply re-loads the last fitted spectrum into MFIT (including the last spectrum in a batch fit series), where the user can select a new model for fitting. Fit Summed Selections adds up ALL the selected spectra into one, and then passes control to MFIT.
Batch Fit Selections will run MFIT in batch mode, applying the photon model currently selected in MFIT to each of the spectra in the Source Interval selection (as shown by vertical solid lines in the Burst History window). Keep in mind that your selection may extend outside of the current viewing window, possibly in several discontiguous regions, if you have zoomed in for a closer look at one portion of the time history. The parameters of the fits are stored for display (Display Fit Parameters) and for outputting to a file (Write Fit Parameters to File), as requested. You can also choose to have MFIT output detailed ASCII or binary files.
The user must interactively select a photon model before a batch fit, via Fit One Spectrum, for example, or by having created a photon model, storing that photon model as a fit template file and having designated that fit template file to be automatically read on the first invocation of MFIT via the control variable MCV_STARTUP_TEMPLATE_FILE (section 3.2.2). The photon model (including its parameter values) in effect when MFIT is called for a batch fit, either the current photon model or the model in the startup template (if this option is used and this is the first call to MFIT), is used as the start for the fit to each spectrum in the batch fit.
During the batch run, MFIT may have difficulties with fitting individual spectra. WINGSPAN may prompt you as to whether or not you want to continue with fitting the current spectrum. If you answer Yes, the fit will continue. This response is appropriate if MFIT reports that the fit was ``Mildly non-convergent''. For other, more serious, errors, you should probably answer No. The batch fit will then continue with the next spectrum.
When you do a batch fit, frequently the signal-to-noise ratios of the spectra will differ greatly. This problem can be avoided by using Bin for Significance, but binning the time bins to high SNR may make the time resolution inadequate. For some spectra of high SNR, the data will constrain the model so that all of the model parameters are well-determined. Conversely, for spectra of lower SNR the data may not sufficiently constrain the model to allow determination of all of the parameters. If requested by the control variable MCV_FIX_UNDETERMINED (section 5.2), MFIT will fix ill-determined parameters at their guessed values and reattempt the fit in order to determine the best-fit values of any remaining parameters. The classification of a parameter as ill-determined is based upon its estimated uncertainty and upon parameters contained in the Function Information File (section 5.4).
This option allows the user to create a simulated FITS data file, including Poisson fluctuations in the simulated counts. After its creation, the simulated FITS data file can be analyzed with WINGSPAN. The simulated data is partially based upon an actual burst and its data file, and especially upon the DRM. The background count rate model and the source photon rate model obtained from the real FITS dataset and/or input by the user are assumed to be exact and ``true''. The simulated background is produced from the background model by adding Poisson fluctuations. Fluctuations in the background model caused by Poisson fluctuations in the actual background are unimportant since these will appear in both the simulated background and the simulated source spectra. The simulated source count rate model is obtained by multiplying the photon model by the DRM. The background count rate model is added to the source count rate model, this sum is multiplied by the input source livetime, and finally Poisson fluctuations are added to produce a simulated source spectrum.
The procedure for creating the simulated FITS file is as follows:
The synthetic FITS data file will contain one simulated background spectrum, which will end at 0.0 seconds. This will be followed by the selected number of simulated source spectra, each of the selected livetime. Each simulated source spectrum will have the same intensity, differing only by the simulated fluctuations. The simulated FITS file can be read into WINGSPAN. The one background spectrum can be used to create a zeroth order background model. You can then analyze any of the simulated source spectra or choose to batch fit them all.
If you wish to consider the simulated source spectra as independent bursts then you must make an approximation: since there is only one background spectrum with its unique simulated Poisson fluctuations, you must assume that the background fluctuations are negligible compared to the fluctuations in the simulated source spectra. This, of course, may not be true depending upon the livetimes and the photon model. No such problem arises if you wish to consider the simulated source spectra as belonging to a single simulated burst. The simulation does not include systematic effects, such as a changing background or differences between the channel-to-energy conversion and reality.
Any time after the DRM corresponding to the current FITS file has been read (usually the first time a spectrum is selected for fitting), it can be displayed. The plot is a log(Photon Energy) - log(Channel Energy) contour map of the DRM. The photopeak `ridge' should be prominent along the x = y line. The 32 keV K-edge should also show up. Very irregular contours are an indicator of a possibly `pathological' DRM, which can arise for certain cases of the input parameters to DRM_GEN.
The commands on this pulldown menu are described in section 3.
Once a fit has been obtained, there are many different ways of displaying information about the results. MFIT implements six plot types for this purpose, shown in Figure 12.
Count Rate is the most fundamental plot since the observed
quantity is counts and the fit is done by minimizing the difference between the
observed and model counts. In order to make the plot model independent, the
error bars shown are calculated from the data, even though WINGSPAN/MFIT uses
variances estimated from the model to calculate and minimize
. Unlike
the photon model, the count rate model is discrete-it predicts the count rate
in each channel. For this reason, we prefer to plot the count rate model as a
histogram, however, this is visually confusing for a large number of channels
so WINGSPAN switches to lines connecting the model points when the number of
channels plotted exceeds the control variable MCV_SPEC_STYLE (see
section 9.3)
Photon Flux must be used with caution. Both the photon flux model and, less obviously, the ``photon flux data'' are model dependent. The photon ``data'' are calculated, for each channel, by using the model photon flux and model count rate to define an efficiency. These efficiencies are used to convert the data count rates into ``data'' photon rates. The error bars on this plot type are calculated from the model.
The Count Rate Residuals and Photon Flux Residuals plots show the residuals (data - model).
The nu_Fnu = d(Eflux)/d(log E) (=
) plot shows the
``photon data'' and photon model in units of energy flux per log energy range,
thereby making clear what energy range dominates the source's luminosity. The
model is derived from the continuous photon flux model simply by multiplying by
E
. The derivation of the data values from the ``photon data'' is slightly
more complicated. The quantity `Eflux' is energy flux, not energy
flux.
The Sigma Residuals plot shows the residuals (data - model) as pulls, i.e., in units of sigma. The sigmas used are calculated from the model. This plot is always done at the instrument's channel resolution even if you have combined channels in the Burst Spectrum window. Channels not included in the fit are indicated by hollow squares.
These options allow modification of the axes limits of the display window. Some plots don't allow the zoom command, for example, the DRM display. Zooming is done by selecting two points, which represent the two corners of a box surrounding the data to be expanded. If a mistake has been made, position the cursor to the right of the right vertical axis to activate ``RESET''. Zooming out can be done via this method.
For more exact control over plots resulting from a model fit (see Plot), select the Adjust Plot Parameters command. Each possible axis option for the chosen plot will be presented for user input. Click on any one to change the appropriate axis limits. Enter RETURN or `N' to skip over the energy axis setting, if you don't wish to change it.
The first time you select each plot type, WINGSPAN/MFIT will automatically set the axis limits, including the range of channels to be plotted. These limits will be kept unchanged until you specifically request their alteration with the Adjust Plot Parameters option, or execute Zoom.
This option will make a hardcopy of the current display. The print command is defined in wing.pro
You can plot the fit parameters obtained by batch fit processing in various ways by choosing the Display Fit Parameters option, which becomes available after a batch fit has been done. You will presented with a popup menu of options (see Figure 13).
Figure 13:
Display Fit Parameters Menu
Choose Parameter Time History to display a single fit parameter as a
function of time. You will be asked to choose which fit parameter to display as
a time history. The plot will be displayed in the main plot window, so you can
get a hardcopy of the plot, or zoom it, as described above. If you select the
command a second time, you will be asked if you want to make an overlay of the
second chosen time series upon the first. The rightmost axis will correspond to
the second series, which will be displayed as dotted lines. You can zoom the
second series via the Zoom command, so that it is displayed better
on the plot, in relation to the first series of data. If you change the x-axis
of the plot, both series will reflect the change. When you are satisfied with
the appearance of the combined plot, you can obtain a hardcopy of it by
choosing the Create Hardcopy command. There are also options to
compute the energy and photon flux and fluence, and the
of the
fits. The button at the bottom of the menu allows automatic overplotting of the
burst time history (default is to overplot the time history).
The One Parameter vs. Another command allows one parameter of the fit to be displayed as a function of another, depending upon the order in which the two fit parameters are chosen. The first chosen will make up the horizontal axis of the resultant plot. The plot will be displayed in the Spectral Results window, so you can get a hardcopy of the plot, or zoom it, as described above.
Some batch fit parameters may be distributed within a range of values, the most common of these being the distribution of reduced chi-squares. The Parameter Histogram command presents a menu of the fit parameters (including reduced chi-squares) to choose to display as a histogram of number of occurrences of a parameter value within a range of parameter values. The bin sizes are chosen to be equal to the smallest non-zero error of a fitted parameter, except for the case of reduced chi-squares, where the bin size is equal to one third of the standard deviation of the distribution.
Sigma Residuals Map plots a time history of the sigma residuals obtained for each spectrum as a contour map. Contours are at one sigma increments, with negative residuals displayed as dashed contours. The Zero-crossing contours are dotted. Systematic departures of the data from the chosen spectral model will show up as bands or islands of elevated or depressed contours. This plot cannot be zoomed. The axis limits can be changed only by changing the data selection in time and energy and re-doing the batch fit.
Model NuFNu Contour Map is roughly analogous to a topograghical
elevation map. Keeping in mind that the two axes of the plot have different
meanings, the contours follow equal intensities of the nu-f-nu (=
)
model time history. The
spectral model is obtained by multiplying
the photon spectrum by the energy squared. Gamma-ray bursts typically peak
between 100 keV and 1 MeV in this representation, which makes it useful for
displaying which energy the peak power of the burst is coming from. The dashed
line follows this peak for each time bin; thus it is analogous to a
`continental divide' for the plot, dividing the rising energy portion of the
model, on the left of the dashed line, from the falling energy portion.