Plotting the Model and Data
With the first fit of your data complete, you should look at the data and model to see
how well they match up. Xspec can plot the data and model for you to inspect.
First, however, you will want to change one of Xspec's defaults. By
default, Xspec will plot the "channel" of the data on the x-axis. The
channel is related to energy of the detected light. However, the
channel-to-energy conversion will be different for different detectors,
and in the same detector, it may change over time. To make the results
more meaningful, you will want to have the plot display photon energy on
To change the plot from "channel" to energy, type the following in
the Xspec command window:
Now, to put Xspec into plot mode, type to following:
With Xspec in plot mode, you can make the plot prettier by changing
the limits on the x-axis and adding color to the data to make the model
stand out more. The following commands will do this for you:
rescale x 0.2 5.0
color 2 on 1
Plot showing the data (red) and model (black) for the initial fit of
the SNR spectrum in Xspec.
If you are able, you may want to print the graph, so you can compare this graph with
the final version. (Click here if you need
instructions on printing the graph.)
When you are finished tweaking the look of the plot, you will want to leave
Xspec's plot environment by typing:
During the rest of this activity, you can update the plot with
changes you make to the model and fit using the easyplot command like this:
easyplot 0.25 5.0
The 0.25 and 5.0 in the above command set the x-axis limits.
Answer these questions about your current model and plot:
- Note the chi-squared for this fit. (Found in the Xspec Command
- How well does the model match the data?
- Are there places where the model matches particularly well?
- Are there places where the model matches particularly poorly?
- 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.