quatrope / ProperImage

Proper Image utils for astronomy.
BSD 3-Clause "New" or "Revised" License
26 stars 6 forks source link
astronomy coaad-images data-analysis-python dia image-difference image-processing image-subtraction psf-estimation python zogy

Proper image treatments

QuatroPe Build Status Documentation Status codecov Python 3.8 License ascl:1904.025 Code style: black

This code is inspired on Zackay & Ofek 2017 papers How to coadd images? (see References below).

Installation

To install from PyPI

$ pip install properimage

Quick usage

PSF estimation

>>> from properimage import singleimage as si
>>> with si.SingleImage(frame, smooth_psf=False) as sim:
...     a_fields, psf_basis = sim.get_variable_psf(inf_loss=0.15)

Proper-subtraction of images

To create a proper-subtraction of images:

>>> from properimage.operations import subtract
>>> D, P, Scorr, mask = subtract(ref=ref_path, new=new_path, smooth_psf=False, fitted_psf=True,
...                             align=False, iterative=False, beta=False, shift=False)

Where D, P, Scorr refer to the images defined by the same name in Zackay & Ofek paper.

For the full documentation refer to readthedocs.

Rerefences

Zackay, B., & Ofek, E. O. (2017). How to Coadd Images. I. Optimal Source Detection and Photometry of Point Sources Using Ensembles of Images. The Astrophysical Journal, 836(2), 187. Arxiv version

Zackay, B., & Ofek, E. O. (2017). How to Coadd Images. II. A Coaddition Image that is Optimal for Any Purpose in the Background-dominated Noise Limit. The Astrophysical Journal, 836(2), 188. Arxiv version

Zackay, B., Ofek, E. O., & Gal-Yam, A. (2016). Proper Image Subtrraction-Optimal Transient Detection, Photometry, and Hypothesis Testing. The Astrophysical Journal, 830(1), 27.

Lauer, T. (2002, December). Deconvolution with a spatially-variant PSF. In Astronomical Data Analysis II (Vol. 4847, pp. 167-174). International Society for Optics and Photonics.