Download and Install HEASoft

内容目录

This is the main software for data ananlysis. Please make sure you have installed Heasoft successfully.

You can download it on HEASOFT Downoad Website.

Step 1

Select the type of software.
As the SOURCE CODE INSTALLATION is recommended, I select Source Code -> PC - Microsoft Windows WSL (Windows Subsystem For Linux) for my system. You should decide it up to your system.

Step 2

Download the desired packages.
You can just download all the packages. But make sure you select NuSTAR, the autoselected General-Use FTOOLs and Xspec. If you want to use the HEASP Python interface. You should select HEASoftPy as well.
After that, click the SUBMIT button. It will generate a file named heasoft-<version>src.tar.gz. And download the tar file to your device. This may takes hours, just wait...

Step 3

Unzip the file you downloaded.
Change your working directory to a clean directory. Move the tar file here.

tar -zxvf heasoft-6.29src.tar.gz

You will see the heasoft-<version> directory. Before you turn to Step 4, check the installation instructions of your system. I choose the version for PC Linux - Ubuntu since my system is Ubuntu.

Other system:

Step 4

Prerequisite packages.
Make sure you have installed the packages below.

sudo apt-get -y install libreadline-dev
sudo apt-get -y install libncurses5-dev
sudo apt-get -y install ncurses-dev
sudo apt-get -y install curl
sudo apt-get -y install libcurl4
sudo apt-get -y install libcurl4-gnutls-dev
sudo apt-get -y install xorg-dev
sudo apt-get -y install make
sudo apt-get -y install gcc g++ gfortran
sudo apt-get -y install perl-modules
sudo apt-get -y install python3-dev [or python-dev]
sudo apt-get -y install numpy [only needed for the HEASP Python interface]

Step 5

Building the software.
Fisrt, make sure that the variables have been set corrrectly. Because I use bash as my shell(check your shell by echo $SHELL). I set the compilers by

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export FC=/usr/bin/gfortran
export PERL=/usr/bin/perl
export PYTHON=/usr/bin/python3

Unset all "FLAGS" variables.

unset CFLAGS CXXFLAGS FFLAGS LDFLAGS

Configure and build the software.

cd heasoft-<version>/BUILD_DIR/
./configure > config.txt 2>&1
make > build.log 2>&1
make install > install.log 2>&1

The make and make install commands may take hours, you can see the task status by tail -f **.log. The installation guide contains descriptions of optional configuration flags that more advanced users may wish to utilize.

Step 6

Initialization.
For Bourne Shell (sh, ash, ksh, bash, zsh):

export HEADAS=/path/to/your/installed/heasoft-<version>/(PLATFORM)
. $HEADAS/headas-init.sh

留下回复