multicolorfits.optimal_common_header#

multicolorfits.optimal_common_header(images, frame=None, projection='TAN', **kwargs)[source]#

Compute an optimal common header covering a set of images, using reproject.mosaicking.find_optimal_celestial_wcs. Useful as the ‘master header’ that all layers get reprojected onto before combining.

Requires the optional ‘reproject’ package.

Parameters:
  • images (list) – List of (data, header) tuples (or of astropy HDU objects).

  • frame (str or None) – Target frame name (‘galactic’, ‘icrs’, ‘fk5’, …). None keeps the frame chosen automatically by reproject.

  • projection (str) – Output projection code (default ‘TAN’).

  • **kwargs – Passed through to find_optimal_celestial_wcs (e.g. resolution=…, auto_rotate=True).

Returns:

astropy.io.fits.header – Header (with NAXIS1/NAXIS2 set) covering all the input images.