Skip to main content

IGIMF models, plots, and utilities

Project description

pyIGIMF

Fast computation of the integrated galaxy-wide initial mass function (IGIMF)

Direct queries to Eda Gjergo (Nanjing University) GalacticCEM@gmail.com

Default use

From a Terminal

pip install igimf

You can choose the linear or logistic alpha1 prescription.

In a script or directly in a Python console:

import numpy as np
from igimf import classes as inst

Z_solar = 0.0142

# input (edit as needed)
SFR = 2 # Msun/yr
metal_mass_fraction = 0.1 * Z_solar
mass_star = np.logspace(np.log10(0.08), np.log10(150), 100)
alpha1slope = 'logistic' # or 'linear' 

o_IGIMF = inst.IGIMF(metal_mass_fraction=metal_mass_fraction, SFR=SFR, alpha1slope=alpha1slope)

igimf_v = o_IGIMF.IGIMF_func(mass_star)

o_IGIMF creates an instance of the IGIMF class. This object contains IGIMF_func, the IGIMF function computed at the given SFR and metal mass fraction. IGIMF_func can be applied to any stellar mass vector. In the above script, igimf_v is the IGIMF function computed for the stallar mass vector mass_star

Setup

conda env create -f environment.yaml
conda activate igimf

Run the minimum working example automatically

python examples/mwe.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

igimf-1.0.0.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

igimf-1.0.0-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file igimf-1.0.0.tar.gz.

File metadata

  • Download URL: igimf-1.0.0.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for igimf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cd56ddd54fe8d4c098ac460fe4dc30c41a4296d9256432dfb94b4b2529796154
MD5 02d0c768e96884cf5921502e539915f1
BLAKE2b-256 ee296df0ab79d7afb61e19a7790af1e3421e7678c5b1d6befa2c66e4de1cae44

See more details on using hashes here.

File details

Details for the file igimf-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: igimf-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for igimf-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d0172adb1b35ec115de2b690b6038f7740848d90108eb1b71d4059ab67203b6
MD5 1fc5cef01cdf3c907d090e7cbd883ec5
BLAKE2b-256 0b6d65b6e88a7e9937bd4d7a447e1ae35263d07e0d8d01ae8841fa20815bf19c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page