Skip to content

noobase

Foundational pure-function utilities for astronomy analysis. The package has a Rust core and Python bindings, with a focus on deterministic numerical kernels for spectra, photometry, image reprojection, convolution, and PSF construction.

Pre-1.0

noobase is pre-1.0. Public APIs may change between minor versions.

Install

Python:

uv add noobase

Rust:

[dependencies]
noobase = { git = "https://github.com/YoRHazero/noobase.git", tag = "v0.0.6" }

Python 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.spectroscopy.Spectrum(
    wavelength=wavelength,
    flux=flux,
    error=error,
    spacing="linear",
    kind="centers",
)

target = np.linspace(1.0, 5.0, 40)
rebinned = spectrum.rebin(target=target, spacing="linear", kind="centers")

API Reference

The Python API reference is generated from runtime docstrings exposed by the PyO3 bindings.

  • Axis: Grid and bin-overlap rebinning primitives
  • Convolve: correlation kernels and Gaussian constructor
  • Spectroscopy: Spectrum and synthetic photometry
  • Image: reprojection, convolution, and stamp extraction
    • PSF: ePSF and extended-PSF construction (noobase.image.psf)