Install ISIS on Mac

From Remeis-Wiki
Revision as of 10:55, 31 July 2018 by Kuehnel (talk | contribs)
Jump to navigation Jump to search

This instruction is intended for Mac OS X 10.10 (yosemite) users to "completely" install ISIS including the modules for: gsl, xfig, isisscripts.

Assuming a fresh Mac OS X 10.10 installation (alternatively make sure that /usr/local/ or the prefix path of the installation is empty).

1. Install Xcode (latest version) and Xquartz

To check whether Xcode is installed execute: \\

xcode-select -p

on command line

If you see /Applications/Xcode.app/Contents/Developer it should be installed. Use the App Store to update or install Xcode

Execute xcode-select --install on command line to install the Xcode command line tools

Xquartz / X11 is no longer included in the latest versions of Mac OS X and need to be installed separately. X11 is also no longer available from Apple directly, but has to be obtained from the web. Download X11 and install it. Note: if this link is out of date, search the Web for "OS X Xquartz". After installation the X11 libraries should now be available in /opt/X11/

2. Install Mac Ports

Fink could also work, the differences should be some package names and the location of some libraries which should be /opt/local/ for Mac Ports or /sw/local/ for Fink.

This instruction assumes that Mac Ports will be installed.

3. Install packages with Mac Ports

There are several packages including their dependencies to be installed. I recommend installing everything with the universal flag set (which includes 32bit and 64bit versions)

sudo port install gcc49 +universal
sudo port install gsl +universal
sudo port install transfig +universal

These packages install a necessary gfortran compiler as well as necessary libraries to build the slgsl / slxfig module for slang / isis.

4. Install HEADAS

  • Download the latest version of HEASOFT (source)
  • Up until HEASOFT 6.15, XSPEC did not work properly on Mac OS X in 64bit mode. As of HEASOFT 6.16 this is no longer the case and the recommendation is to install everything in 64bit. You don't need to set anything to do that, but if you have old compiler flags set to "-m32", remove them!
export GCC="/usr/bin/gcc"
export CC="/usr/bin/gcc"
export CXX="/usr/bin/g++"
export FC="/opt/local/bin/gfortran-mp-4.9" # mac ports gfortran compiler
  • create a directory in your $HOME called Software
  • unpack the HEADAS tar file in this directory
  • Install HEASOFT from source but use the following configurations
 ./configure --x-libraries=/opt/X11/lib --x-includes=/opt/X11/include
make
sudo make install
  • Add the following to your .profile (change this according to your terminal type and username)
export HEADAS="/Users/username/path/to/heasoft/"
alias heainit="source $HEADAS/headas-init.sh
heainit

The HEADAS path could/should look something like this:

$HEADAS=/Users/chgross/Software/heasoft-6.16/x86-apple-darwin14.1.0/
  • apply the new settings to your terminal by either closing the current terminal windows and open a new terminal or by writing

source ~/.profile in your command line

5. Install slang / slang modules / isis / isisscripts

First get the latest versions of slang / jed/ slgsl / slxfig / isis / isisscripts. I recommend using the git repositories. Go to the Software directory in your terminal and clone the repositories:

git clone http://space.mit.edu/cxc/isis/isis.git
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 http://www.sternwarte.uni-erlangen.de/git.public/isisscripts 

Install slang. Go to the slang directory.

./configure --with-png=/opt/local/
make
sudo make install

Install isis. Go to the isis directory

./configure --with-headas=$HEADAS
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

./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
make
sudo make install

Install slgsl. Go to the slgsl directory

./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --with-gsl=/opt/local/
make
sudo make install

Install slxfig. Go to the slxfig directory

./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
make
sudo make install

Install the isisscripts. Go to the isisscripts directory

make

Create / modify the .isisrc file in your $HOME directory and add the following line

add_to_isis_load_path("/Path/To/isisscripts/share/");

This allows the easy access to require("isisscripts") in isis.

6. Possible problems with other software

XMM SAS

The XMM SAS resets part of your $PATH variable and uses its some of its own libraries. This might break some programs of HEASOFT when the SAS is loaded. As our xmmscripts rely on the ftools, this behavior is highly inconvenient. As a workaround install the HEASOFT wrapper by following the instructions here.

This will create a new directory with the executables of HEASOFT. Add this directory to your $PATH variable (in front of the rest of $PATH)!