Frequently Asked Questions
1. Help! Help doesn't work.
2. In v11 I used to be able to include background models using a '/b'
modifier. How do I do this in v12?
3. I need the v11 extend command.
4. I'd like to use the XSPEC model library in my program. What do I do?
5. How do I calculate the flux from only one component of my model?
Can I get an error on this?
6. When I do a flux error the error range given does not include the
value calculated by the flux command.
7. I have an ascii optical /UV fluxed spectrum which I would like to include
in a fit in XSPEC. How do I do this?
8. How can I get XSPEC to automatically perform a set of commands
on start-up (including loading my local models library)?
9. What is meant by a "named" model and when are names necessary?
1. Help! Help doesn't work.
If typing "help [command]" at the XSPEC prompt doesn't bring up a
document window in either pdf or html format, you may need to edit your
initial settings file ~/.xspec/Xspec.init. In the section "options and
commands for displaying helpfiles," the USE_ONLINE_HELP setting determines
if help will open online html web pages, or the distributed help pages
in pdf format.
For online viewing, the html settings should simply be set to the
name of your browser (in lower-case) unless you're on a Mac or Cygwin.
For Mac's it should be set to "open" and for Cygwin "cygstart."
Similarly the pdf viewer is set through the PDF_COMMAND variable.
Suggested settings for various platforms are listed in the file.
2. In v11 I used to be able to include background models using a '/b'
modifier. How do I do this in v12?
In v12 it is possible to assign multiple detector responses to a
spectrum and to define unique models for each detector number. This
replaces and expands what was possible with the '/b' feature. For
example, a second detector response can be added to spectrum 1:
XSPEC12>response 2:1 backgroundResponse.pha
and a corresponding model:
XSPEC12>model 2:backgroundModel
see the response
and model
commands for more information. An example is
also available.
3. I need the v11 extend command.
The v11 extend command has been replaced by the more general
energies command. With extend, the energy array was still partly
constrained by the original response energies array. energies however
allows you to replace the response energies with any arbitrary array,
including one that can be read in from an ascii text file.
4. I'd like to use the XSPEC model library in my program. What do I do?
XSPEC models are contained in the library libXSFunctions, which can
be linked into your program. The file Xspec/src/XSFunctions/xsFortran.h
contains a collection of helper functions for interfacing with the XSPEC
models and can be called in C, C++, and Fortran. See
Appendix F for
more information and a sample Makefile.
5. How do I calculate the flux from only one component of my model?
Can I get an error on this?
There is a new model component
cflux which can be used in front of any
component (or combination of components) for
which you want to calculate the flux. This
component makes the flux a parameter so its
confidence interval can be calculated in the
usual fashion.
6. When I do a flux error the error range given does not include the
value calculated by the flux command.
This is possible and does not necessarily
indicate that something has gone wrong. The
flux error is calculated by generating
parameter sets and for each parameter set
calculating a flux. The fluxes are ordered and
the eg 90% range derived by excluding the
bottom and top 5%. The parameter sets are
drawn from an estimate of the posterior
distribution which assumes a multi-dimensional
Gaussian with correlation matrix given by the
matrix of second derivatives at the best
fit. This may not be a good estimate if
parameter space is complicated. We intend to
replace this by a better method involving
Markov Chain Monte Carlo.
7. I have an ascii optical /UV fluxed spectrum which I would like to include
in a fit in XSPEC. How do I do this?
You can convert ascii files of fluxed spectra
into XSPEC spectra and unit diagonal response
matrices using the ftool flx2xsp. Type fhelp
flx2xsp to read how.
8. How can I get XSPEC to automatically perform a set of commands
on start-up (including loading my local models library)?
You can create a file xspec.rc in your ~/.xspec directory and place
in it valid commands which will be executed upon start-up. If you've
already built your local models library with the initpackage command,
you can add "lmod mylibrary" (without the quotes) to xspec.rc and it will
load everytime you start XSPEC (except on Cygwin).
For those maintaining XSPEC for a group of users, you can also add
commands to be executed for every user on start-up. These should be
placed in the file headas/spectral/scripts/global_customize.tcl and
will be executed before the users' xspec.rc commands. See the
subsection "Customizing XSPEC" in the manual's
Xspec Overview for more information.
9. What is meant by a "named" model and when are names necessary?
One of the key enhancements of XSPEC12 is the ability to analyze
with multiple models. Whenever you want to define more than one model,
XSPEC requires names to distinguish among them. For example:
Define an unnamed model for detector source 1. This is also the way
models are defined in XSPEC11.
XSPEC12>model wa(po)
Now define a second model with the name "anotherModel," to be applied
to source detector 2.
XSPEC12>model 2:anotherModel wa(ga)
Define a third model, this time for source 1 which will render the first
model inactive:
XSPEC12>model 1:stillAnotherModel bbody
See the model command help and its use of the active/inactive options for
more information.
|