Skip to main content

An absorption database reader for the Eradiate radiative transfer model.

Project description

AxsDB — The Eradiate Absorption Cross-section Database Interface

PyPI version GitHub Workflow Status (branch) Documentation Status uv ruff

This library provides an interface to read and query the absorption databases of the Eradiate radiative transfer model.

Features

  • Monochromatic and CKD databases: Read and evaluate absorption coefficients for both monochromatic and correlated-k distribution spectral representations.
  • Fast interpolation: Numba-accelerated multi-dimensional interpolation of thermophysical profiles (pressure, temperature, mole fractions).
  • Configurable error handling: Fine-grained, per-coordinate control over out-of-bounds behaviour (clamp, fill, raise, warn).
  • Efficient I/O: Lazy or eager loading of NetCDF data files, with LRU caching for repeated lookups.
  • xarray and Pint integration: Works natively with xarray datasets and Pint quantities.
  • CLI: Validate database integrity from the command line with axsdb check.

Installation

Python 3.9 or later is required.

pip install axsdb

Quick start

import xarray as xr
from axsdb import MonoAbsorptionDatabase
from axsdb.units import get_unit_registry

ureg = get_unit_registry()

# Open a database directory
db = MonoAbsorptionDatabase.from_directory("path/to/database")

# Load a thermophysical profile
thermoprops = xr.load_dataset("path/to/thermoprops.nc")

# Evaluate the absorption coefficient at a given wavelength
sigma_a = db.eval_sigma_a_mono(
    w=550.0 * ureg.nm,
    thermoprops=thermoprops,
)

For CKD databases, use CKDAbsorptionDatabase and eval_sigma_a_ckd (which takes an additional g parameter for the quadrature point).

CLI

AxsDB ships a command-line tool to validate databases:

# Check a monochromatic database
axsdb check path/to/database -m mono

# Check and fix missing index files
axsdb check path/to/database -m ckd --fix

Documentation

Full documentation is available at axsdb.readthedocs.io.

License

AxsDB is distributed under the terms of the GNU Lesser General Public License v3.0.

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

axsdb-0.1.0.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

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

axsdb-0.1.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file axsdb-0.1.0.tar.gz.

File metadata

  • Download URL: axsdb-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axsdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00074aa84a7a3b4d449f6cf361abfdb80075952a40b06bf77f5a119b76615c16
MD5 a5a3a62dea022e76f3402f51e0e25fed
BLAKE2b-256 c2ff312b22dbe1244edce010bac186ba494195d540ed431d964816e90c55cac8

See more details on using hashes here.

Provenance

The following attestation bundles were made for axsdb-0.1.0.tar.gz:

Publisher: release.yml on eradiate/axsdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file axsdb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: axsdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axsdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db886233729addc2554c150c53e07296d86d791547c26107a9d5466fb6b19dbd
MD5 849550ed6df3a1cf518c8ee98f585814
BLAKE2b-256 dd4cb7089c283006f4050e0c86b87be6f561c15b07343f04b983ded100c17598

See more details on using hashes here.

Provenance

The following attestation bundles were made for axsdb-0.1.0-py3-none-any.whl:

Publisher: release.yml on eradiate/axsdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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