Generating fake spectra in Xspec
Before starting
First try at generating a fake
spectrum
- In these instructions, a semicolon means hit Enter.
- Move to your suzaku directory (cd suzaku)
- Start xspec
- Set up an absorbed powerlaw model with a column density of
2E21 cm-2, a photon index of 2.0, and a normalization of 1.0
- model wabs*pow; 0.2; 2.0; 1.0;
- Create a fake spectrum
- fakeit none; spec1.rmf; spec1.arf; y; pow; ; 1000;
- This makes one fake spectrum using the suzaku response
files and Poisson statistics. The spectrum is saved as
powspec1.fak and is for a 1000 second exposure with no
background.
- Set the horizontal axis to be energy (setplot energy)
- Ignore low and high energies (ignore **-0.4; ignore 5.0-**)
- Plot the data on a log scale (plot ldata)
- Try fitting the data with the absorbed powerlaw model (fit)
- Plot the data and the residuals (plot ldata delchi)
- Now you know how to generate fake spectra in xspec and fit
them.
Using the apec model to find the oxygen line emission as a
function of temperature
The assignment is to use the apec model to generate spectra for
various temperatures in the range from 105 K to 107
K, then fit each spectrum to measure the strength of the oxygen O
VII and O VIII lines and plot the strength of those lines and their
ratio as a function of temperature. To complete the
assignment, you will need to generate spectra using fakeit as
described above but with an apec or vapec model and then fit those
spectra using model that is a sum of vapec and gaussians, as in the
data analysis assignment.
Some hints:
- The spectra should be generated for a plasma with cosmological
element abundances.
- You might want to think about how long an exposure you want to
simulate and whether or not to use photon statistics.
- You might want to think about whether or not you need an
absorption component.
- The apec model, and xspec in general, use keV for
temperatures, not Kelvin. However, your final plot should be in
Kelvin. You could also make one in keV if you like.
- Astronomers like log scales. You might bear this in mind when
picking your set of temperature values. You need enough values
to clear show any features in the curves of line strength versus
temperature.
- You might be able to save some effort using xspec scripts and
the 'save model' command, which you can read about in the
manual.
- If you are familiar with python, you might use matplotlib to
plot your results.
You should hand in (not necessarily in this order):
- Your plots of line strength and line ratio versus temperature.
- A table of the data went into the plot.
- A list of the xspec commands that you used to generate one of
your fake spectra.
- A list of the xspec commands that you used to fit that same
spectrum.
- A description of the process, including answers to the 'might
think abouts' above and a description of your plotted results.