STScI Logo

models_spectral xray.xspectral



models_spectral -- description of available spectral models in xspectral


This document contains a description of the spectral models available to the user community for spectral analysis in the IRAF/PROS xspectral package.


Spectral analysis in PROS involves comparing an observed spectrum with a trial spectrum generated by convolving a spectral model with the calibrated telescope and instrument response. The spectral model is described by means of an ASCII model descriptor . This model descriptor consists of one or more spectral components . Each component consists of a keyword (e.g., powerlaw , blackbody , etc.) and one or more parameters associated with that keyword. For example, the power law has two parameters, namely, the normalization and energy index:

	power (-2.4, 1.7)

Spectral components are combined into a spectral model using the "+" operator.
For example:

	power (-2.4, 1.7) + black (-2.3, 2.5)

defines a model consisting of a power law component and a black body component.

The following component keywords are defined:

component:	parameters:	parameter names:

powerlaw	2	  	log(normalization), energy index
bremsstrahlung	2	  	log(normalization), temperature
exponential	2	  	log(normalization), temperature
blackbody	2	  	log(normalization), temperature
raymond		4	  	log(normalization), temperature,
				     abundance table, abundance percent
line model	3	  	log(normalization), line-energy,

Parameters are defined as follows:

For models other than the Raymond-Smith thermal plasma,

energy index      = spectral energy density distribution power-law
temperature       = Temperature in the source frame in keV
log normalization = log of the 1 keV flux density [units
			keV/cm**2/s/keV] in the observer's
			frame corrected for any absorption.
                    (Except see \fINOTES for NORMALIZATION\fR below.)
line-energy       = line centroid energy in the source frame in keV
line-width        = FWHM of the line in keV

For the Raymond-Smith thermal plasma,

log normalization = log of (volume emission measure/4 pi D**2)
	[units cm**-5] where D is the distance to the source in cm
temperature       = Temperature in the source frame in keV
abundance table   = choice of "cosmic" or "meyer"
abundance percent = the abundance of heavy elements (z>2) relative
		    to that given in the abundance table in percent.
                    Choices are 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90,
                    100, 110, 120, 130, 140, 150, 200, 300, 400, 500.
All values are real, except for the abundance table, which is either "cosmic" or "meyer", and the abundance percent which is integer. Integer values specified for real quantities will be automatically converted to real.
For the line model,

log normalization = Normalization of the gaussian in units of 
Components can be specified using "command" syntax:

	<component> arg1 arg2 ...

or using "routine" syntax:

	<component>(arg1, arg2, ...)

or by any combination of the these. (Of course, parentheses must balance and there cannot be more commas than necessary.) The component keywords are case insensitive.

Furthermore, all components can be specified by their unique abbreviation. For example, one can specify three components as:

	"POWERLAW -2.4 1.70 + black(-2.0 1.5) + exp(-2.3,1.6)"

(Quotes are required when a model descriptor is placed on an IRAF command line. They are not required when a model descriptor is input in response to an IRAF parameter query.)

See the spectral science specifications for more information about individual model components.


The parameters that are associated with a component can be fixed or free when spectral fitting is performed. To make a parameter fixed, simply give the fixed value as is shown in all of the above examples. To free a parameter, one specifies the low and high value over which the parameter is allowed to vary, separated by the ":" operator. For example:

	pow(-2.4, 1.5:1.9)

specifies that the normalization (first parameter) is fixed, while the energy index is allowed to vary between 1.5 and 1.9.

N.B.: For the Raymond model, the current spectral code will not allow the abundance table and abundance percentage to be free parameters.


Galactic and intrinsic absorption can be applied to components of a model, both individually and in combination. Absorption is applied to one or more components using the absorption keyword and the "*" operator. The general syntax for applying absorption to a component is:

	absorption(params) * component(params)


	abs(21.0,0) * pow(-2.43, 1.070)

