Skip to main content

Astrometric Alignment of Images

Project description

logo


QuatroPe unit tests Coverage Documentation Status PyPI PyPI - Downloads ascl:1906.001

ASTROALIGN is a python module that will try to align two stellar astronomical images, especially when there is no WCS information available.

It does so by finding similar 3-point asterisms (triangles) in both images and deducing the affine transformation between them.

Generic registration routines try to match feature points, using corner detection routines to make the point correspondence. These generally fail for stellar astronomical images, since stars have very little stable structure and so, in general, indistinguishable from each other. Asterism matching is more robust, and closer to the human way of matching stellar images.

Astroalign can match images of very different field of view, point-spread function, seeing and atmospheric conditions.

It may not work, or work with special care, on images of extended objects with few point-like sources or in very crowded fields.

You can find a Jupyter notebook example with the main features at http://quatrope.github.io/astroalign/.

Full documentation: https://astroalign.readthedocs.io/

Installation

Using setuptools:

$ pip install astroalign

or from this distribution with

$ python setup.py install

Performance: Optional

This library is optionally compatible with bottleneck and may offer performance improvements in some cases. Install bottleneck in your project as a peer to astroalign using:

pip install bottleneck

Astroalign will pick this optional dependency up and use it's performance improved functions for computing transforms.

Running Tests

python tests/test_align.py

Usage example

>>> import astroalign as aa
>>> aligned_image, footprint = aa.register(source_image, target_image)

In this example source_image will be interpolated by a transformation to coincide pixel to pixel with target_image and stored in aligned_image.

If we are only interested in knowing the transformation and the correspondence of control points in both images, use find_transform will return the transformation in a Scikit-Image SimilarityTransform object and a list of stars in source with the corresponding stars in target.

>>> transf, (s_list, t_list) = aa.find_transform(source, target)

source and target can each either be the numpy array of the image (grayscale or color), or an iterable of (x, y) pairs of star positions on the image.

The returned transf object is a scikit-image SimilarityTranform object that contains the transformation matrix along with the scale, rotation and translation parameters.

s_list and t_list are numpy arrays of (x, y) point correspondence between source and target. transf applied to s_list will approximately render t_list.

Related Software

There are other related software that may offer similar functionality as astroalign. This list is not exhaustive and may be others.

Citation

If you use astroalign in a scientific publication, we would appreciate citations to the following paper:

Astroalign: A Python module for astronomical image registration.
Beroiz, M., Cabral, J. B., & Sanchez, B.
Astronomy & Computing, Volume 32, July 2020, 100384.

TOROS Dev Team

martinberoiz@gmail.com

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

astroalign-2.5.0.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astroalign-2.5.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file astroalign-2.5.0.tar.gz.

File metadata

  • Download URL: astroalign-2.5.0.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for astroalign-2.5.0.tar.gz
Algorithm Hash digest
SHA256 14e14ea41e70dc9d624b4202166857e1a44b691aa44984b30ebd0cdf6cd6a339
MD5 5af3efcc5aef2c03506e7a5cab117212
BLAKE2b-256 8c3610b8eef1af8622d931b120e85f4527cc0362de2e25184a1f6b060dc795c9

See more details on using hashes here.

File details

Details for the file astroalign-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: astroalign-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for astroalign-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a396b9f43cf9b79098792fa29da287604ebb5ef8592420805a6508300cbfc25
MD5 45a628cb09e143ca74b0e833a16927a5
BLAKE2b-256 383d9218c1fe40f76c6b84aa3a04743449d47171f97edad67a17a109d8fe5319

See more details on using hashes here.

Supported by

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