pc_to_cd#
- niriss_tools.isophotal.pc_to_cd(hdr_in)[source]#
Convert a PC matrix to a CD matrix.
astropy.wcs.WCSrecognises CD keywords as input but converts them and works internally with the PC matrix.to_headerreturns the PC matrix even if the input was a CD matrix. This can cause problems if used to update an existing header with a CD matrix, so we convert between the two.Adapated from
stwcs.wcsutil.altwcs.pc2cd.