Follow this link to skip to the main content

SNR: Tweaking the Model

Tweaking the Model

Your answers to the questions on the previous page likely indicate that the model doesn't really fit the data yet. There are three peaks in the data that are not accounted for by the current model. These peaks happen to be emission lines of specific elements, and if you can model these lines properly, you will be able to identify which elements are present in the supernova remnant.

As before, you will want to start with the simplest model, in this case it is Xspec's model called Gaussian. You may have seen a Gaussian before – it is the same as the normal distribution, or the "bell-curve" that some teachers use to determine grades. The figure below shows a Gaussian function and illustrates two of the free parameters:

Plot of a Gaussian model

Plot showing a Gaussian emission line model. The peak of the emission line is set by the model parameter lineE, or the line energy. The width of the emission line is characterized by the model parameter Sigma. A third parameter is the normalization, which is a count of all the photons that make up the line.

The Gaussian model's free parameters are:

  • lineE, the energy of the central peak of the emission line
  • Sigma, a measure of the width of the line
  • normalization, the total number of photons in the line

To add a Gaussian feature to your model, use Xspec's addcomp command – this will keep your current model intact, while adding a new component.

First, look back at your plot at the highest-energy peak. At what energy does that peak appear to occur? What is the range of possible values for that first peak? (Keep in mind that the x-axis on the plot is logarithmic, not linear.)

It is possible for Xspec to get confused when fitting spectral features if you add too many parameters at once. To help keep Xspec on track, it is best to put limits on some of the free parameters. If you look at your first data and model plot (shown again below), you will see that the peak of the first emission line is at approximately 1.015 keV. In addition, you can narrow down the possible energies of that first peak to be between about 1.01 keV and 1.04 keV.

Plot of the initial
	fitted model with first peak labeled

Plot showing the data (red) and model (black) for the initial fit of the SNR spectrum in Xspec. Labeled in the plot is the peak that you will model with a Gaussian emission line. The peak of this first emission line is at approximately 1.015 keV; Xspec will determine the best peak energy based on this initial guess. In addition, you need to give Xspec a range of possible values for the first peak, to help it keep from fitting the wrong spectral feature. In this case, the range is 1.01 keV to 1.04 keV.

Recall that the x-axis is a logarithmic scale.

Now you can add a new Gaussian component to your model. To do this, type:

addcomp 2 gaussian line

into the Xspec Command Window.

When Xspec prompts you for the first model input, the line energy, this is where you give Xspec your initial guess of the peak energy and give it the range of possible values. When you see the following prompt:

2:gaussian: LineE >


1.015 0.05 1.01 1.01 1.04 1.04

The image below shows what this will look like in your Xspec Command Window, and includes a brief explanation of each number. You will need to use this again to model the other emission lines, so be sure to understand where your guess of the peak energy and your guess of the energy range goes, so you can change the command later.

Screen capture of the Xspec Command Window showing how to use
	the adcomp command

This screen capture shows the Xspec Command window with the input for the Gaussian LineE parameter. The first number is the initial guess for the peak of the emission line. The second number is "Delta", a value used by Xspec to determine how to step through different values of the line energy. Delta should be kept at 0.05 for all Gaussian lines entered. The third and fourth numbers are both the lower end of the range of possible peak energies. The fifth and sixth are both the higher end of the range of possible peak energies.

(Click image for larger version.)

For the other two model components, Sigma and normalization, hit return to accept Xspec's default values.

The model will need to be re-fitted at this point, so that Xspec can find the best values not only for the new Gaussian component, but for the existing absorption and continuum. By adding the new component, there might be better values for the previously fit values. To fit, type:


into the Xspec command window. If needed, remember to hit return when Xspec pauses with the message:

Number of trials exceeded: continue fitting?

When Xspec has finished the fit, look at the results. What is the best-fit value for the energy of the emission line you entered? You should see that it is about 1.01 keV.

	capture of the Xspec window showing the results of fitting the model
	with the Gaussian added.

Screen capture of the Xspec command window showing the results of fitting the model with one Gaussian emission line added.

(Click image for larger version.)

Now, plot the data to see if the addition of a Gaussian emission line helped. Remember to use the easyplot command:

easyplot 0.25 5.0

Screen capture
	of the POW plot window showing the results of the model with one
	Gaussian added.

Screen capture of the POW plot window showing the results of the fitting the revised model with a Gaussian emission line.

Answer these questions about your current model and plot:

  • Note the chi-squared for this fit.
  • Is the chi-squared higher or lower than it was for your previous model? Does that mean that this is likely to be a better or worse fit?
  • Looking at your plot, how well does the model match the data?
  • Did adding the Gaussian-shaped emission line produce a better model than the Bremsstrahlung continuum alone?
  • What feature in your data did the Gaussian emission line fit? Are there other features that look similar? If so, where?
  • Do you think that you have found the best model for these data? Why or why not?
  • If not, then describe what features of the data the model seems to be missing.


A service of the High Energy Astrophysics Science Archive Research Center (HEASARC), Dr. Alan Smale (Director), within the Astrophysics Science Division (ASD) at NASA/GSFC

NASA Logo, National Aeronautics and Space Administration