HEASOFT - A unified release of the FTOOLS and XANADU packages

Introduction

HEASOFT is software from He NASA's High Energy Astrophysics science Archive Research Center (HEASARC) which is primary archive for NASA missions dealing with extremely energetic phenomena, from black holes to the Big Bang. Having recently merged with the Legacy Archive for Microwave Background Data Analysis (LAMBDA), it includes data obtained by NASA's high-energy astronomy missions from the extreme ultraviolet through gamma-ray bands, along with missions that study the relic cosmic microwave background.

Initialisation

IMPORTANT NOTE: it is strongly recommended that users remove all previous initializations which used .ftools, finit.csh, initu.csh, etc. from their login initialization scripts, (like .login, .cshrc, .profile, .bashrc etc.) There is no need to explicitly set the environment variables FTOOLS or XANADU prior to performing the initialization procedure.

I had to use non-default compilers to compile version 6.27 onwards. I have used developer toolset version 9 to build version 6.31.1. This is initialised using the command:

scl enable devtoolset-9 bash
You should not need to use these compilers directly unless you are compiling Xspec models.

These are the Bristol settings for Centos/SL7 Linux:

Bourne Shell Users

For Bourne based Shells (bash, ash, ksh, sh), use the following commands, but don't put the following lines in .bashrc or .bash_profile! The scl command generates a new bash shell which runs the .bashrc again which generates another bash shell and so on until the system memory is exhausted.

export HEADAS=/usr/local/heasoft-6.31.1/x86_64-pc-linux-gnu-libc2.17
alias heainit=". $HEADAS/headas-init.sh"
heainit
If you want heasoft to be initialised by typing 'heainit' then put the following in your ~/.bashrc

export HEADAS=/usr/local/heasoft-6.31/1/x86_64-pc-linux-gnu-libc2.17
alias heainit=". $HEADAS/headas-init.sh"
Type heainit in your terminal to initialise the software before starting programs such as xspec.

C-shell Users

For C Shell variants (eg tcsh, csh):
 

setenv MANPATH /opt/rh/devtoolset-7/root/usr/share/man:${MANPATH}
setenv LD_LIBRARY_PATH /opt/rh/devtoolset-7/root/lib64:${LD_LIBRARY_PATH} -->
Setenv HEADAS /usr/local/heasoft-6.29/x86_64-pc-linux-gnu-libc2.17
alias heainit "source $HEADAS/headas-init.csh"
heainit
and you can the following lines in your .cshrc

setenv HEADAS /usr/local/heasoft-6.29/x86_64-pc-linux-gnu-libc2.17
alias heainit "source $HEADAS/headas-init.csh"
Type heainit in your terminal to initialise the software before starting programs such as xspec.

If you need to use a tcsh/csh, you can do it as below:


setenv HEADAS /usr/local/heasoft-6.29/x86_64-pc-linux-gnu-libc2.17
alias heainit "source $HEADAS/headas-init.csh"
heainit

Using an Older Version

If you don't want to, or can't, use the most recent version, possibly because you don't have the devtoolset compilers installed on your desktop, the you can either ask for them to be installed or you can use version 6.26 as below:
bash/sh:
export HEADAS=/usr/local/heasoft-6.26/x86_64-pc-linux-gnu-libc2.12
alias heainit=". $HEADAS/headas-init.sh"
heainit

tcsh/csh
setenv HEADAS /usr/local/heasoft-6.26/x86_64-pc-linux-gnu-libc2.12
alias heainit "source $HEADAS/headas-init.csh"
heainit

Documentation

See http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/ for more details.

The Linux version has been compiled from source, so users of Xspec can compile their own models, see the end of this page. Although this may no longer be necessary.

Version

On Monday, 28 February 2022 heasoft 6.29 on was installed on linux.

Heasp

This version of HEASOFT comes with the heasp python module which can be imported once HEASOFT is initialised.

Xspec

HEAsoft 6.29 came with xpsec 12.12.0, it was updated on Monday, 28 February 2022 to 12.12.0g.

The page on patching Xspec is here. The patch installer is here.

From the HEASOFT installation guide:

*****************************************************************************
            ADDING LOCAL MODELS TO XSPEC 12 AFTER INSTALLATION
*****************************************************************************

NOTE: Local models can only be built using the HEASOFT source
      distribution.  Users should not remove their source distribution
      after installing in order for local model building to function
      properly.

In XSPEC 12, local models are always built into shared libraries which can
be loaded at xspec run-time.  This is performed with two new xspec commands,
'initpackage' and 'lmod', which simplify the process in comparison with
previous versions.  Please refer to Appendix C of the XSPEC 12 manual for
details.  There is no longer an option or need to build and install xspec
local models during the main HEASOFT build.  Those wishing to automate the
loading of their local model libraries upon xspec start-up (whether for
themselves or for system-wide users), should also refer to the "Customizing
XSPEC" section of the manual.

Rhys Morris
Last modified: Monday, 22 March 2021