multicolorfits.convert_header_frame#
- multicolorfits.convert_header_frame(hdrin, frame='galactic', projection=None, fit_footprint=True)[source]#
Build a new 2D header in a different celestial frame, covering the same sky area as the input header with the same pixel scale, with the new frame’s north axis up (no rotation).
Use with reproject_to_frame() (or mcf.reproject_image) to actually resample image data onto the new grid.
- Parameters:
hdrin (astropy.io.fits.header) – Input header (must contain a valid celestial WCS and NAXIS1/2).
frame (str) – Target frame: ‘galactic’, ‘icrs’, ‘fk5’, ‘fk4’, or ‘ecliptic’.
projection (str or None) – 3-letter FITS projection code for the output (e.g. ‘TAN’, ‘SIN’). None (default) keeps the projection of the input header.
fit_footprint (bool) – True (default) sizes the output so the entire (rotated) input footprint fits. False keeps the input NAXIS1/NAXIS2 dimensions.
- Returns:
astropy.io.fits.header – New header in the target frame.