Overview of Requirements¶
- numpy (any version except 1.10.*)
- Additional Packages (with Instructions Below)
- mercurial <http://mercurial.selenic.com/>
- git <http://git-scm.com/>
- powderday <http://bitbucket.org/desika/powderday>
- yt <http://yt-project.org>
- FSPS <https://code.google.com/p/fsps/source/checkout>
- python-fsps <http://dan.iel.fm/python-fsps/current/>
- Hyperion <http://www.hyperion-rt.org/>
- Hyperion Dust Files <http://docs.hyperion-rt.org/en/stable/dust/dust.html>
All in One Installer¶
The first stop is to try the all-in-one installer for powderday. This is available at the main download page <https://bitbucket.org/desika/powderday/downloads> from the Bitbucket repository. This is a bash script that will append relevant path names to your .bashrc, as well as attempt to go package-by-package and install everything. The plus side is that if it works, it’s super easy. The downside is that if a package installation fails, you might not catch it because the bash script will go on to the next package. This installer assume gnu C and Fortran compilers.
Something that has worked for a number of users is to download the all-in-one installer, and then copy and paste the instructions for each package one at a time. This can alert the user to package failures.
What follows is a self-contained installation manual, though for problematic installs of any of the sub packages, it’s definitely best to visit the main docs on the main software site (which are always linked below in each subsection).
powderday currently only works with python 2.x. The code was developed on, and principally tested with python 2.7.
Simply clone the latest and greatest from the repo:
>hg clone https://email@example.com/desika/powderday
And that’s it! Once it’s cloned, there’s no subsidiary installation commands.
If you don’t have yt already installed, it’s super easy! There are many ways to do this (as directed on the yt project website. We require the standalone installer script for the Development version. This will ensure that bugs caught in or bleeding-edge features of yt are included.
fsps can be checked out with:
> git clone https://github.com/cconroy20/fsps
and directions to the installation are in the Manual
>F90FLAGS = -O -cpp -fPIC
!------set the isochrone library------! #define MIST 0 !Padova models circa 2008 #define PADOVA 1 #define PARSEC 0 #define BASTI 0 #define GENEVA 0
Finally, the SPS_HOME variable must be set in your environment to point to the FSPS/src directory. For example, if your environment is bash, in your .bashrc set something along the lines of:
>pip install fsps
Though you could also install the development version:
>git clone https://github.com/dfm/python-fsps.git >cd python-fsps >python setup.py install
You can test the installation by opening python and typing:
Hyperion is the main work horse of powderday. The full directions for installation are well-described on the main Hyperion website. Here, we summarize the installation which should get most users through without any real difficulty.
First download the tarball and unpack it.:
>tar -xzvf hyperion.xxx >cd hyperion.xxx
Install the fortran dependencies:
>cd deps/fortran >python install.py <prefix>
where <prefix> is where you want the libraries to be installed. To avoid conflicts with other packages, I usually install somewhere like:
>python install.py /usr/local/hyperion
as suggested by the Hyperion docs. Ensure that the following commands return something sensible:
>which mpif90 >which h5fc
if not, your path probably needs to include wherever the <prefix> directory pointed to.
Install any remaining python dependencies. These are listed here
Install Hyperion itself. To do this:
>cd hyperion.xxx >python setup.py install
>python setup.py install --user
if you don’t have root access. At this point:
from within python should work, and typing:
at the command line should return something along the lines of:
>usage: hyperion [-h] [-f] [-m n_cores] input output >hyperion: error: too few arguments
if not, check the the path that is near one of the last lines of the setup.py installation (that is something associated with the number 755) and make sure it’s in your path. Ir’s most likely to be a python binaries directory.
You then have to install the Fortran Binaries:
>./configure --prefix=prefix >make >make install
where the prefix is wherever you installed the Fortran libraries before. Make sure this works by typing at the command line:
which should return something like:
>Usage: hyperion_sph [-f] input_file output_file .. _Hyperion_dust:
Hyperion Dust Files¶
Unless you’ve written your own dust files, you will likely want to use the pre-compiled dust files developed by Tom Robitaille (though don’t ship with Hyperion due to their size). To install these download them here: http://docs.hyperion-rt.org/en/stable/dust/dust.html. Then to install:
>tar xvzf hyperion-dust-xxx.tar.gz >cd hyperion-dust-0.1.0 >python setup.py build_dust
If you want to use the PAH model in powderday, you’ll additionally need these files in the same dust directory. To download, click on the link, then click ‘raw’ on the right side of each page.
Please note the caveat that the PAH files are generated using some approxmations described in Robitaille et al., and we encourage the user of these PAH files to read this paper, especially section 3.4.2.
Troubleshooting your Installation¶
python-fsps installation issues¶
1. python-fsps can’t find f2py
f2py is a numpy package that is sometimes named f2py2.7 by numpy. At the same time, python-fsps expects it to be called f2py (as it sometimes is; for example in Anaconda). So, you might need to locate f2py (it ships with yt, so if you for example use the yt python) you need to link the following files:>cd /Users/desika/yt-x86_64/bin >ln -s f2py2.7 f2py
and:>cd /Users/desika/yt-x86_64/lib/python2.7/site-packages >ln -s numpy/f2py/ f2py
This should hopefully fix it.
Issues with ‘f2py’ in the python-fsps installation:
Numpy has made some changes to f2py in the 1.10.x version of numpy. The easiest fix is to use a non 1.10.* version of numpy (thanks to Ben Johnson for finding this).
3. python-fsps has mysterious installation failures. Often this has to do with a bad FSPS compilation. Even if it seems like FSPS has compiled, it may not actually execute properly if the correct compilers aren’t set in the MakeFile. Thanks to Ena Choi for pointing this one out.