Download and Installation

XSTAR as Part of the HEASOFT

XSTAR is included in the FTOOLS package of HEASoft. Instructions for download and installation of the HEASoft are available at

http://heasarc.gsfc.nasa.gov/lheasoft

Make sure to check “xstar” when downloading only selected HEASoft packages:

_images/heasoft-down-xstar.png

We expect that the majority of users will obtain XSTAR through HEASoft.

XSTAR as a Standalone Package

The standalone version of xstar is available as a gzipped and tarred file on the XSTAR website

The source code is available along with compiled executables for several machine architectures.

The installation is the same as for the full heasoft:

http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/install.html

In more detail, you follow these instructions, but obviously the tarfile is named xstar22src.tar.gz rather than what is given in the heasoft instructions, and the directory that appears when it is untarred is called heasoft, not heasoft-6.9. A condensed version of what you need to do is as follows:

  1. In the directory in which you want to install the software, unpack the file you downloaded in step 1 using e.g.:

    gunzip -c xstar22src.tar.gz | tar xf -
    

    This will create a heasoft/ directory containing the software distribution.

  2. Configure the software for your platform (necessary for both binary and source downloads):

    cd heasoft/BUILD_DIR/
    

    and run the main configure script, which will probe your system for libraries, header files, compilers, etc., and then generate the main Makefile.

    To produce a default configuration, the configure script may simply be invoked by (we recommend capturing the screen output from configure as below):

    ./configure >& config.out &     (C Shell variants)
    ./configure > config.out 2>&1 & (Bourne Shell variants)
    
  3. Start the build process. We strongly recommend that you capture all output into a log file. Then, if you need to report a problem, please send us the ENTIRE log file. And since it may take some time to run (from minutes to hours, depending on the speed of your system) we recommend that you build it in the background:

    make >& build.log &     (C Shell variants)
    make > build.log 2>&1 & (Bourne Shell variants)
    

    To check on the build progress in real-time (if you wish) try:

    tail -f build.log
    
  1. Perform the final installation of the executables, libraries, help files, calibration data, perl scripts, etc, by executing:

    make install >& install.log &     (C Shell variants)
    make install > install.log 2>&1 & (Bourne Shell variants)
    

    This will create an appropriately-named system-dependent directory, e.g. sparc-sun-solaris2.9/, either under heasoft/ or, if you specified a prefix argument to configure, in the directory you selected at that time.

XSTAR on SciServer

Users who do not wish to install HEASoft locally can run XSTAR on SciServer. Make sure to select a HEASARC computing image and mount the HEASARC Data volume.

_images/sciserv.png

Subroutine XSTAR

This is a version of XSTAR which retains most of the functionality of the full code, but which provides a framework whereby XSTAR can be called as a subroutine from another program, or whereby XSTAR can be applied to situations which do not employ the standard assumptions concerning, e.g. the gas density distribution, geometry, or time-steady behavior. This consists of a large fortran file xstarsub.f90 containing all of the subroutines employed by the standard XSTAR, together with two primary subroutines: xstarsetup and xstarcalc. As implied by the names, xstarsetup is intended to be called once at the beginning of a calculation and handles reading of input data and initialization; xstarcalc calculates the physical conditions at one point in a photoionized gas and returns level populations, emissivities, opacities, etc. In addition there is a calling program which is intended to illustrate the use of these subroutines. Subroutine XSTAR also requires the the fits data file, atdb.fits, and must be linked to the cfitsio subroutine library. All are available via ftp from https://heasarc.gsfc.nasa.gov/FTP/software/plasma_codes/xstar/subroutine