multicolorfits.reproject_to_frame#
- multicolorfits.reproject_to_frame(datain, hdrin, frame='galactic', method='interp', scale=False, projection=None, fit_footprint=True, returnfootprint=False)[source]#
Reproject a 2D image into a different celestial frame (e.g. Galactic), with the new frame’s north up.
Requires the optional ‘reproject’ package (pip install multicolorfits[reproject]).
- Parameters:
datain (array) – Input 2D image array.
hdrin (astropy.io.fits.header) – Input header with valid WCS.
frame (str) – Target frame: ‘galactic’, ‘icrs’, ‘fk5’, ‘fk4’, or ‘ecliptic’.
method (str) – Passed to reproject_image: ‘interp’ (default), ‘spi’, or ‘kapteyn’.
scale (bool) – Passed to reproject_image: True for flux units (Jy/pix etc.), False for brightness units (Jy/sr etc.).
projection (str or None) – Output projection code; None keeps the input projection.
fit_footprint (bool) – Size the output canvas to fit the full rotated footprint (default).
returnfootprint (bool) – Also return the reprojection footprint array.
- Returns:
array, astropy.io.fits.header (, array) – Reprojected data, the new header (, optional footprint)