These are chat archives for astropy/astropy

5th
Sep 2016
vikalibrate
@vikalibrate
Sep 05 2016 11:36
Astropy WCS/fits question. I'm using astrop.wcs.WCS to extract celestial WCS information from an image in a FITS file, and then use this WCS object to populate a header (using to_header()) which will be used to write out another image to FITS. When I open up this final image with DS9, I find some strange behaviour. Regions show unrealistically large sizes, which I think is because the PCi_j keywords are not being used correctly (i.e., DS9 is treating the pixel size as 1.0 degree - probably the default).
I wanted to ask first whether anyone has seen similar behaviour. Secondly, is there a way to write the to_header() output in CDi_j standard rather than PCi_j standard. The original WCS keywords from the input header are in the latter and then I can just compare the new and old header directly.
EDIT: The original WCS keywords are in the CDi_j standard.