The XSPEC dragon

Softly dripping tap
The morning e-mail brings news
of another xspec bug

XSPEC v11.3.2 Known Issues


Recompilation instructions. Most patches require recompilation of XSPEC. Please follow the instructions below if necessary
  1. If you have compiled xspec for other machine architectures since you originally installed it, you will need to reconfigure the package for your current machine. To do this:
    • cd {distribution root}/BUILD_DIR
    • ./hmake distclean
    • ./configure

  2. Do the standard set-up of environment variables (here are the csh & variant instructions) :
    • setenv HEADAS {distribution root}/{architecture}, where architecture is the architecture specific directory, such as Linux_2.2_i686 or SunOS_5.6_sparc
    • source $HEADAS/headas-init.csh

  3. If you build with local models make sure to setenv LMODDIR to your local model directory.
  4. Change directory to {distribution root}/ftools/spectral/xspec/src

  5. type "hmake", followed by "hmake install". If you cleaned the distribution, then this will recompile the xspec binary from the beginning (but not the libraries upon which it depends).

New Issues from XSPEC 11.3.2

All of the changes below [including the ones to which links to separate source code blocks are given] can be effected by downloading the latest patch tarfile, uncompressing it in the xanadu top source directory ($HEADAS/../ftools) and recompiling XSPEC. The patchfile also updates the version string [11.3.2aj at present]. The most recent bug was added on Nov 26, 2007.
11.3.2a
Reading type II pha files causes a seg fault when running under Linux or Solaris. A workaround is to add keywords XFLT0001, XFLT0002,...,XFLT0010 to the spectrum extension. Our thanks to Craig Markwardt for pointing this out. Bug report added on Apr 18, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/FILE/rdsfg2.f and rebuild xspec.

11.3.2b
xspec 12.2 uses the fortran routine fgmodf to return the standard directory location for files required by models. However, xspec 11.3.2 uses fgdatd to perform the same function. To make it easier to include local models in both versions a routine fgmodf has been added to v11.3.2. Our thanks to Roderick Johnstone for pointing out this inconsistency Bug report added on Apr 18, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/fgunc.f and rebuild xspec.

11.3.2c
The compps model seg faults under Linux. Our thanks to Marek Gierlinski for reporting this. Bug report added on Apr 19, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/comprefl.f and rebuild xspec.

11.3.2d
The gaussian line model can generate a seg fault if the part of the line falls below the first response energy. Our thanks to John Houck for reporting this. Bug report added on May 9, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xsgaul.f and rebuild xspec.

11.3.2e
The posm model calculates the function at the upper boundary of the energy bin. A more accurate strategy is to use a trapezoid integration over the bin. Our thanks to Chris Shrader for the change. Bug report added on May 23, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xsposm.f and rebuild xspec.

11.3.2f
The projct model seg faults when used with more than 25 shells. Our thanks to Glenn Morris for reporting this. Bug report added on Jun 3, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/projct.f and rebuild xspec.

11.3.2g
The tclout simpars command occasionally seg faults under some systems. Our thanks to Piero Ranalli for spotting this. Bug report added on Jun 7, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/COMMAND/tclout.c and rebuild xspec.

11.3.2h
The NEI models do not respond to the abund command ie the relative abundances are always from Anders & Grevesse. Our thanks to Terry Gaetz for reporting this. Bug report added on Jun 9, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/neispec.f and rebuild xspec.

11.3.2i
The APEC models can seg fault on some systems. The fix also speeds up the model slighly in cases when it doesn't seg fault. Bug report added on Jun 14, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xsgaul.f and rebuild xspec.

11.3.2j
There are a couple of bugs in the kerrbb model. In the model definition file Mdd and Dbh are switched while in the code rflag and lflag are swapped. Note that these bugs were fixed at the end of Jan 05 in the version available on the new models page but the fixes were not included in the new release due to an oversight. Bug report added on Jun 28, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/kerrbb.f, $HEADAS/../ftools/spectral/xspec/src/local_mod/model.dat and rebuild xspec.

