Install ISIS on Linux
These instructions were tested for Debian 10, Ubuntu 20.04, and openSUSE 15.3. They should help you to install both the X-ray isisscripts as well as the "stellar_isisscripts", but will focus on the latter. It also assumes that you use the bash shell. Using the csh requires minor changes.
If you prefer an easy way to run the X-ray isisscripts (without the "stellar_isisscripts"), you can use the singularity container:
https://www.sternwarte.uni-erlangen.de/wiki/index.php/Isis_tutorial_installing
1. Install basic dependencies and general things
If you don't have root access, you might have to build some things from source, e.g. pgplot, cfitsio, or libpng. However, it might be easier to rely on HEASOFT in this case.
sudo apt-get -y install libreadline-dev sudo apt-get -y install libcurl4 sudo apt-get -y install libcurl4-gnutls-dev sudo apt-get -y install libncurses5-dev sudo apt-get -y install xorg-dev sudo apt-get -y install gcc g++ gfortran sudo apt-get -y install perl-modules-5* sudo apt-get -y install python3-dev sudo apt-get -y install fig2dev sudo apt-get -y install libpng-dev sudo apt-get -y install zlib1g-dev sudo apt-get -y install libpcre3-dev sudo apt-get -y install libonig-dev sudo apt-get -y install pgplot5 sudo apt-get -y install wget sudo apt-get -y install git
You have to define some things in your ~/.bashrc:
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
Then do
source ~/.bashrc
2. Install HEASOFT
This is not required for the "stellar_isisscripts" and can be skipped if you only want to install these. That is, unless you have no other way to install pgplot and cfitsio. HEASOFT seems to be required to run the X-ray isisscripts properly. To download HEASOFT, go to:
https://heasarc.gsfc.nasa.gov/lheasoft/download.html
unpack the download, and then:
cd heasoft-6.29/BUILD_DIR
Before I could run the configure script I had to make many files executable, so it seems easiest to make all of them executable (this is not good practice):
find .. -name '*' | xargs chmod +x
Building HEASOFT will take a while (~>30min). If you don't want to use root, set a different installation location by using ./configure with --prefix=/path/to/installation/folder/.
./configure make sudo make install find .. -name 'headas-init.sh' | xargs chmod +x
Finally, you need to define $HEASOFT. For me, this meant editing ~/.bashrc to include the two following lines. You need to adjust the path of course:
export HEADAS=/home/matti/programs/heasoft-6.29/x86_64-pc-linux-gnu-libc2.31 . $HEADAS/headas-init.sh # or # . $HEADAS/headas-init.sh
for csh, use instead:
setenv HEADAS /home/volans/mdorsch/isis/heasoft/installation/x86_64-pc-linux-gnu-libc2.31 . $HEADAS/headas-init.csh
Then, in the terminal:
source ~/.bashrc # or source ~/.cshrc
3. Install slang / slang modules / isis / isisscripts
First get the latest versions of slang / jed/ slgsl / slxfig / slirp / isis / isisscripts. A scripted installation of slang and isis is possible, following the MIT guide:
https://space.mit.edu/cxc/isis/install.html#XI
However, I recommend using the git repositories. Go to the Software directory in your terminal and clone the repositories:
git clone https://github.com/houckj/isis git clone git://git.jedsoft.org/git/slang.git git clone git://git.jedsoft.org/git/slxfig.git git clone git://git.jedsoft.org/git/slgsl.git git clone git://git.jedsoft.org/git/jed.git git clone git://git.jedsoft.org/git/slirp.git git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts
The following will assume you want to use root access. If that is not the case, you can use use the option
--prefix=/path/to/installation/folder/
With the ./configure commands. It seems to work to install all of them to the same "--prefix".
Install slang. Go to the slang directory.
sh ./configure make sudo make install
Make sure that all necessary standard modules are installed, including "png", which requires "libpng16" to be installed. If "libpng16" is not installed yet, you can easily build it from source:
https://sourceforge.net/projects/libpng/files/
and then add its installation folder to $PATH.
Install isis. Go to the isis directory, here with HEADAS:
sh ./configure --with-headas=$HEADAS make sudo make install
If your aim is to install the "stellar_isisscripts", you don't need HEADAS, but may have to install fitsio:
https://heasarc.gsfc.nasa.gov/fitsio/
Then go to the isis directory and:
sh ./configure make sudo make install
Add --with-slang=/path/to/slang to the following configuration set ups in case you installed slang in a different path other than /usr/local/
Install jed. Go to the jed directory
sh ./configure make make xjed sudo make install
Install slgsl. Go to the slgsl directory
sh ./configure make sudo make install
Install slxfig. Go to the slxfig directory
sh ./configure make sudo make install
Install slirp. Go to the slirp directory
sh ./configure make sudo make install
Before building the isisscripts, install the "SLURP" perl module.
sudo perl -MCPAN -e shell install CPAN reload cpan install File::Slurp quit
Then go to the isisscripts directory and
make
Create / modify the .isisrc file in your $HOME directory and add the following line
add_to_isis_load_path("/Path/To/isisscripts/share/"); define ris() { require("isisscripts"); };
This allows the easy access to require("isisscripts") in isis.
4. Install stellar_isisscripts
Get the newest version of the stellar_isisscripts from git. If you have a Remeis/gitlab account and are at the Remeis observatory, do:
git clone git@serpens.sternwarte.uni-erlangen.de:irrgang/stellar.git mv stellar stellar_isisscripts
If you have a Remeis/gitlab account and are not at the Remeis observatory, do:
git clone http://www.sternwarte.uni-erlangen.de/gitlab/irrgang/stellar.git mv stellar stellar_isisscripts
Otherwise ask Matti Dorsch. Then:
cd stellar_isisscripts make
Now compile some necessary C functions:
cd stellar_isisscripts/slirp slirp -make -lm -lgsl -lgslcblas -lpthread c_functions.h c_functions.o sed -i -e 's/^CFLAGS[[:space:]]*= -g -O2/CFLAGS = -g -Ofast -Wall -Wextra/g' Makefile
Then:
make make test rm c_functions-test.sl ; rm c_functions.o ; rm c_functions_glue.o ; rm c_functions_glue.c ; rm Makefile ; rm *~
Create modify the .isisrc file in your $HOME directory and add the following line
add_to_isis_load_path("/Path/To/stellar_isisscripts/share/"); define rmy() { require("stellar_isisscripts"); };
To use all functions, you need the stilts tool, which is related to TOPCAT. You can install it as a package:
sudo apt-get install stilts
Only if this does not work:
mkdir stilts; cd stilts wget http://www.star.bris.ac.uk/~mbt/stilts/stilts.jar wget 'http://www.star.bris.ac.uk/~mbt/stilts/stilts' chmod +x stilts sudo cp * /usr/bin/
Without root, you can add the folder that contains stilts to your $PATH in ~/.bashrc or ~/.cshrc.
To test if the scripts work, try for example:
isis rmy; s = query_photometry ("HZ44"); s.print(); help query_photometry q exit;