This page contains a copy of the gamma-test code of a new and improved version of the X-ray absorption model tbabs (Wilms et al., 2000), which improves the resolution of the cross sections used in the code, allowing the model to be used for spectroscopy with modern X-ray gratings such as Chandra's LETGS or the XMM-Newton RGS in the vicinity of the astrophysically relevant K-edges of oxygen and neon, as well as in the vicinity of the Fe L-edge.

This code has been developed in collaboration with Adrienne M. Juett (GSFC), Norbert S. Schulz (MIT), Michael A. Nowak (MIT), and Julia C. Lee (Harvard).

The following three figures illustrate the improvements, the black line is the current implementation of tbabs, the red lines is the new implementation:

Ne K-edge Fe L-edge O K-edge

(click on the pictures to download a higher resolution version of the figure).


To use the code, download the following files:

and then follow the standard XSPEC instructions to install the model as a local model in your data analysis package of choice. Note that for XSPEC version 12 you need to use the initpackage command with the -udmget argument.

For XSPEC in version 12 and under LHEASOFT 6 you can also use the script compile.tcsh to install and compile the model.

Before fitting, make sure you use the Verner cross sections (XSPEC-command xsect vern and the proper ISM abundances, i.e., abund wilm [yes, without an s]).

The following three models are provided by the above distribution:

  • tbnew standard absorption interface with all parameters accessible. Note that if you set any of the column parameters to a negative value, the absolute value of that parameter is the total column in that element.
  • tbnew_feo simplified interface in which only the absorption column and the columns for O and Fe, and the redshift are free parameters
  • tbrel allows ``negative'' NH. Use this, e.g., if you want to measure changes in column relative to an average column. For example, you can fit a model such as tbrel*tbabs*continuum, where all values of tbabs are frozen at the average column of the source. If the fit results in a negative column for NH during that observation, then the total colunmn of the source is less than the average.

Caveats and comments

Please note the following caveats:
  • Please do not circulate the code since frequent updates will be made in the next months. Instead, point interested people to this WWW page.
  • Only the code version with fully variable relative abundances is made available at this time.
  • The new edge structures are used for bound and free atoms, which is not entirely true. This will be fixed in a later version.
  • Please notify Jörn Wilms if you want to be informed of updates to this code.
  • If using the code in your publications, please cite the model as Wilms, Juett, Schulz, Nowak, 2011, in preparation, and provide a pointer to this URL.
  • Please notify Jörn Wilms if you find problems or errors with this code.


  • 2012 June 08: fixed an error in tbnew_feo that caused slightly wrong absorption (effectively all elements were depleted into 1mum radius dust grains with a density of 1g/cc). now tbnew_feo (correctly) uses the default dust parameters from Wilms et al.
  • 2011 September 08: added a new model, called tbnew_feo which has only the nH, Fe, O and redshift parameters to make life easier for people who do not like XSPEC's show free command.
  • 2009 April 09: The H2 fraction and the depletions are now fixed between 0 and 1 (they were fixed through hard bounds in the lmodel.dat but this could be overridden, resulting in meaningless results). Thanks to Jukka Nevalainen for pointing out this issue.
  • 2009 February 05: When setting nH and the He through Ni parameters to NEGATIVE values, the parameters are now considered to be the column in that element. Note that to make this to work you will have to set the minimum and maximum fitting ranges to a negative range. This option makes the fitting of edges in gratings spectra in order to determine the column much more convenient.
  • 2009 January 22: The code now compiles also when the pedantic-flag of g77 is set.