Skip to main content

Python-based PSF Homogenization kERnels production

Project description

Compute an homogenization kernel between two PSFs.

This code is well suited for PSF matching applications in both an astronomical or microscopy context.

It has been developed as part of the ESA Euclid mission and is currently being used for multi-band photometric studies of HST (visible) and Herschel (IR) data.

Paper:

http://arxiv.org/abs/1609.02006

Documentation:

https://pypher.readthedocs.io

Features

  1. Warp (rotation + resampling) the PSF images (if necessary),

  2. Filter images in Fourier space using a regularized Wiener filter,

  3. Produce a homogenization kernel.

Note: pypher needs the pixel scale information to be present in the FITS files. If not, use the provided addpixscl method to add this missing info.

Warning: This code does not

  • interpolate NaN values (replaced by 0 instead),

  • center PSF images,

  • minimize the kernel size.

Installation

PyPHER works both with Python 2.7 and 3.X and relies on numpy, scipy and astropy libraries.

Option 1: Pip

pip install pypher

Option 2: from source

git clone https://github.com/aboucaud/pypher
cd pypher
python setup.py install

Option 3: from conda-forge

conda install -c conda-forge pypher

Basic example

$ pypher psf_a.fits psf_b.fits kernel_a_to_b.fits -r 1.e-5

This will create the desired kernel kernel_a_to_b.fits and a short log kernel_a_to_b.log with information about the processing.

Acknowledging

If you make use of any product of this code in a scientific publication, please consider acknowledging the work by citing the paper using the BibTeX information in the Cite this repository section at the top right of the page.

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

pypher-0.7.2.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

pypher-0.7.2-py2.py3-none-any.whl (14.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pypher-0.7.2.tar.gz.

File metadata

  • Download URL: pypher-0.7.2.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for pypher-0.7.2.tar.gz
Algorithm Hash digest
SHA256 68c5f6da5b12980263cc0ee247ad9706a67dd27392a8a97c3e42da23180bfc63
MD5 5b6a4a8c5061694ade104bfa56661d73
BLAKE2b-256 f303a724dfae3630d1fa5b4b2d564755356c4f3306dffdd952d96d473566b35b

See more details on using hashes here.

File details

Details for the file pypher-0.7.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pypher-0.7.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for pypher-0.7.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 80861141b58bde1d7436e3ad89356efaa001ce0ab1337b6742425f622475013b
MD5 2814caae4998221f8d14cda8e17e7574
BLAKE2b-256 a06f524e0795e149738b9b0556e56f6064b9b2df6297a8ede5cbf2d17a1bd919

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page