11.3.2k
Machine round-off errors can produce large discontinuous jumps in Cstat when model parameters are slowly varied, particularly for data files with very few counts. (This is the same bug fixed as 12.2.0bh.) Bug report added on Jul 14, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/calcml.f, and rebuild xspec.

11.3.2l
When using more than 15 datasets simultaneously, datasets 16 and above are not plotted. This occurs because PGPLOT only defines 15 colours. The fixed version cycles through the colours. Our thanks to Steve Snowden for reporting this. Bug report added on Jul 18, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/pltfld.f, and rebuild xspec.

11.3.2m
The chain file is limited to 512 characters in a line. Extended this to 2048 characters to allow more parameters to be used. Our thanks to Jeremy Sanders for suggesting this. Bug report added on Aug 11, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/MCMC/runchn.f, $HEADAS/../ftools/spectral/xspec/src/MCMC/mcfile.f, and rebuild xspec.

11.3.2n
The log filename is limited to 80 characters. Using a longer filename causes seg faults. The allowed length has been increased to 1024 characters. Our thanks to Jeremy Sanders for reporting this. Bug report added on Aug 30, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/tcl/tcllog.c and rebuild xspec.

11.3.2o
Using cstat with a background file on an x86_64 produces a NaN for the fit statistic. Our thanks to Jeremy Sanders for reporting this. Bug report added on Sep 14, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/calcml.f and rebuild xspec.

11.3.2p
Type II spectral files no longer require a CHANNEL column (which was inefficient if there were many rows). This does mean that all channels in the spectrum must be included in the file since if any are excluded there is no way of working out which ones are left. Enhancement report added on Oct 22, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/FILE/rddtg1.f, $HEADAS/../ftools/spectral/xspec/src/FILE/rdgrpc.f, $HEADAS/../ftools/spectral/xspec/src/FILE/rdsfg2.f, and rebuild xspec.

11.3.2q
A seg fault may occur if the table model filename is left off in a model command. Our thanks to Ingo Kreykenbohm for reporting this. Bug fix added on Dec 12, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/MODEL_COMP/mtchmd.f and $HEADAS/../ftools/spectral/xspec/src/MODEL_COMP/motble.f then rebuild xspec.

11.3.2r
Several models may seg fault on x86_64 systems. Our thanks to Roderick Johnstone for reporting this. Bug fix added on Dec 14, 2005.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xsbexrav.f, $HEADAS/../ftools/spectral/xspec/src/functions/xspexrav.f, $HEADAS/../ftools/spectral/xspec/src/functions/xspexriv.f, $HEADAS/../ftools/spectral/xspec/src/functions/xsnteea.f then rebuild xspec.

11.3.2s
In rare circumstances plots with the ratio as the lower panel can produce garbage due to a floating point overflow. Our thanks to Ryan Porter for reporting this. Bug fix added on Mar 23, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/pltfld.f, then rebuild xspec.

11.3.2t
When there are many counts/bin a spurious warning message about non-Poisson data can be generated by the stat cstat command. Our thanks to Glenn Morris for reporting this. Bug fix added on Mar 28, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/ispoiss.f, then rebuild xspec.

11.3.2u
Memory allocation errors in the tclout and fakeit commands can cause seg faults on some systems. Our thanks to Jeremy Sanders for the report and the fix. Bug fix added on Jul 24, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/fakeit.c and $HEADAS/../ftools/spectral/xspec/src/COMMAND/tclout.c, then rebuild xspec.

11.3.2v
The second number produced by the tclout compinfo command is wrong - it is one too few. Our thanks to Jeremy Sanders for the report. Bug fix added on Jul 28, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/COMMAND/tclout.c then rebuild xspec.

11.3.2w
The documentation on the lorentz model is incorrect. The second parameter is the FWHM not the sigma. Our thanks to Mariano Mendez for pointing this out.

The fix is to replace $HEADAS/../ftools/spectral/xspec/help/xspec.hlp then hmake install.

11.3.2x
Changed the chatter level of the warning message from tabulated models which occurs when the response energy range extends outside the range tabulated for the model. Now only writes if chatter is set to 15 or higher. Also fixes bug that caused the message to be written when it should not have been. Our thanks to Jeremy Sanders for reporting this. Bug fix added on Nov 7, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/inibin.f then rebuild xspec.

