Skip to main content

Come analyze HEASARC, IRSA, and MAST data in the cloud! The Fornax Initiative is now welcoming all interested beta users.

Xspec Home Page


recorn: change correction norm for a spectrum

This model is a replacement for and improvement on the old xspec command recornrm. If a correction file is in use for a spectrum then its normalization can be fitted for using this model. The first parameter, which is not variable, is the spectrum number and the second the correction file normalization. The starting value of the second parameter should be set to the current value of the correction file norm (this can be independently set using the cornorm command).

Because recorn rescales the correction file rather than the model flux, the statistic depends on cornorm through the data, and the chain rule used to compute parameter derivatives would evaluate that dependence as zero. XSPEC therefore switches automatically to the slower full numerical differentiation algorithm whenever a free recorn parameter is present, and only for that fit. Earlier versions did not, and required

XSPEC>xset usechainrule no
to be given by hand; that is no longer necessary.

Unlike the other mixing models, which perform a single transformation spanning every data group, recorn is applied separately within each data group, because its first parameter names one spectrum. Each data group's copy of the component therefore has its own spectrum number and its own cornorm, and all of them appear in show par. To fit the correction norms of two spectra, put them in separate data groups and untie the second group's copy:

XSPEC>data 1:1 spec1 2:2 spec2
XSPEC>model recorn*phabs*powerlaw
XSPEC>untie 6-7
XSPEC>newpar 6 2
after which data group 1's copy corrects spectrum 1 and data group 2's corrects spectrum 2. Note the newpar: if the spectrum numbers are left tied, every copy corrects the same spectrum and only the last one applied has any effect.

par1 specnum: spectrum number
par2 cornorm: correction file normalization