This package is a flexible elemental abundance fitting tool for stellar abundances. It takes nucleosynthetic yield tables from literature, integrates them over the IMF for simple stellar (SSP) populations and uses successive SSPs to integrate the chemical evolution of an open-box one-zone inter stellar medium (ISM) over time.

Package main content

This package is mostly organized around:

Additionally, and for convenience

To get started with using Chempy it is strongly recommended to browse through the extensive tutorial.


  • Using pip:
pip install git+
  • Manually:
git clone
cd Chempy
python intall

Quick Start

Look into the very extensive jupyter tutorial. Here is a short preview:

# Loading the default parameters
from Chempy.parameter import ModelParameters
a = ModelParameters()

# Evaluating the Chempy posterior at the maximum prior parameters
from Chempy.cem_function import cem
a.testing_output = True
a.summary_pdf = True
a.observational_constraints_index = ['gas_reservoir','sn_ratio','sol_norm']
posterior, blobs = cem(a.p0,a)


  • Chempy paper

Indices and tables