5.3. Xabsinput

For the xabs and warm models, an input file is needed that contains the temperature and ionic column densities as a function of the ionisation parameter \xi. The standard input file provided by SPEX is based on a run with an older version of Cloudy, using the spectral energy distribution of NGC 5548 as used in Steenbrugge et al. (2005).

The present program xabsinput allows the user to create such a file. The user basically needs to provide the following information, discussed in more detail below: spectral energy distribution (SED), abundances, root directory, and how to call Cloudy.

The SED should be provided in an ascii-file with two columns. The first column gives the energy in Rydberg units (note these units!), and the second column gives the spectral energy distribution in terms of E\,{\mathrm d}N/
{\mathrm d}E (for instance, in units of keV \mathrm{m}^{-2} \mathrm{s}^{-1} \mathrm{keV}^{-1} or Ryd \mathrm{m}^{-2} \mathrm{s}^{-1} \mathrm{Ryd}^{-1}, or Jansky, etc. Note that the absolute normalisation of the SED does not matter here, only the shape is used, so therefore all these units can be used as long as it corresponds to energy per area per time per unit energy.

Warning

In order to have a sufficiently broad energy band, xabsinput adds a value of 10^{-10} at energies of 10^{-8} and 10^9 Ryd. Take care that the SED scaling would essentially imply 10^{-10} to be a very small value. Also, the energies in the file should be in increasing order, and within the 10^{-8} and 10^9 Ryd interval.

Default abundances are presently the Lodders et al. (2009) proto-Solar values, presently the default of SPEX.

Warning

These default abundances are not equal to the default abundances of Cloudy.

The user is prompted for a file that contains the abundances relative to these standard abundances. This ascii files should have one line for each element with non-standard abundances. Each such line has two numbers: the atomic number of the element and the abundance relative to standard (in linear units, i.e. if you have iron two times solar, enter “26 2.0”, without the quotes, of course). If all abundances are standard, simply use an empty but existing file.

The user also should provide the name of a directory where the files that are calculated will be stored. Basically, the following files will appear in this directory:

  • a file “run.in”, which contains the input file for Cloudy; at the end of the program, it contains the input of the last Cloudy run (with the highest \xi).

  • a file “run.out”, which contains the output of Cloudy; at the end of the program, it contains the output of the last Cloudy run (with the highest \xi).

  • a file “xabs_inputfile”, which is the input file that you will need for the xabs and warm models of ; you can rename or move that file after finishing this program. The format of that file is as follows: first part two columns (\log\xi (in cgs, bah) and temperature (in eV); this is followed by blocks for each ion from H to Zn, with as first entry the nuclear charge and ionisation stage, and then simply the logs of the column densities, scaled to 28 for hydrogen.

  • ascii files named “column01.dat”, “column02.dat”, \ldots “column30.dat” containing for each element with nuclear charge Z=1-30 the ion concentrations as a function of \xi.  does not need those files, but it can be educative to look at them (or to plot using qdp). The format of those files is \log\xi, followed by the logs of the column densities for each ion (1 is neutral, 2 is singly ionised etc). The column densities take account of the abundances and have, for practical reasons, been scaled in such a way that Hydrogen has log column 10; values below 0 are cut-off to 0.

Finally, the user should provide the name of a script that runs Cloudy. The script is given as:

#!/bin/csh -f
#
setenv CLOUDY_DATA_PATH /path/to/cloudy/c13.01/data
setenv LD_LIBRARY_PATH
/opt/local/HEA/cloudy/c13.01/source/cloudy.exe < ${1}

Finally, our runs with Cloudy are done using the following default settings (apart from the SED and abundances that are entered by the user):

  • Hydrogen density small, i.e. 10^{14} \mathrm{m}^{-3} (10^8 \mathrm{cm}^{-3})

  • Column density small, i.e. 10^{20} \mathrm{m}^{-2} (10^{16} \mathrm{cm}^{-2})

  • Use the “iterate to convergence” command of Cloudy

  • Values of \log\xi between -8.5 and +6.5 with steps of 0.1

Note that, depending on the computer used, this program may run for several hours. During execution it should display the present value of \log\xi and the electron temperature in eV for each step of \log\xi between -8.5 and +6.5. This number should update regularly. If it does not, then it is possible that the calculation is stuck. This usually happens if the used model cannot calculate the lowest values for \xi. If so, you may want to change the \log\xi range. This can be done by providing the flag -r at the command line when xabsinput is started. If you do that, make sure that when you use the xabs model in SPEX, you adjust the lower and upper limit of the xil parameter as well to the limits given to xabsinput. This way one can avoid possible problems when xil is out of the calculated range.

Warning

We note that up to and including version 13.03 of Cloudy, L_{\mathrm ion} in the definition of \xi was actually the total bolometric ionising luminosity. However, from the upcoming version 13.04 of Cloudy this is corrected in the Cloudy code to be consistent with the commonly used definition, where L_{\mathrm ion} ranges between 1 to 1000 Ryd. Thus, we recommend using the xabsinput program with Cloudy version 13.04.