11.3.2y
If the weight command is given before any dataset is read in then it has no effect and requires that the next invocation explicitly specify the dataset range else it too will have no effect. Bug fix added on Nov 7, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/stwght.f then rebuild xspec.

11.3.2z
Fakeit using an XMM RGS background file produced by the rgsbkgmodel in SAS generates various obscure error messages. Our thanks to Piero Ranalli for reporting this. Bug fix added on Nov 8, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/DATA/wrtfak.f then rebuild xspec.

11.3.2aa
The setplot id option generates garbage on the plot. Our thanks to K.D. Kuntz for reporting this. Bug fix added on Nov 28, 2006.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/PLOT/mklnid.f then rebuild xspec.

11.3.2ab
The fit does not converge properly using cstat for some datasets with low counts in the source and background. Bug fix added on Jan 3, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/FIT/clcvec.f then rebuild xspec.

11.3.2ac
The conversion constant relating keV and Angstrom is incorrect in the 6th significant figure based on the latest values of fundamental constants. Surprisingly this is visible when plotting grating data in wavelength space. Our thanks to Carlos Gabriel for reporting this. Bug fix added on Feb 13, 2007.

The fix is to get the latest patch tar file and rebuild xspec.

11.3.2ad
The kerrbb model can generate a segmentation fault when analyzing multiple datasets. Our thanks to Diana Hannikainen for reporting this. Bug report added on Feb 26, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/kerrbb.f and rebuild xspec.

11.3.2ae
The compps model can generate a segmentation fault when using a response matrix with > 5000 energy bins. Our thanks to Hiromitsu Takahashi for reporting this. Bug report added on Mar 13, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xscompps.f and rebuild xspec.

11.3.2af
When using some particularly complicated models you may see the error message "Too many blocks" following which the fit will get lost. Our thanks to Ewan O'Sullivan and Roderick Johnstone for independently reporting this. Bug report added on May 2, 2007.

The fix is to edit the file ftools/xanlib/memory/udmget.c and change the #define of MAXBLK from 100 to 1000. Ensuring this change is used in xspec is a little complex. First do an hmake and hmake install in ftools/xanlib. Next delete all copies of libxantcl* in your headas installation. Now go to xspec/src/tcl and do an hmake and hmake install. Finally go to xspec/src, delete the xspec11 executable and do an hmake and hmake install. Note that this fixed file is not included in the patch tar file.

11.3.2ag
The compps model can generate a segmentation fault when using a response matrix with < 88 energy bins. Our thanks to Dirk Pandel for reporting this. Bug report added on May 21, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xscompps.f and rebuild xspec.

11.3.2ah
If xspec has been compiled using gcc4 and save makes an attempt to overwrite an existing file an error message is generated instead of the usual prompt. Our thanks to Glenn Morris for reporting this. Bug report added on Jul 18, 2007.

The fix is to replace $HEADAS/../ftools/xanlib/sysdep/sys.lnx and $HEADAS/../ftools/xanlib/sysdep/sys.darwin and rebuild the xanlib library and xspec (to do this do an hmake followed by hmake install in xanlib then an hmake and hmake install in xspec/src/tcl then finally an hmake and hmake install in xspec/src).

11.3.2ai
The help for the NEI models incorrectly state that abundance ratios are from Anders & Grevesse. In truth they are those set using the abund command. Our thanks to Frank Haberl for reporting this. Bug report added on Aug 28, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/help/xspec.hlp then hmake install.

11.3.2aj
The gabs model is wrong and gives results dependent on the energy bin size. Our thanks to Takao Kitaguchi for spotting this. Bug report added on Nov 28, 2007.

The fix is to replace $HEADAS/../ftools/spectral/xspec/src/functions/xsgabs.f and rebuild xspec.


Keith Arnaud, Lab. for High Energy Astrophysics, NASA/Goddard Space Flight Center.

Xspec Xspec Home Page


HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Monday, 26-Nov-2007 11:30:03 EST