Installation and setup#

This guide is supposed to help the user in setting up the environment for this library to work.

To install this library, just clone the repository directly into one of your python module paths

git clone https://github.com/WilfriedMercier/SED.git

If you do not know your module path names, you can list them from the terminal with

python -c 'import sys; print(sys.path)'

Alternatively, one can clone the repository into another directory and then make a symbolic link of this directory into one of the module paths, or add this directory to the module paths list.

Required dependencies#

A couple of third party dependencies are required in order for this library to work. See below for how to install them on Linux/Mac OS.

Library

Version

Installation (pip)

Installation (conda)

Astropy

4.2

pip install astropy

conda install astropy

colorama

0.4.4

pip install colorama

conda install -c anaconda colorama

numpy

1.19.5

pip install numpy

conda install numpy

Important

This library has been developed with Python 3.7 and was tested up to Python 3.10. We list below the version used during developement for each required dependency.

This library might still work with older or newer versions of these dependencies.

SED fitting codes installation#

Here we provide links and information on how to properly setup the environment of these codes to work properly with this library.

You can download the latest version of Cigale following Cigale documentation.

Note

This library uses by default custom HST filters. These are provided in additional_files/cigale/filters directory. It is recommended to add them into LePhare filters list in order to run the examples. On Linux and MacOS, this can be done using additional_files/cigale/addFilters.sh with the command lines

cd additional_files/cigale
chmod u+x addFilters.sh
./addFilters.sh

You can download LePhare SED fitting code LePhare along with other SED libraries. Follow LePhare documentation to properly install LePhare.

Note

This SED library uses by default Bruzual and Charlot 2003 SSP library. It is recommended to install it along LePhare in order to run the examples.

In order to compile LePhare, you need to have Fortran installed on your machine (e.g. gfortran).

Important

In order for this python library to work, you must define two environment variables:

  • LEPHAREDIR : main LePhare directory

  • LEPHAREWORK : working LePhare directory

Easiest way is to edit your ~/.bashrc file in your $HOME directory and write:

export LEPHAREDIR=pathtoLEPHAREDIR
export LEPHAREWORK=pathtoLEPHAREWOR

Do not forget to update it once saved

. ~/.bashrc

Note

This library uses by default custom HST filters. These are provided in additional_files/lephare/filters directory. It is recommended to add them into LePhare filters list in order to run the examples. On Linux and MacOS, this can be done using additional_files/lephare/addFilters.sh with the command lines

cd additional_files/lephare
chmod u+x addFilters.sh
./addFilters.sh