Skip to main content

Astronomy image processing library

Project description

processinator

Astronomy image processing library. Converts linear FITS data into visually useful images using nonlinear stretch algorithms.

Install

pip install processinator

JAX is included by default for JIT-accelerated stretching on CPU.

GPU acceleration

For GPU-accelerated processing, install the appropriate extra for your hardware:

NVIDIA (CUDA 12):

pip install processinator[cuda]

AMD (ROCm):

pip install processinator[rocm]
# Then install the ROCm JAX wheel:
pip install --upgrade jaxlib-rocm  # see https://jax.readthedocs.io/en/latest/installation.html#amd-gpu-rocm

Apple Silicon (Metal):

pip install processinator[metal]

Check which backend is active:

import processinator
print(processinator.backend_name())  # "JAX (GPU)", "JAX (CPU)", or "numpy"

Usage

from processinator import stretch, fits_to_image, StretchAlgorithm

# High-level: FITS file → PNG/JPEG
image = fits_to_image("my_image.fits", output_path="stretched.png")

# Low-level: numpy array → stretched array
import numpy as np
from astropy.io import fits

data = fits.getdata("my_image.fits").astype(np.float64)
stretched = stretch(data, algorithm=StretchAlgorithm.MTF)

Algorithms

Algorithm Best for Description
MTF (default) General use Midtones Transfer Function with background neutralization
Arcsinh Color preservation Inverse hyperbolic sine, maintains color ratios
Log High dynamic range Logarithmic stretch
Linear Quick preview Simple percentile-based clip and scale
Statistical Consistent output Gamma correction targeting a specific median

License

AGPL-3.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

processinator-0.4.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

processinator-0.4.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file processinator-0.4.0.tar.gz.

File metadata

  • Download URL: processinator-0.4.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for processinator-0.4.0.tar.gz
Algorithm Hash digest
SHA256 604e93ee1b0659a20a96287aa1d3d66ec99676b80abc7b7d5ffb6b73336ce06f
MD5 f5b8277473b0722b9b16ad8fab627914
BLAKE2b-256 d8cc0a5bc5e443711fca23d7d8f606cd7f4ab3c188e68ce8bfc3e2e4db65d091

See more details on using hashes here.

File details

Details for the file processinator-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: processinator-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for processinator-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7662a377876ab691b3f1e78e337d26935c4b6741aff29df6c0530004780af464
MD5 4ea2881dc0fd5cfe13898f8f1ecc2280
BLAKE2b-256 431236dd33632d7381ef87480336675ec773053fa3e03aa113b1d0862bd809c3

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