The number of arguments supplied to the absorption component specifies the type(s) of absorption being applied. If one argument is supplied, it is log10 of the galactic hydrogen column density in units of atoms per square cm. If two arguments are supplied, the first is the intrinsic hydrogen column density in units of log10 atoms per square cm and the second is the redshift at the source of the intrinsic absorption. When three arguments are supplied, the first is the galactic column density, the second is the intrinsic column density, and the third is the redshift at the source of the intrinsic absorption. That is:

	absorption(log galactic_Nh)
	absorption(log intrinsic_Nh, redshift)
	absorption(log galactic_Nh, intrinsic_Nh, redshift)

Thus, in the example above, intrinsic absorption with a column density of 21.0 and a redshift of 0 is applied to the power law component.

The absorption parameters can be specified as being fixed or free in the same manner as the other component parameters: a single value implies a fixed parameter, while a free parameter is described by the range over which it is allowed to vary. Thus

	abs(19:23,0) * pow(-2.43,1.070)

defines a model in which the intrinsic absorption varies between 19 and 23, while all other parameters are fixed. Also unique abbreviation, case insensitivity, etc. all apply to the absorption as well as the automatic conversion of integer values to float, etc.


A model component is assumed to be at zero redshift unless it is modified by absorption at a non-zero redshift.In this case the model component takes on the redshift of the absorption. To define a model component at a non-zero redshift with no intrinsic absorption, one must multiply by an absorption whose redshift is that desired and whose log(column density) is sufficiently small to have no effect, e.g.,

	abs(15.0,2.1) * pow(-2.43, 1.070)


As already mentioned, absorption can be applied to more than one component at a time. The syntax for doing this applies the "associative" rule, using the "*" and "+" operators as follows:

	abs(params)*(comp1(p1) + comp2(p2) + ... + compn(pn))


	abs(21.0,0) * (pow(-2.43, 1.070) + bla(-2.5,1.5))

When the absorption parameters are fixed, this is an equivalent (but shorthand) way of explicitly applying absorption to each component, i.e.,

	abs(21.0,0)*pow(-2.43, 1.070) + abs(21.0.0)*bla(-2.5,1.5))

However, when one or more absorption parameters are free to vary, then using the "associative rule" to apply absorption causes the free parameter to be linked among the components. In this way, the same absorption can be applied to two components, varying identically during the fit, but contributing only one free parameter to the model. Thus, for example,

	abs(19:23,0)*(pow(-2.43, 1.070) + bla(-2.5,1.5))

has one free absorption parameter, not two, which is applied to both components of the model during a fit. This should be contrasted to a situation such as the following,

	abs(19:23,0)*pow(-2.43, 1.070) + abs(19:23,0)*bla(-2.5,1.5)

in which there are two free parameters that vary independently.


Any two or more free parameters can be linked between components or between absorptions. To do this, one chooses a "base" parameter, and links other parameters to the base. The base is specified by appending the symbol "L" or "l" and an arbitrary number between 1 and 49 to the free parameter specification. (Values of 50 and above are reserved for implicit linking of absorption params.) Parameters to be linked are specified by inputting the same "L<n>" identifier instead of a value. Thus,

	abs(19:23,0)*(pow(-2.43, 1.0:1.3L1) + pow(-2.5, L1))

specifies that the energy index of two power law components are to be linked so that they vary together during a fit. In this example, there are two free parameters, not three.

Note that the statement

	abs(19:23,0)*(pow(-2.43, 1.070) + bla(-2.5,1.5))

is equivalent to

	abs(19:23L1,0)*pow(-2.43, 1.070) + abs(L1,0)*bla(-2.5,1.5))

Both define a model in which one free absorption parameter is linked to two components.


