get_skyheader#
- mufasa.master_fitter.get_skyheader(cube_header)[source]#
Generate a 2D sky projection header from a 3D spectral cube header.
This function extracts the celestial (spatial) WCS information from a 3D FITS header and constructs a 2D header suitable for spatial operations.
- Parameters:
cube_header (astropy.io.fits.Header) – The FITS header of the 3D spectral cube, containing WCS information.
- Returns:
A 2D FITS header containing only the celestial WCS information from the input 3D header.
- Return type:
astropy.io.fits.Header
Notes
The function retains the spatial resolution and axis sizes (NAXIS1 and NAXIS2) from the input 3D header.
The returned header is useful for spatial projections and visualizations.
Examples
>>> from astropy.io import fits >>> cube_header = fits.getheader("spectral_cube.fits") >>> sky_header = get_skyheader(cube_header) >>> print(sky_header)