Next: About this document ...
Cas A Supernova Remnant:
data reduction and analysis
Supernova remnants are extended sources that are very bright in the
x-rays. This manual takes you through the data reduction and spectral
analysis of a supernova remnant using data from two different
satellites.
The data reduction is done in xselect. You will look at the
observation, define regions and extract spectra.
Ftools are used to create files which can convert the spectra you
extracted in terms of the pulse height of an event into the implied
energy of the incoming photon.
Finally you will look at the spectra in XSPEC, and model it with
various classic models.
Cas A, Rosat analysis
ASCA Cas A analysis
- For the sake of brevity I have extracted the ASCA spectrum,
background files, RMF and ARF's for you. The process is similar to
that for ROSAT but not the same. For extensive detail on how to do
ASCA extraction consult the ABC guide at:
http://heasarc.gsfc.nasa.gov/docs/asca/abc/abc.html
- The imaging capabilities of ASCA are not as good as that of
ROSAT, so I have just extracted one region over the whole remnant. The
real value of ASCA is its spectral range and resolution, as you will see.
- Enter xspec by typing xspec at your prompt
- Enter the data, background and response files using the data file script
that I made in xspec:
XSPEC
@snr_all_data.xcm
- Set the plot device to an xwindow: cpd /xw
- Plot by energy rather than channels: setplot energy
- Plot the data on a logarithmic scale: plot ldata
- Notice the bumpy structure of the spectrum. From left to right,
starting with the large bump just below 2keV we have the emission
lines of Si, S, Ar, Ca, and the large bump on the right is Fe. Just
seeing these emission lines tells you that there is hot thermal,
highly ionized gas producing this emission.
- Try to fit various basic spectral models to the continuum emission in
this spectrum; bremsstrahlung, powerlaw, blackbody. You will also want
an absorbing column of hydrogen between you and the source, which
modifies these basic models by a multiplicative factor. Enter in a
model like so:
mo wabs(bbody)
or
mo wabs(brems)
or
mo wabs(power)
Just press return through the section where it asks you for starting
values of the parameters.
- Do a show par.
Given in the show par along the top are the model
components with component numbers in parenthesis. The parameters of
each component are then listed. The leftmost number is the parameter
number, use this for newpar commands. The second number is not useful,
it describes, out of the subset of parameters that are separate
degrees of freedom, what number parameter is this, just disregard
it. The third number tells you which model number is this parameter a
part of. Then there is a description of what the parameter is, then
its current value, then the estimated error on that value or frozen if
the parameter is frozen.
- Plot the model against the data using plot ldata. When
in doubt always look at the data.
- Fit these models to the data using few iterations and not too much
precision to get the fit started:
fit 10 100.0
where 10 is the number of iterations and 100.0 is the reduction in
chi-squared required from one iteration to the next. Later you will
want to increase the precision of the fit. You could also have just
tried to renormalize your model with a renorm command, and this is
useful if the model is simply incredibly way off to begin with but
once the fit is in the same ballpark as the data, it's better
to do a fit.
- Try all of these models first. See where in the spectrum they fit well
to the data and where they don't.
- With a wabs(bbody) model in place try adding in gaussian lines for the ion emissions.
- Add in a newcomponent model between the 1st and 2nd models like this:
XSPEC
addcomp 2 gaus
Input parameter value, delta, min, bot, top, and max values for ...
Mod parameter 2 of component 2 gaussian LineE keV
6.500 5.0000E
02 0. 0. 1.0000E+06 1.0000E+06
you enter 1.9
Mod parameter 3 of component 2 gaussian Sigma keV
0.1000 5.0000E
02 0. 0. 10.00 20.00
you enter 0.01
Mod parameter 4 of component 2 gaussian norm
1.000 1.0000E
02 0. 0. 1.0000E+24 1.0000E+24
you enter 0.1
Here you want to choose a Line Energy (the first parameter) that
corresponds approximately to one that you see on the graph of the
spectrum. The second parameter, the line width or Sigma, should be set
to be 0.01 because this is the resolution appropriate for ASCA. The
third parameter, the norm, should be set to 0.1 or less to start off
with so that it doesn't totally dominate the spectrum, but it doesn't
disappear either.
- Freeze the line width parameter, Sigma, because that is a
mission dependent parameter for our case and we don't want it to vary.
- Note also, you should be careful where you add a new component
to the model. If there is a multiplying model already present like
wabs, you will probably want this to modify the new component you are
adding so placing the new component between the multiplying model and
the additive model (brems, pow, or bbody) is the safest way to do
this. Addcomp 2 implies that the new model should be added between
models 1 and 2.
- When you add a new component always plot the data again.
- You may want
to tweak the parameters yourself before letting XSPEC do a fit. To do
this use the newpar command. For example if you can see that the line
energy you inputted is to the left of the actual emission line in the
spectra, and a show par command gives you:
11 4 5 gaussian LineE keV 1.750 +/
0.4215E
03
for the gaussian in question, you can change the Line Energy manually
by typing:
newpar 11 1.8
- After entering a gaussian, freezing the Sigma at 0.01, plotting
the data, and tweaking the parameters yourself a little, go ahead and
fit it, say fit 10 100.0.
- Add in another gaussian line for the Fe line, at around 6.5
keV. Do all the same steps as for the Si line.
- If you are using a bbody model you'll see that even with the
gaussian line, the fit at the higher energies is not that good. First
try increasing the precision of the fitting mode, say fit 10 1.0.
- It doesn't help, right? So try a different continuum model. You
can do this without taking away the gaussian lines by using a addcomp
to put in the brems model followed by a delcomp to remove the bbody
model. Make sure you've adding in the new component and taken the old
one away before running a fit or renorm.
- After fitting it you should see that the bremss model does much
better for the higher energy part of the spectrum.
- Play around with modelling the rest of the emission lines.
Appendix: Xspec command basics
- To enter XSPEC simply type xspec at your prompt. You will now be in
xspec and get an XSPEC
prompt.
- Basic commands in XSPEC
- help When in doubt within XSPEC simply type help. This will give
you a list of available commands. Typing the name of any of these
commands will give an explanation of their usage. You can get more
complete descriptions of all the commands I am about to list by using the
help command. To get out of help simply keep pressing return.
- exit exit xspec, quit also works.
- data filename Use this command to enter the spectral
file. Type data followed by the file name (or full location and name
of the file if it is in a different directory than your current
working directory)
- backgrnd filename Specifies the background file for
the data file.
- response filename Either the full multiplied
together rsp file or just the rmf file.
- arf filename The arf file.
- ig bad ignore channels that are flagged as bad.
- ig 1:0.0
0.2 10.0
** ignore channels for dataset 1, in the
given energy ranges, where the decimal place indicates that it is an
energy range not a channel number and ** indicates to go to the edge
of the existing data. This command can be used with channel numbers
also which would be indicated by the lack of a decimal point in the
range specification.
- not notice channels or energy ranges. Same syntax as ignore.
- cpd
xw Set plotting device to be an
xwindow.
- setplot energy Sets the coordinate system to the energy of
the channel rather than just the number of the channel.
- plot (ldata resid) Plot the data in the window opened by
cpd. You can qualify how you would like the plot done by specifying
ldata, which makes the y-axis logarithmic, or resid, which plots the
residuals if there is already a spectral model in use.
- model Enter in a model or combination of models, combined
using (,), +, *, or /. Some models such as brem, gauss, powerlaw,
(bremsstrahlung, gaussian, and powerlaw) are
additive models, they are directly associated with the emission of
photons. Some models, specifically wabs (an absorbing hydrogen column
model), are multiplicative models, they
modify existing models by an energy dependent factor.
An example of entering in a spectral model would be:
mo wabs(brems + gaus + gauss +gau) + wabs(pow)
which is equivalent to
model wabs*(bremss + gaussian + gaussian + gaussian) + wabs(powerlaw)
because xspec has command completion and will just fill in the rest of
the model name automatically without typing tab or anything.
After you have typed this XSPEC will prompt you for values of the
parameters to start fitting with. You can enter a value, make one
parameter equal to a factor times a previous parameter by typing
`` = 13 2.2'', if you want the current parameter
to equal 2.2 times parameter 13, or just press return for the default value.
- delcomp 3 Delete the third component in the model. When the
parameters of a model are given, the model is described at the top of
the display with numbers in brackets next to each model component.
- addcomp 2 gauss Adds a gaussian component to the model
between the current 1st and 2nd components. If there is a current
multiplicative model modifying the additive models you should be
careful to place the new model component such that it is within the
parentheses if you want it to also be modified by this same
multiplicative model.
- show (par, allfile) Show par lists the model parameters,
show allfile shows information about the files such as what the file
names are, the count rates and the noticed channels, show all
gives all this information.
- freeze 1
4,7,39 Freeze model parameters 1,2,3,4,7 and 39.
The number of a model parameter is listed at the far left-hand side
after a show par or a fit has been run.
- thaw thaw model parameters, same syntax as freeze.
It is best to freeze all but the
most important parameters first and then slowly thaw the rest of the
parameters if the model is a complicated one.
- fit 10 0.01 Fit the model to the data, using 10 iterations
and requiring a 0.01 reduction in chi-squared between iterations or
else a fit is found. Both the number of iterations and the level of
precision are optional parameters, although if you want to change the
level of precision you must also type in the number of iterations. The
default of the number of iterations and precision level is their most
recent value.
- newpar 6 11.0 change the value of parameter 6 to the
value of 11.0. If you want to set one parameter equal to a factor
times another parameter use newpar 15 = 6 0.55, which would make
parameter 15 equal to 0.55 times the value of parameter 6.
- save model filename Saves the current model and the
values of all its parameters as filename.xcm. You can re-enter a
previously saved model by typing
@filename.xcm
at the xspec prompt.
- save files 'filename' Saves the filenames of the data,
background, response files, and the ignored channels as filename.xcm. You can re-enter
the dataset you are working on after you've saved it by typing
@filename.xcm
at the xspec prompt.
- Word to the wise, or rather the speedy: Both xselect and xspec
have tab completion, so if you start typing a filename you can just
press tab and it will finish it for you.
Next: About this document ...
Terry &
1999-09-24