Installation procedure ---------------------- Requirements ~~~~~~~~~~~~ The installation of the basic molecfit binary package requires: - C99 compatible compiler (e.g. gcc or clang) - glibc 2.11 or newer on Linux or OSX 10.7 or newer - MacPorts on OSX - common unix utilities (bash, tar, sed, grep, ...) The optional GUI interface to molecfit requires: - Python v2.6 or v2.7 (but not Python v3) - wxPython v2.8 or newer - Python matplotlib v1.0 or newer - PyFITS v2.4 or newer MacPorts users should install the following packages: sudo port install py27-astropy py27-matplotlib py27-wxpython-3.0 The command line client also has optional display features which require: - gnuplot v4.2 patchlevel 3 or newer Binary installation ~~~~~~~~~~~~~~~~~~~ First the downloaded installer needs to be made executable. To do this change into the directory the installer was downloaded to and run following command (replacing `molecfit_installer.run` with the actual downloaded filename): chmod u+x ./molecfit_installer.run Now the installer can be executed from the same folder with: ./molecfit_installer.run It will ask for an installation directory where it will extract its contents to. It is recommended to choose an empty directory to avoid overwriting existing files. After the installer has successfully finished, the molecfit executables are installed into the `bin` subdirectory of the chosen installation folder. They can be executed by specifying the full or relative path. Also installed are a set of example parameter files for several instruments in the `examples/config` directory. To run a CRIRES example type: /bin/molecfit /share/molecfit/examples/CRIRES_4889p5/Barnard.par For the GUI use the `molecfit_gui` executable instead of `molecfit`. GUI dependencies ~~~~~~~~~~~~~~~~ The GUI requires some additional dependencies to be installed on the system. To check if the python installation is able to run the GUI following commands can be run: python -c 'import wx' python -c 'import matplotlib; import matplotlib.backends.backend_wxagg' python -c 'import pyfits' or python -c 'import astropy.io.fits' If these commands fail please see following site for instructions on how to install these packages: http://www.eso.org/pipelines/reflex_workflows/ Experimental Conda based dependency installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Conda is a environment based package manager which can also be used to install the GUI dependencies. It is only recommended on Macs when the installation via MacPorts is not an option. Download and install an appropriate version of miniconda from: http://conda.pydata.org/miniconda.html Create and activate a skytools environment: conda create -n skytools matplotlib astropy wxpython source activate skytools Now the molecfit installation can be performed as described above but on MacOS one has to start molecfit_gui with pythonw instead of python: pythonw bin/molecfit_gui To leave the skytools environment use: source deactivate Package contents ~~~~~~~~~~~~~~~~ The installation package is a self extracting tarball containing the molecfit source code and pre-built versions of its third party dependencies: - Common Pipeline Library CPL v7.1.0 and its dependencies cfitsio v3.360, wcslib v4.24 and fftw3 v3.3.4 - Gridded Binary (GRIB) v1.9.9 - radiative transfer code LNFL v3.1 and LBLRTM v12.8 - AER line database v3.6 Source Installation: ~~~~~~~~~~~~~~~~~~~~ Advanced users may want to install everything from source, the basic instructions for this are outlined in this section. The installation from source additionally requires the gfortran compiler. CPL compilation +++++++++++++++ The CPL sources can be obtained from http://www.eso.org/cpl/ For molecfit, CPL only requires cfitsio. It can be installed as follows: ./configure --prefix=/install-location make make shared make install Then CPL can be install with: ./configure --prefix=/install-location --with-cfitsio=/install-location make make install See the respective packages documentation for details on the installation procedure. Non-ESO sources compilation +++++++++++++++++++++++++++ The rest of the required sources can be downloaded from the same place the molecfit binaries installers are available from. The third party source tarball contains a convenience Makefile to build and install all packages at once. It can be run with: make -f BuildThirdParty.mk install prefix=/install-location For installation on Mac OS please read the comments in this Makefile. Molecfit compilation ++++++++++++++++++++ After all dependencies have been installed molecfit can be compiled from source into the same location. This is the only step required if one wants to update molecfit from source after previously installing the third party dependencies with the binary installer. ./configure --prefix=/install-location --with-cpl=/install-location make make install In order to use molecfit from this location the environment variable `LD_LIBRARY_PATH` (or `DYLD_LIBRARY_PATH` on Mac OS) need to be set. With the bash shell this is done with following command: export LD_LIBRARY_PATH=/install-location/lib Now molecfit is ready to be used from `/install-location/bin`.