Installation

Dependencies

  • Python >= 3.7

  • FSPS and Python FSPS. Note that we need to set an environmental variable called SPS_HOME to make FSPS works. Please follow the instruction in FSPS website for this.

  • mpi4py for parallel processing.

  • emcee for SED fitting with MCMC method.

  • HDF5 and h5py (follow the installation instruction from the website).

Installing piXedfit for the first time

  • cd to a desired installation directory, clone piXedfit, and install.

cd <install_dir>
git clone https://github.com/aabdurrouf/piXedfit.git
cd piXedfit
python -m pip install .
  • Set an environmental variable called PIXEDFIT_HOME that point to piXedfit parent directory.

export PIXEDFIT_HOME="$PWD"
  • The issue with the above command is that we need to do it every time we open a new terminal. Alternatively, we can add this environmental variable to .bashrc (add export PIXEDFIT_HOME=”path_to_piXedfit” to the last line in the .bashrc file).

vi ~/.bashrc

Add the above line and then do

source  ~/.bashrc
  • To add the environmental variable permanently, we can add the same line to .bash_profile or .profile. In case of .bash_profile:

vi ~/.bash_profile

Add the line and then do

source ~/.bash_profile

Upgrading piXedfit

  • cd to the installation directory, clone piXedfit, and install.

cd <install_dir>
git clone https://github.com/aabdurrouf/piXedfit.git temp
cp -r temp/piXedfit temp/requirements.txt temp/setup.py piXedfit/
rm -rf temp
cd piXedfit
python -m pip install .