Automatically stretch astronomical images in numpy array format. Useful for creating easy-to-see, non-linear jpgs from fits files.
linear (no stretch) | arcsin stretch | auto-stretch (using this library) |
---|---|---|
$ pip install auto-stretch
The stretch function operates on numpy arrays. Example use:
import numpy as np
import astropy
from auto_stretch import apply_stretch
image = np.array([[1,2],[3,1]])
stretched_image = apply_stretch(image)
print(stretched_image)
# output:
# [[0.13824057 0.51318458]
# [1. 0.13824057]]