Skip to main content

`extinction.py` rewritten and extended using Numba.

Project description

numba_extinction

Numba-accelerated implementation of the extinction package.

This package rewrites and extends the functionality of extinction.py using Numba for performance. It reproduces the original extinction curves (albeit with some ~1e-15 differences due to floating-point arithmetic).

An equivalent implementation of the UV-to-IR extinction curve by Gordon et al. (2023) is included and validated against dust_extinction for consistency.

Please check out dust_extinction too! It is much more fleshed-out and feature complete. This package was developed for personal purposes before I discovered dust_extinction and is not meant to be a replacement.


Installation

You can install numba_extinction from PyPI or in editable mode for development.

Install from source

# Clone the repository
git clone https://github.com/G-Francio/numba_extinction.git
cd numba_extinction

# Install as a local editable package
pip install -e .

Install from PyPI

pip install numba_extinction

Requirements

The package requires:

  • astropy >= 7.1.1
  • numba >= 0.62.1
  • numpy >= 2.3.4

Optional extras can be installed for validation, convenience, and plotting purposes:

# Validation and plotting
# Install matplotlib and the packages required to run the example
pip install "numba_extinction[plot]"

# Convenience
# Additionally install IPython, notebooks, and matplotlib
pip install "numba_extinction[ipython]"

Links


Authors

Francesco Guarneri (francesco.guarneri@uni-hamburg.de)
ChatGPT - For this wonderful README.md :)

Licensed under the MIT License.

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

numba_extinction-0.1.3.1.tar.gz (113.2 kB view details)

Uploaded Source

Built Distribution

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

numba_extinction-0.1.3.1-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file numba_extinction-0.1.3.1.tar.gz.

File metadata

  • Download URL: numba_extinction-0.1.3.1.tar.gz
  • Upload date:
  • Size: 113.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for numba_extinction-0.1.3.1.tar.gz
Algorithm Hash digest
SHA256 b0c0a64baad61ba08d1b1c891b1f8faa4f8637178d226668532d144ccfe531ec
MD5 e2e18c36c8b5d446e42c7d228936c68e
BLAKE2b-256 cd1222ecdb942d7e700c8986260ea67fd9180c13190ae5ffbc5007f4e528239d

See more details on using hashes here.

File details

Details for the file numba_extinction-0.1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for numba_extinction-0.1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 183dce43dd5fc3887ac2b00dd372cbe4e6e1f0f542ee31347eceaf3bb651f0ba
MD5 4e633ad1baea51bb5fc2868892f4ea4d
BLAKE2b-256 ca685f4097118d51c93782374b357aec7cdc84a74258644ac8989befb54263ee

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