|
|
Model Issues - II
The mdefine command.
We have implemented a new command to define a model component
using an algebraic expression. This model component is evaluated
by an interpreter so is slower than if it had been
compiled. mdefine supports all standard arithmetic and
trigonometric operations.
For example
XSPEC> mdefine dplaw E**p1 + f*E**p2
defines a model comprising the sum of two power-laws.
Very sophisticated models are possible.
XSPEC> mdef sg exp(-E^2/(2*A*E))/sqrt(6.283*A*sqrt(E)) : con
defines a Gaussian convolution model whose sigma varies
as the square root of energy.
Line identification.
One of the central tasks with high resolution spectral
data will be to attempt to identify lines. We have
added a new command to print out all possible lines in
an energy range supplied by the user.
We have also written a Tcl script to automate line
fitting and identification. This requires a continuum
model to have been defined. The command adds successive
lines (either gaussian or lorentzian) up to a number
specified by the user. Initially it sets each line center
at the energy with the largest residual between data and
model then fits for the energy, width, and normalization
of the line.
|