Installation and Setup¶
snmachine is now compatible with Python2 and Python3. There are two possible ways to set up snmachine:
Using Conda¶
By far the easiest way to install snmachine is to use anaconda.
Install anaconda if you don’t already have it (https://www.continuum.io/downloads)
Create a new anaconda environment by type (inside the snmachine folder):
conda env create --name snmachine --file environment.yml
Activate the environment by typing:
source activate snmachine
Note: If you have tsch instead of bash this will not work! A simple workaround is to manually edit your PATH environment variable to point to the new anaconda environment:
setenv PATH <your path to anaconda>/envs/snmachine/bin/:$PATH
Install snmachine by typing:
python setup.py install
or if you’re developing:
python setup.py develop
Manual Dependency Installation¶
If you don’t want to use a conda environment, snmachine requires the following packages (all of which are on either conda or pip):
channels:
- conda-forge
dependencies:
- astropy>=1.1.2
- jupyter>=1.0.0
- matplotlib>=1.5.1
- numpy=1.12.0
- scikit-learn=0.18.1
- scipy>=0.17.0
- george>=0.3.0
- sphinx_rtd_theme>=0.3.0
- pip:
- emcee>=2.1.0
- iminuit>=1.2
- numpydoc>=0.6.0
- pywavelets>=0.4.0
- sncosmo>=1.3.0
- nose>=1.3.7
- future>=0.16
Installation Caveats¶
snmachine has the ability to use nested sampling for some of the parameter estimates, which we have found to give much more reliable fits than least squares. However this depends on pymultinest being installed separately, since it requires manual compiling of Fortran code (but not it’s not a particularly difficult one).