{"id":18843329,"url":"https://github.com/quatrope/properimage","last_synced_at":"2025-04-14T07:32:27.049Z","repository":{"id":34106705,"uuid":"37934820","full_name":"quatrope/ProperImage","owner":"quatrope","description":"Proper Image utils for astronomy. ","archived":false,"fork":false,"pushed_at":"2024-02-13T16:34:07.000Z","size":157511,"stargazers_count":27,"open_issues_count":20,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T05:19:19.199Z","etag":null,"topics":["astronomy","coaad-images","data-analysis-python","dia","image-difference","image-processing","image-subtraction","psf-estimation","python","zogy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quatrope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-06-23T17:46:55.000Z","updated_at":"2025-03-01T04:45:06.000Z","dependencies_parsed_at":"2024-02-13T18:03:30.853Z","dependency_job_id":"be66642a-18c1-4ba2-a226-8d39269ed6bb","html_url":"https://github.com/quatrope/ProperImage","commit_stats":null,"previous_names":["toros-astro/properimage"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quatrope%2FProperImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quatrope%2FProperImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quatrope%2FProperImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quatrope%2FProperImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quatrope","download_url":"https://codeload.github.com/quatrope/ProperImage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839518,"owners_count":21169825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astronomy","coaad-images","data-analysis-python","dia","image-difference","image-processing","image-subtraction","psf-estimation","python","zogy"],"created_at":"2024-11-08T02:57:31.391Z","updated_at":"2025-04-14T07:32:22.217Z","avatar_url":"https://github.com/quatrope.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proper image treatments\n\n[![QuatroPe](https://img.shields.io/badge/QuatroPe-Applications-1c5896)](https://quatrope.github.io/)\n[![Build Status](https://github.com/quatrope/ProperImage/actions/workflows/python-properimage-ci.yml/badge.svg?branch=master)](https://github.com/quatrope/ProperImage/actions/workflows/python-properimage-ci.yml)\n[![Documentation Status](https://readthedocs.org/projects/properimage/badge/?version=latest)](http://properimage.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/quatrope/ProperImage/branch/master/graph/badge.svg)](https://codecov.io/gh/quatrope/ProperImage)\n[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://badge.fury.io/py/properimage)\n[![License](https://img.shields.io/pypi/l/properimage?color=blue)](https://tldrlegal.com/license/bsd-3-clause-license-(revised))\n[![ascl:1904.025](https://img.shields.io/badge/ascl-1904.025-blue.svg?colorB=262255)](http://ascl.net/1904.025)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nThis code is inspired on [Zackay \u0026 Ofek 2017](http://arxiv.org/abs/1512.06872)  papers *How to coadd images?* (see References below).\n\n* It can perform a PSF estimation using [Karhunen-Löeve expansion](https://en.wikipedia.org/wiki/Karhunen–Loève_theorem), which is based on [Lauer 2002](https://doi.org/10.1117/12.461035) work.\n\n* It can perform the statistical proper coadd of several images.\n\n* It can also perform a proper-subtraction of images.\n\n* Images need to be aligned and registered, or at least [astroalign](https://github.com/toros-astro/astroalign) must be installed.\n\n* Contains a nice plot module for PSF visualization (_needs matplotlib_)\n\n## Installation\n\nTo install from PyPI\n\n```console\n$ pip install properimage\n```\n\n## Quick usage\n\n### PSF estimation\n\n```python\n\u003e\u003e\u003e from properimage import singleimage as si\n\u003e\u003e\u003e with si.SingleImage(frame, smooth_psf=False) as sim:\n...     a_fields, psf_basis = sim.get_variable_psf(inf_loss=0.15)\n```\n\n### Proper-subtraction of images\n\nTo create a proper-subtraction of images:\n\n```python\n\u003e\u003e\u003e from properimage.operations import subtract\n\u003e\u003e\u003e D, P, Scorr, mask = subtract(ref=ref_path, new=new_path, smooth_psf=False, fitted_psf=True,\n...                             align=False, iterative=False, beta=False, shift=False)\n```\n\nWhere `D`, `P`, `Scorr` refer to the images defined by the same name in [Zackay \u0026 Ofek](https://iopscience.iop.org/article/10.3847/0004-637X/830/1/27/meta) paper.\n\nFor the full documentation refer to [readthedocs](https://properimage.readthedocs.io).\n\n## Rerefences\n\n\u003e Zackay, B., \u0026 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](http://arxiv.org/abs/1512.06872)\n\u003e\n\u003e Zackay, B., \u0026 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](http://arxiv.org/abs/1512.06879)\n\u003e\n\u003eZackay, B., Ofek, E. O., \u0026 Gal-Yam, A. (2016). Proper Image Subtrraction-Optimal Transient Detection, Photometry, and Hypothesis Testing. [The Astrophysical Journal, 830(1), 27.](https://iopscience.iop.org/article/10.3847/0004-637X/830/1/27/meta)\n\u003e\n\u003eLauer, 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.](https://doi.org/10.1117/12.461035)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquatrope%2Fproperimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquatrope%2Fproperimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquatrope%2Fproperimage/lists"}