Skip to content

oliverphilcox/ChempyMulti

Repository files navigation

DOI

ChempyMulti - Multi-Star Bayesian Inference with Chempy

This is an updated version of the Chempy software, including yield table scoring as described in Philcox, Rybizki & Gutke (2018, ApJ, arXiv), and multi-star Bayesian inference as described in Philcox & Rybizki (2019, submitted to ApJ, arXiv). This replaces the ChempyScoring package.

Chempy is a flexible one-zone open-box chemical evolution model, incorporating abundance fitting and stellar feedback calculations. We provide routines for parameter optimization for simulations and observational data and yield table scoring.

Tutorials

We provide the following tutorials on basic Chempy usage as well as yield table scoring and multi-parameter inference:

Installation

pip install git+https://github.com/oliverphilcox/ChempyMulti.git

Chempy should run with the latest python 2 and python 3 versions. Its dependencies are: Numpy, SciPy, matplotlib, multiprocessing, corner (for MCMC plots) and tqdm (for timing multiprocessing). For yield table scoring we additionally require emcee (for the Ensemble MCMC inference), PyTorch (for Neural Networks) and scikit-monaco (for Monte Carlo integration). For multi-star inference we instead require scikit-learn (for Neural Networks) and PyMC3 (for HMC inference).

These are all pip installable and you can also get part of it with Anaconda.

Installation without admin rights:

You can install ChempyMulti into a folder where you have write access:

pip install --install-option='--prefix=~/extra_package/' git+https://github.com/oliverphilcox/ChempyMulti.git

Then you have to add the site-packages/ folder which will be one of the newly created subfolders in extra_package/ into the PYTHONPATH variable, e.g.:

export PYTHONPATH=~/extra_package/lib/python3.6/site-packages/:$PYTHONPATH

If you want this to be permanent, you can add the last line to your .bashrc.

Authors

Collaborators

  • Hans-Walter Rix (MPIA)
  • Andreas Just (ZAH)
  • Morgan Fouesneau (MPIA)
  • Nathan Sandford (UC Berkeley)

Links

  • Philcox & Rybizki (2019, submitted to ApJ, arXiv) - Multi-Star Inference
  • Philcox, Rybizki & Gutcke (2018, ApJ, arXiv, Zenodo) - Yield Table Scoring
  • Rybizki, Just & Rix (A&A, arXiv, ASCL) - The Chempy model
  • An early version of Chempy is presented in chapter 4 of Jan's phd thesis.

Getting Started

To run tutorials interactively first clone the repository with

git clone https://github.com/oliverphilcox/ChempyScoring.git

Then you can jupyter notebook from within the tutorial folder (it will run if you have installed ChempyMulti). If you did not install ChempyScoring you can still run the tutorial but need to point to the files in the Chempy folder. Basically you have to cd ../ChempyScoring/ and then replace each from Chempy import ... with from . import ....

You can also have a look at the preliminary Chempy documentation which gives an overview over the Chempy classes and functions, although this does not yet provide support for the Scoring, Neural Network or Multi-Star implementations.

Attribution

Please cite the initial Chempy paper, the scoring table and neural network paper and the multi-star paper when using the code in your research.