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.5.1.tar.gz (11.1 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.5.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: processinator-0.5.1.tar.gz
  • Upload date:
  • Size: 11.1 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.5.1.tar.gz
Algorithm Hash digest
SHA256 5985f5db5075b4ca38611e829bb407c79e050b3196248f1e25674e4016f7d2ab
MD5 d4c90f9f76907095365c7251c207b2eb
BLAKE2b-256 0d7e43cdeb3e69f2a87eb65817276f03471b55f53b965c69009b16e76c8e734d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: processinator-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 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.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db2db7cb71e068c7bb412c3ae08de8770b7953b9661a35c62ed24650b5d08044
MD5 df82643a8f57f40769e0667e978664b1
BLAKE2b-256 3d4ef47b1492bb34ded18122187e542015544f2b4850da2823f77dc7de79017d

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