Imagine the Universe!
Imagine Home  |   Teachers' Corner | HERA Overview  | Using HERA for Spectroscopy  |  

Adding More Emission Lines

You probably noticed that the addition of that one Gaussian helped improve your model, particularly the spike at about 1.01 keV. Your model should improve even further if you add two more Gaussian emission lines to model the other two large peaks in your spectrum.

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.

Start by adding a second Gaussian to model the middle emission line. To do this, look back at your graph. The middle emission line appears to peak somewhere between 0.8 and 1.0 keV. Choose an energy in that range where you think the peak occurs, and then add a Gaussian line for that second peak. Type:

addcomp 2 Gaussian

When you see the following:

2:gaussian:LineE>

you want to enter a string of numbers here to give Xspec your initial guess for the peak energy along with a range of possible values for that peak. (Look back at the previous page if you need to see how these numbers were entered for the last Gaussian you added to your model.).

Each of the numbers you add is separated by a space. Those numbers should be:

  • your guess for the peak energy of the second emission line
  • 0.05, the "Delta" that tells Xspec how to step through the possible peak energy values
  • 0.8, the lower limit for the possible range of energies for the second emission line
  • 0.8, the lower limit again
  • 1.0, the upper limit for the possible range of energies for the second emission line
  • 1.0, the upper limit again

For example, if you guessed that the energy peaked at 10 keV (which isn't a very good guess, since it's not in the range!), then you would type in the following:

10 0.05 0.8 0.8 1.0 1.0

Once you've typed in your string of numbers, hit "return". Then, hit return two more times to accept Xspec's default values for this line's Sigma and normalization.

Before fitting the current model, add one more Gaussian emission line to model the remaining peak in your spectrum. Look at your graph and determine the approximate peak energy of the remaining emission line and the range of possible values for that peak. As above, add another Gaussian to you model by typing:

addcomp 2 Gaussian

When you see the following:

2:gaussian:LineE>

enter the string of numbers as before, with the appropriate values for your initial guess and minimum and maximum possible values (keep "delta" the same!).

Then hit "return". For the other two parameters, the Sigma and normalization, hit "return" to accept Xspec's default values.

Now you are ready to fit the model. Type:

fit

Remember to hit "return" if the fit pauses with the message:

Number of trials exceeded: continue fitting?

If words seem to be missing from the articles, please read this.

Imagine the Universe! is a service of the High Energy Astrophysics Science Archive Research Center (HEASARC), Dr. Alan Smale (Director), within the Astrophysics Science Division (ASD) at NASA's Goddard Space Flight Center.

The Imagine Team
Project Leader: Dr. Barbara Mattson
Curator: Meredith Gibb
Responsible NASA Official: Phil Newman
All material on this site has been created and updated between 1997-2014.
This page last updated: Thursday, 25-Mar-2010 08:54:57 EDT