quatrope / astroalign

A tool to align astronomical images based on asterism matching
MIT License
143 stars 44 forks source link

Add aligning a batch of images to a single one #55

Open martinberoiz opened 4 years ago

martinberoiz commented 4 years ago

Since the situation to align many images to a single one for co-addition is fairly common, astroalign could add a feature to make it easier working this case.

Making the register method accept a list of images in the source argument would cause it to return a list of images on output and that would break signature consistency.

Another option is to add another function batch_register for iterables. The default target, if not specified, would be the middle image of the iterable.

import astroalign as aa
list_aligned, list_footprint = aa.batch_register(list_of_images)

or

list_aligned, list_footprint = aa.batch_register(source=list_of_images, target=list_of_images[0])