Skip to main content

Foundational pure-function utilities for astronomy analysis

Project description

noobase

Foundational pure-function utilities for astronomy analysis. Rust core with Python bindings via PyO3.

Status: pre-1.0, API unstable. Breaking changes expected between minor versions.

Install

pip install noobase

Requires Python 3.12 or newer. Wheels are published for linux-x86_64, macos-arm64, and windows-x86_64; a source distribution is also available.

Quick start

import numpy as np
import noobase

wavelength = np.linspace(1.0, 5.0, 200)
flux = np.exp(-((wavelength - 3.0) ** 2) / 0.5)
error = 0.01 * np.ones_like(flux)

spectrum = noobase.Spectrum(
    wavelength=wavelength,
    flux=flux,
    error=error,
    spacing="linear",
    kind="centers",
)

transmission_grid = np.linspace(2.5, 3.5, 50)
transmission_values = np.exp(-((transmission_grid - 3.0) ** 2) / 0.05)

band_flux, band_error, coverage = spectrum.synthetic_photometry(
    transmission_grid=transmission_grid,
    transmission_values=transmission_values,
    convention="photon_counting",
)

What's in the box

  • Grid — 1-D monotonic axis (linear / log, centers / edges)
  • Spectrum — wavelength + flux + optional error + optional mask, with rebinning and flux density convention conversion
  • photometry.SyntheticOperator — cached synthetic photometry suited for MCMC hot loops
  • image.reproject_exact — surface-brightness-conserving image reprojection via planar polygon clipping (rayon-parallel; WCS handling stays in the caller's astropy / gwcs)
  • image.make_pixel_corners — turn a pair of pixel_to_world_values / world_to_pixel_values callables (astropy.wcs or gwcs) into the corner array consumed by reproject_exact, with optional coarse_step for expensive WCS chains

See the full project README on GitHub for the complete feature list, the workspace layout, and the development workflow.

License

MIT.

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

noobase-0.0.2.tar.gz (71.9 kB view details)

Uploaded Source

Built Distributions

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

noobase-0.0.2-cp312-abi3-win_amd64.whl (266.0 kB view details)

Uploaded CPython 3.12+Windows x86-64

noobase-0.0.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (389.4 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

noobase-0.0.2-cp312-abi3-macosx_11_0_arm64.whl (343.2 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

Details for the file noobase-0.0.2.tar.gz.

File metadata

  • Download URL: noobase-0.0.2.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for noobase-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6295d44f11cb88b654f7003a3c2ba9b958025a9eef15d4cb5846c251850873d8
MD5 a361022bd3dfcde0be951f3fd3200adb
BLAKE2b-256 b16f4105269ff1f78898cdc914f62d2164f76054da85eea6d0e8b7d7a8e79ab5

See more details on using hashes here.

File details

Details for the file noobase-0.0.2-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: noobase-0.0.2-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 266.0 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for noobase-0.0.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fa4ee41c19c1dd63500adb2df6cadf8cddbd778db42bc768c61bf479728143fd
MD5 931e47d5b543acac80a584be061cb26e
BLAKE2b-256 0fa7ee5fe9dea5af7513e2039e8fd4a08dd19e9eb179cfa250b888abe1e87bb6

See more details on using hashes here.

File details

Details for the file noobase-0.0.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for noobase-0.0.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4afd5d4e18b4038c643a93f6a31bd979398e745695820c4e8ff736b58ec1e361
MD5 cab213945165806b5a4dea279ac3fbc6
BLAKE2b-256 3e07fb2924d2301a396dcca7ab0191a40f88a2fd0594310aaf185eeef2be62a6

See more details on using hashes here.

File details

Details for the file noobase-0.0.2-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for noobase-0.0.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e28b8702a6433e47e44c306f0cf6d300d29dad57ab38cfd80df166d340b6ee94
MD5 6b33917d312a029297c774ba4d6b86c2
BLAKE2b-256 041114d2e866647b42b40cac575d58ccc396c1e19f6d3f87109909776f1817bd

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