Astrometric Alignment of Images
Project description
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
Install from PyPI
$ pip install astroalign
Running Tests
python tests/test_align.py
or using pytest:
pytest -v
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.
- astrometry.net
- reproject
- Watney Astrometry Engine
- Stellar Solver
- THRASTRO
- Montage
- Aafitrans
- astrometry
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astroalign-2.6.2.tar.gz.
File metadata
- Download URL: astroalign-2.6.2.tar.gz
- Upload date:
- Size: 95.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f993bdc8346c65b57ff6700c084431b7f870ce9bccc5dbfecf206633de1ea639
|
|
| MD5 |
c42ba6b81486534788228b68c3965c46
|
|
| BLAKE2b-256 |
3c10f4d7f2a6d7296c0ef3db9b17c3f3e851f7b7775a46ca50f1a605c55d0994
|
File details
Details for the file astroalign-2.6.2-py3-none-any.whl.
File metadata
- Download URL: astroalign-2.6.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c22da44c152222854f47d754ddb873d0fb012e6e2d60f84044d4fca0b494b6db
|
|
| MD5 |
4c231a01c43e8354042bd34c52a45585
|
|
| BLAKE2b-256 |
4096a333f38d1722f1ec542ca6554c599de09b4b843baf899e9915dee5d95444
|