Presentation Supercomputing Computer Database SIEpedia SIE News

Follow @SIEie_IAC
Logo SIE

Astronomical Software for Mac OS X

With the arrival of a brand-new iMac with Lion (v10.7.4) in August 2012, the SIE is ready to give some basic support for the installation of astronomical software in Mac OS X. The iMac has been subsequently updated through various versions to High Sierra 10.13.6. (No further upgrade are possible.)

As our experience with this OS is not as good or estensive as with Linux, please bear with us if we are unable to help you with the installation of the package you need (other than the ones listed below).

As software installation in a Mac can be achieved through different means (downloading the .dmg file, using MacPorts, Homebrew, compiling from source, etc.), it helps if you try to keep the configuration of your Mac as much aligned as possible with that of our iMac, which we consider as the reference platform (data below as of September 2018):

General Mac OS X Resources

The AstroBetter site, among many interesting posts and discussions on science and technology in general, provides a lot of info and tips about Mac OS X for astronomy.

OS X for Astronomers helps you set up your Apple computer for professional astronomy, while OS X Astro Tricks contain "tips and bug fixes for running astronomy-related software on OS X".

Astroconda

Astroconda is an easy-to-install package which includes IRAF, DS9, and many tools to analyze data from the Hubble Space Telescope, the James Webb Space Telescope, and others. It is based on Conda, an open-source software package management system provided and maintained by Continuum Analytics. It permits installation without requiring system privileges. For further details and for installation instructions, see https://astroconda.readthedocs.io/en/latest/.

However note that Astroconda comes with a 32-bit IRAF distribution, which will not run on macOS Catalina and later releases.

Individual Packages

If you prefer to install yourself individual packages instead of an "all-in-one" distribution such as Scisoft, here go some pointers.

C and Fortran compilers We are currently using the compilers from MacPorts. In general you will find multiple gcc/gfortran versions in your Mac (the macOS's one, the one installed with MacPorts, other you got from other channels), and this will be bound to cause some confusion (for instance compilation of some particular package succeeds with one compiler and fails with another). In general, to specify which gcc compiler you wish to use, just define the variable:
export CC="/opt/local/bin/gcc"  (this selects the MacPorts version).
DAOPHOT I managed to compile (with gfortran) and install DAOPHOT in 64bit, linking against IRAF v2.16 libraries. Some changes were required in the Makefile, and one of the source files had to be edited to correct a statement that threw an error upon compilation. If you have a legitimate copy of DAOPHOT's source code and wish to install it on a Mac, get in touch with us.
DS9 Download and install the appropriate DS9 binary from https://sites.google.com/cfa.harvard.edu/saoimageds9/download.
Gipsy The installation procedure was a little convoluted, and required a slight modification of the setup file, but at the end it worked out (not the Python wrapper though). If you need help to install Gipsy in your Mac, get in touch with us.
HEAsoft Compilation is straightforward, you only need to be careful about what specific compilers you use. See the HEAsoft Supported platforms page for details. The combination of compilers/flags that worked for me was:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export FC=/opt/local/bin/gfortran
export PYTHON=/opt/local/bin/python
export PERL=/usr/bin/perl
export PATH=/usr/bin:${PATH}
IDL For IAC users, instructions on how to install IDL in a Mac can be found in the webpage: IDL installation (internal access only) There you can also find how to use the IAC floating licenses, or temporarily borrow an IDL license.
IRAF For macOS versions Mojave and earlier, you can install IRAF for MacIntel following the "quick and easy" procedure described in the SIEpedia article: How to install IRAF 2.16 in Mac OS X. For macOS Catalina and later versions, you an use it in a Ubuntu virtual machine as described in Installation of IRAF on macOS with Multipass and Ubuntu.
LaTeX MacTeX seems to be the most popular LaTeX distribution for Mac. We installed it from http://www.tug.org/mactex/. You may also wish to install TeXShop. Please read the instructions on the MacTex webpage about configuring GUI programs to use the appropriate symlink to the executables directory.
Mathematica Ask us for the .dmg file to install the latest Mathematica release. When launching Mathematica for the first time, click on "Other ways to activate", select "Connect to a network license server" and type "zuko" (without quotation marks) in the Server name box. Then click "Activate". That's it.
MIDAS You will have to compile the source code yourself. Visit: http://www.eso.org/sci/software/esomidas/ for further details about MIDAS and for download/installation instructions. The installations was a bit complicated with several problems, which however could be overcome (thanks to some tips found on the MIDAS help mailing list). Ask us if interested.
Python Python 2.7 and 3.6 (plus several python scientific packages such as numpy, scipy, matplotlib, etc.) were installed using MacPorts, following the instructions in MacPorts Python installation on Mac - 10 easy steps (dated, but still valid).
Alternatively, one can install the Anaconda Python distribution (which however we don't use and have no experience with).
STSCI_Python It can be installed by hand, using pip. Because of potential incompatibilities with Python 3, is should be installed under Python 2.7.
export CC="/opt/local/bin/gcc"
python2.7 -m pip install --user --upgrade d2to1
python2.7 -m pip install --user --upgrade stsci.distutils
python2.7 -m pip install --user --upgrade stscipython
python2.7 -m pip install --user --upgrade pyraf

The PyRAF command will be in ~/Library/Python/2.7/bin/pyraf (you can create an alias, or make a symlink in /usr/local/bin/).
Starlink We downloaded and installed the 2018A release for OS X (64-bit, Intel).
SuperMongo Supermongo works fine, however you need to compile and install the version patched for Lion (it fixes a conflict with the getline library). For installation in Mountain Lion, I had to work around a problem with bison.
IAC users can ask as for installation instructions.
To fix the problem with line editing and command recalling, from the SM prompt type termtype xterm.
Non-IAC users must ask the SM authors for a copy of the source code.