The normalization value of the first model component can be omitted, thereby specifying it as a calculated `free' parameter. In this case, the value is adjusted to minimize the chi-square sum. For example,

	abs(19:23,0) * pow(1.070)

specifies two free parameters: the galactic absorption (which will be varied between log Nh=19 and log Nh=23) and the power-law normalization (N.B. - see NOTES regarding NORMALIZATION below).


Special functions are defined which can be used in place of real values for parameters, where ever this makes sense. The following functions are currently defined:

function:			description:

log				log (base 10)

Thus, for example, one can input the absorption as:


instead of


if the user has access to the actual value instead of the log for a given parameter.


Model expressions can be stored in files, called include files. Model files usually have a ".mod" extension in their names. When a model file name is given as an argument, it is not necessary to include the ".mod" extension. The exception to this rule occurs if a model file has the same name as a valid keyword. Its specification must then include the ".mod" extension to distinguish it from a keyword. For example,

#	foo1.mod - a test model file
abs(19:23,0) * (power(-2.43, 1.070) + black(-2.5,1.5))

Model descriptors can be a mix of models and model files. For example:

#	foo2.reg - a test model file that combines another model file
#	(the actual parameter values might not make sense!)
abs(19:23,1) * (power(-2.43, 1.5) + black(-2.5,1.5))

Note that, in the above examples, the comment character, "#", causes the following text to be ignored up to the new-line character. The new line between foo1.mod and the rest of the model descriptor represents an implicit `+'.


Two types of absorption are available to the user, "morrison-mccammon" and "brown-gould". The type of absorption used is normally controlled by the absorption parameter in the pkgpars task. However, it is possible to explicitly specify the type of absorption to use as part of the model descriptor, by using either the "morrison_mccammon" keyword or the "brown_gould" keyword (or any unique abbreviation). Thus, for example,

	brown; abs(19:23,1) * (pow(-2.43, 1.5) + bla(-2.5,1.5))

specifies use of "brown gould" absorption in this model.


The show_model task can be used to display various information about a model and its parameters, including the fixed/free state of parameters, the link state of parameters, free parameter ranges, etc. For example, the model given by:

	abs(19:23,0) * (pow(-2.43, 1.0:1.3L1) + pow(-2.5, L1))

will be displayed as follows by show_model:

Model: abs(19.00:23.00,0.00) * (pow(-2.43, 1.00:1.30L1) + pow(-2.50  L1))

Model Component 1: Power Law 
      energy index = 1.150 (free L1) 
  normalization (log) = -2.4300 (fixed) <- (absolute value = 0.0037)
  galactic Nh (log) = 0.000 (fixed) 
  intrinsic Nh (log) = 21.000 (free L58) 
      redshift = 0.000 (fixed) 

Model Component 2: Power Law 
      energy index = 1.150 (free L-1) 
  normalization (log) = -2.5000 (fixed) \fI<- (ratio\fR: 0.3% of Model 1)
  galactic Nh (log) = 0.000 (fixed) 
  intrinsic Nh (log) = 21.000 (free L-58) 
      redshift = 0.000 (fixed) 

Notice that the intrinsic NH value is implicitly linked (with "L value" of 58) in both components, while the energy index is explicitly linked (with "L value" of 1). The positive "L value" indicates the "base" parameter, while the negative "L value" indicates a linked parameter. Thus for a given "L value", there will be only one positive value, but there can be more than one negative value.

The model given by:

	abs(19:23,0) * pow(1.070)

will be displayed by show_model as follows:

Model: abs(19.00:23.00 0.00) * pow(1.07)

Model Component 1: Power Law
	energy index = 1.070 (fixed)
    normalization (log) = 1.0000 (calculated)
    galactic Nh (log) = 0.000 (fixed)
    intrinsic Nh (log) = 21.000 (free)
	redshift = 0.000 (fixed)

Note that the normalization (of the "Model Component 1") is a calculated parameter whose initial value is set to 1 (arbitrarily). After fitting, all of the fit tasks (i.e., fit , search_grid , and singlefit ) perform a show_model, which displays the calculated normalization value of the "Model Component 1" (and, if present, the user-specified values of relative normalization for the remaining model components).


Whenever multiple model components are specified, the normalizations of all but "Model Component 1" are maintained as relative values: the user must specify subsequent normalization values relative to that of the "Model Component 1" value (e.g., log(0.5) or -0.3, specifies that the normalization be 50% that of the first model).

The singlefit task fixes the log(normalization) value of the first component at 1.0 (i.e., it does not adjust the normalization to fit the spectrum); hence the normalization must be specified explicitly in order to obtain a useful result.


fit, singlefit, search_grid, show_model

Search Form · STSDAS