Table models



next up previous contents
Next: The XSPEC/PLT parser Up: No Title Previous: Example

Table models

A very simple way of fitting with user-defined models is available for a particular class of models. These are models that can be defined by a grid of spectra, with the elements of the grid covering the range of values of the parameters of the model. For instance, for a one-parameter model, a set of model spectra can be tabulated for different values of the parameter (P1, P2, P3, etc.) The correct model spectra for a value P then is calculated by interpolation on the grid. The generalisation to more parameters works in the obvious way. The current maximum number of parameters is five and is set in filemodel.inc in the [SPECTRAL.INC] or spectral/inc directory. As with standard models, the spectra should be in terms of flux-per-bin and not flux-per-keV. Any set of energy bins can be used, and XSPEC will interpolate the model spectra onto the appropriate energy bins for the detectors in use. It is therefore a good idea to choose energy bins such that the spectrum is well-sampled over the range of interest. A description of the file structure for these models is given below. A table model is used in XSPEC by specifying atable or mtable in the model command (see §4.27, §5.2, §5.21).

The record length should be N=MAX(S*M+4*P,NP*4+40), where S, M and NP are defined below. Structure definitions for the header and parameter records can be found in the spectral include directory in tblmod.inc. At present, up to five parameters are allowed.

Record 1 is the header record (structure tblmod_head)

Records 2 - (P+1) are parameter records (structure tblmod_par)

Record P+2 are the model spectral energies

Records (P+3) - (P+2+H) are free space for the user

Records (P+3+H) - (P+2+H+NP(1)*NP(2)...NP(P)) are the grid of spectra

The spectral records are ordered :

	p(1,1),p(2,1),...,p(P,1)
	p(1,1),p(2,1),...,p(P,2)
        ....
	p(1,1),p(2,NP(2)),....,p(P,NP(P))
	p(1,2),p(2,1),...,p(P,1)
	....
	p(1,NP(1)),p(2,NP(2)),...,p(P,NP(P))

where p(I,J) is the Jth parameter value of the Ith parameter. The last parameter changes fastest.

A FITS format version of this file will be defined for v8.60.



next up previous contents
Next: The XSPEC/PLT parser Up: No Title Previous: Example



Keith Arnaud
Fri Nov 18 16:30:43 EST 1994