multicolorfits.align_stack#

multicolorfits.align_stack(images, reference=None, optimal=False, frame=None, **kwargs)[source]#

High-level alignment: pick a master header, reproject every layer onto it, return [(data, hdr), ...] ready for the color pipeline.

Exactly one of reference or optimal must be used to choose the master grid:

  • reference=N – use image N’s header (optionally converted to frame first).

  • optimal=True – compute the smallest common header with optimal_common_header() (requires reproject).

Parameters:
  • images (list of (array, header))

  • reference (int or None) – Index of reference layer. Mutually exclusive with optimal=True.

  • optimal (bool) – Use reproject.mosaicking.find_optimal_celestial_wcs.

  • frame (str or None) – Target celestial frame for the master header (‘galactic’, ‘icrs’, …).

  • **kwargs – Passed through to reproject_image (method, scale, …).

Returns:

list of (array, header)