## Tweaking the Model

# Tweaking the Model

Your answers to the questions on the previous page might indicate that the model doesn't really fit the data yet. The overall shape seems to be there, but there are parts of the model that don't quit fit the data. If you didn't see it, look closer at the plot between 2.5 and 5 keV. (You can plot this yourself with the easyplot 2.5 5.0 command.)

Detail of the plot of the fitted blackbody model.

Since the problem with the model seems to affect a wide range of energies (not like an emission or absorption line, which would be a prominent peak or dip in the data), it might be best to add another continuum model to the data.

Astronomers have found, through modeling other systems like this, that often the accretion disk has a "hot corona" surrounding it, which can be modeled by a powerlaw model. A powerlaw looks like a straight line when it is plotted on a log-log plot, and is often used to model emission in astronomy that comes from a non-thermal process. What that means is that the process is not driven by the temperature of the medium, but rather by other interactions between the atoms in the medium.

The powerlaw model in Xspec has two free parameters:

- PhoIndex, also called the "photon index", this is the slope of the powerlaw, if it were plotted on a log-log plot
- norm, a measure of the intensity of the powerlaw spectrum

Add a powerlaw component to your model. To do this,
type:

model wabs * (bbody + powerlaw)

into the Xspec Command Window.

Hit return to accept the default values for all model parameters.

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

fit

into the Xspec command window.

Note that Xspec will go through a set number of trials trying to
maximize the fit between the model and the data. For your previous fit,
Xspec found the best fit before it hit the maximum number of trials.
However, this time Xspec will reach the maximum trials before finding
the best fit. When it reaches the maximum trials, it will pause with
the following message:

Number of trials exceeded: continue fitting?

Since you want Xspec to find the best fit, hit return each time you see
that message.

By hitting the return button, you are telling Xspec to continue trying to find the best fit. You will have to hit return a few times before Xspec finds the best fit and returns to the Xspec prompt (XSPEC12>)

After one attempt at fitting the spectra. When asked whether to continue fitting, hit Return. (Click for a larger view.)

When Xspec has finished fitting, you will see a summary of the fit above the prompt. When Xspec has finished the fit, look at the results. What is the best-fit value for the PhoIndex of the powerlaw you entered? You should see that it is about 2.78.

Screen capture of the Xspec command window showing the results of fitting the model with a powerlaw continuum 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 plot window showing the results of fitting the model with a powerlaw continuum added.

## 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 powerlaw continuum produce a better model than the blackbody continuum alone?
- What feature in your data did the powerlaw continuum 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.