Astrometric Alignment of Images
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://toros-astro.github.io/astroalign/.
Full documentation: https://astroalign.readthedocs.io/
$ pip install astroalign
or from this distribution with
$ python setup.py install
>>> 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
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)
target can each either be the numpy array of the image, or an iterable of (x, y) pairs of star positions on the image.
transf object is a scikit-image
SimilarityTranform object that contains the transformation matrix along with the scale, rotation and translation parameters.
t_list are numpy arrays of (x, y) point correspondence between
transf applied to
s_list will approximately render
This package is inspired by the astrometry.net program
TOROS Dev Team
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size astroalign-2.0.2-py3-none-any.whl (13.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size astroalign-2.0.2.tar.gz (56.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for astroalign-2.0.2-py3-none-any.whl