guide to xspec

To begin type: xspec



All commands below are entered at the XSPEC> prompt.



Commands listed in approximate order of usage.



Commands
Command Description
Sample Command
Information Returned after Command execution
data filename.pha
Enters data into xspec. Best to enter data before entering response file.
data casa_spec.pha
Brief information about file.

response filename.rmf or filename.rsp
Selects response file for data file.
Chandra response files have .rmf extension;
 EXOSAT response files have .rsp extension.
response acis.rmf

(this file needs to be selected from the list at
the Chandar rmf page)

cpd plotting device
Selects a device to plot the spectrum.
cpd /xw
Graph screen appears with contact information.
plot data
Plots the data file using the selected device.  Good to do after any change to data.
plot data
Plot of spectrum appears.
ignore bad
Ignores obviously bad data points in the spectrum.
ignore bad

ignore value1-value2
Removes the range of data points from the the spectrum data. Can remove a defined range or from one end of data to a defined point, i.e. first 60 points (**-60)
ignore 60-100
ignore 60-**
ignore **-60

setplot energy
Changes x axis values from Channels to Channel Energy (keV).
setplot energy

model phabs(spectrum law)
Attempts to model function based on one of the three spectrum equations: Powerlaw, Blackbody, Thermal Bremsstrahlung.
Plot data will now show the most current model on the plot with the spectrum.  Fit statistics displayed after the default values are entered give an idea of the fit. Reduced chi squared should be close to one and the null hypothesis probability should not be small for a good fit. Usually, fit is not good with default values.
model phabs(powerlaw)
model phabs(bbody)
model phabs(bremss)
Displays prompt to enter parameter values.  Press <Enter>
three times to accept all default values. Displays default parameters and fit statistics.
renorm
Multiplies entire current model by a factor calculated from data.
Generally gives a better fit.
renorm
Displays new parameters and fit statistics.
fit
Attempts to find a lower chi squared to match data with a better fit. Will only try 10 sets of values without user telling it to continue. After fit found or user stops searching, it will display new fit statistics.
fit
Displays the sets of values it attempted and prompts to continue fitting. After searching, displays new parameters and fit statistics.
plot data residuals
Creates a plot of data residuals beneath the spectrum plot.
plot data residuals

flux
Determines the flux of the object.
flux
Displays flux value in photons/cm2/s and in ergs/cm2/s.