Skip to main content

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

Metadata

Release files for igimf 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for igimf 1.0.0
File Size Uploaded Provenance
igimf-1.0.0.tar.gz 43.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for igimf 1.0.0
File Interpreter ABI Platform
igimf-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 88.1 kB

Release files / igimf-1.0.0.tar.gz

Download URL igimf-1.0.0.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cd56ddd54fe8d4c098ac460fe4dc30c41a4296d9256432dfb94b4b2529796154
BLAKE2b-256 checksum
How to use checksums
ee296df0ab79d7afb61e19a7790af1e3421e7678c5b1d6befa2c66e4de1cae44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.20

Release files / igimf-1.0.0-py3-none-any.whl

Download URL igimf-1.0.0-py3-none-any.whl
Size 44.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d0172adb1b35ec115de2b690b6038f7740848d90108eb1b71d4059ab67203b6
BLAKE2b-256 checksum
How to use checksums
0b6d65b6e88a7e9937bd4d7a447e1ae35263d07e0d8d01ae8841fa20815bf19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.20

Security for igimf 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page