SNCosmo works on Python 3.4+ and depends on the following Python packages:
Install using conda (recommended)¶
If you are using Anaconda or the conda package manager, you can install SNCosmo from the conda-forge channel:
conda install -c conda-forge sncosmo
Install using pip¶
First ensure that numpy and cython are installed. Then:
pip install sncosmo
--no-deps flag is optional, but highly recommended if you
already have numpy, scipy and astropy installed, since otherwise
pip will sometimes try to “help” you by upgrading your Numpy
installation, which may not always be desired.
If you get a
PermissionError this means that you do not have
the required administrative access to install new packages to your
Python installation. In this case you may consider using the
--user option to install the package into your home directory.
You can read more about how to do this in the pip documentation.
Do not install sncosmo or other third-party packages using
sudo unless you are fully aware of the risks.
You will need a C compiler (e.g.
clang) to be
installed for the installation to succeed.
Install latest development version¶
SNCosmo is being developed on github. To get the latest development
git clone git://github.com/sncosmo/sncosmo.git cd sncosmo
As with the pip install instructions, you may want to use either
setup.py install --user or
setup.py develop to alter where the
package is installed.
Several additional packages are recommended for enabling optional functionality in SNCosmo.
- matplotlib for plotting functions.
- iminuit for light curve
fitting using the Minuit minimizer in
- emcee for MCMC light curve parameter
- nestle for nested sampling
light curve parameter estimation in