The PyChem.libimf module

PyChem.libimf.ComputeConstants(m_s, a_s, mmin, mmax)

compute the coefficients of the power laws (b_s) that normalize the imf:

Parameters
  • m_s (ndarray) – masses

  • a_s (ndarray) – slopes

  • mmin (float) – min mass of the stars in the IMF

  • mmax (float) – max mass of the stars in the IMF

Returns

b_s

PyChem.libimf.WriteH5Params(ParentGroup, Mmin, Mmax, m_s, a_s)

Write the IMF parameters in an hdf5 file:

Parameters
  • f (file handler) – file

  • Mmin (float) – min mass of the stars in the IMF

  • Mmax (float) – max mass of the stars in the IMF

  • m_s (ndarray) – masses

  • a_s (ndarray) – slopes

Returns

None

PyChem.libimf.WriteParams(f, Mmin, Mmax, m_s, a_s)

Write the IMF parameters in a file:

Parameters
  • f (file handler) – file

  • Mmin (float) – min mass of the stars in the IMF

  • Mmax (float) – max mass of the stars in the IMF

  • m_s (ndarray) – masses

  • a_s (ndarray) – slopes

Returns

None

PyChem.libimf.imf(m, m_s, a_s, b_s, mmin, mmax)

Compute an IMF, as a suite of power law:

Parameters
  • m (float) – star mass

  • m_s (ndarray) – masses

  • a_s (ndarray) – slopes

  • b_s (ndarray) – constants

  • mmin (float) – min mass of the stars in the IMF

  • mmax (float) – max mass of the stars in the IMF

Returns

imf

PyChem.libimf.imfv(m, m_s, a_s, b_s, mmin, mmax)

Warning

Needs to be documented !!!

Parameters
  • m (float) – star mass

  • m_s (ndarray) – masses

  • a_s (ndarray) – slopes

  • b_s (ndarray) – constants

  • mmin (float) – min mass of the stars in the IMF

  • mmax (float) – max mass of the stars in the IMF