pimf

pIMF

pIMF (python Initial Mass Functions, pronounced pie-em-eff) is a small library for manipulating stellar Initial Mass Functions.

Quick Start

To find the percentage of stars between 1 and 100 solar masses:

>>> from pimf import PowerLawIMF
>>> s55 = PowerLawIMF()
>>> s55.integrate(1, 100) / s55.integrate(0.1, 100)
>>> 0.04458320760384313

All of the IMFs in pimf.initialmassfunction are also exposed here:

InitialMassFunction

PowerLawIMF

Implement a power law IMF of the form \(\xi(m)dm = \xi_0 m^\alpha dm\).

ChabrierIMF

Implement a Chabrier IMF of the form

\[\begin{split} \xi(m)dm = \xi_0 \begin{cases} \frac{1}{m}\exp\left(\frac{-\left(\log m - \log m_c\right)^2}{2\sigma^2}\right), & m \leq 1M_\odot\\ \xi_\textrm{continuity} m^{\alpha}, & 1M_\odot \leq m \end{cases} \end{split}\]

BrokenPowerLawIMF

Implement a broken power law IMF of the form:

\[\begin{split} \xi(m)dm = \xi_0\begin{cases} m^{\alpha_1}, & m \leq M_\textrm{transition} \\ \xi_\textrm{continuity}m^{\alpha_2}, & M_\textrm{transition} \leq m \end{cases} \end{split}\]

L3IMF

Implement an L3 IMF of the form

\[ \xi(m)dm = \xi_0 \left(\frac{m}{\mu}\right)^{-\alpha}\left(1 + \left(\frac{m}{\mu}\right)^{1-\alpha}\right)^{-\beta} dm, \]
introduced in Maschberger (2013).

LognormalIMF

Implement a Lognormal IMF of the form

\[ \xi(m)dm = \xi_0\frac{1}{m}\exp\left(\frac{-\left(\log m - \log m_c\right)^2}{2\sigma^2}\right) \]

GeneralisedGammaIMF

Implement a Generalised Gamma Function IMF of the form \(\xi(m) = \xi_0 m^\alpha\exp\left[-\left(\frac{m}{m_c}\right)^\beta\right]\).

Subpackages

Submodules

Package Contents

Data

API

pimf.__version__ = '0.9.2'
pimf.__all__ = None