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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file processinator-0.5.0.tar.gz.
File metadata
- Download URL: processinator-0.5.0.tar.gz
- Upload date:
- Size: 11.0 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b09f498ad63037e57d52fff386e7ce525e13d97011ff55a87ed0c51c5f5d682
|
|
| MD5 |
d4e6f2b558121dca306d8f0ea6d57d22
|
|
| BLAKE2b-256 |
4b2b72990c6ae87c0bc843fc281e68cc0881715903e9db1149954f436650ba06
|
File details
Details for the file processinator-0.5.0-py3-none-any.whl.
File metadata
- Download URL: processinator-0.5.0-py3-none-any.whl
- Upload date:
- Size: 14.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d28ee583cc74232310628ce8aab51ed7863c6f5962c378a3f5314b5dd30e85c
|
|
| MD5 |
2089f59c041a4c5d7d9f045d0302f60c
|
|
| BLAKE2b-256 |
383c3a82f915b4e9976b6e7ca00751137115490ddcfcbfeba4984d5281546edf
|