Skip to main content

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).

  • It can perform a PSF estimation using Karhunen-Löeve expansion, which is based on Lauer 2002 work.

  • It can perform the statistical proper coadd of several images.

  • It can also perform a proper-subtraction of images.

  • Images need to be aligned and registered, or at least astroalign must be installed.

  • Contains a nice plot module for PSF visualization (needs matplotlib)

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.

Metadata

Release files for properimage 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for properimage 0.7.2
File Size Uploaded
properimage-0.7.2.tar.gz 36.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for properimage 0.7.2
File Interpreter ABI Platform
properimage-0.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 69.9 kB

Release files / properimage-0.7.2.tar.gz

Download URL properimage-0.7.2.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
781c299557709e0d262d5a4d3f1deb210510f95d5580c2c9cfcfe0df97ee9208
BLAKE2b-256 checksum
How to use checksums
4de15dc08b08c1ff269378764eedd24acc7495c0aa072d6545b2c496303aea21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / properimage-0.7.2-py3-none-any.whl

Download URL properimage-0.7.2-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f91d3265ed405454eb82cce07d6c2c4e1e04fb9cc658d78343ff3388a6dede5
BLAKE2b-256 checksum
How to use checksums
1da89aa0028ed5f88c533b45cc51a7deed4aa20ea01f67ec9b5ee4a4c54e18f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page