[AstroPy] question on fits header entry on WCS

Peter Weilbacher pweilbacher@aip...
Fri Jun 28 06:11:46 CDT 2013


On Thu, 27 Jun 2013, Masato Onodera wrote:

> I have a fits image with 1225x1326 pixels and header section seen in the
> following URL: https://gist.github.com/monodera/e3d95d2bcdc8afcf860a
[... snip ...]
> WARNING: FITSFixedWarning: RADECSYS= 'FK5 ' / Equatorial coordinate system
> RADECSYS is non-standard, use RADESYSa. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PROJP1 = 0.0 / Projection Type of the first axis
> Defunct PROJPn keyword rejected. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PROJP2 = 0.0 / Projection Type of the second
> axis Defunct PROJPn keyword rejected. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PC001001= -0.939693 / Coordinate translation
> matrix Defunct form of PCi_ja keyword. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PC001002= 0.342020 / Coordinate translation
> matrix Defunct form of PCi_ja keyword. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PC002001= 0.342020 / Coordinate translation
> matrix Defunct form of PCi_ja keyword. [astropy.wcs.wcs]
> WARNING: FITSFixedWarning: PC002002= 0.939693 / Coordinate translation
> matrix Defunct form of PCi_ja keyword. [astropy.wcs.wcs]
[... snip ...]
> Then I found that "w = wcs.WCS(hdu[0].header, relax=False)" gives the
> expected result.  Since I want to make a figure with APLpy and it
> apparently does not accept "relax=False", I would like to know which header
> entries cause the wrong result when I put "relax=True" and how to fix it.
>  I guess they would be the entries mentioned in the warning messages, but
> I'm not sure exactly...

That's my guess, too. Look at
<http://docs.astropy.org/en/v0.2/wcs/relax.html> for all those obsolete
keywords...
In your case the PC00i00j keywords seem to contain a totally different
WCS than CDi_j which would explain the unlikely output your script gives
you.

Cheers,
   Peter.
-- 
Dr. Peter Weilbacher                http://www.aip.de/People/PWeilbacher
Phone +49 331 74 99-667                       encryption key ID 7D6B4AA0
------------------------------------------------------------------------
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, D-14482 Potsdam

Vorstand: Prof. Dr. Matthias Steinmetz, Dr. Ulrich Müller
Stiftung bürgerlichen Rechts, Stiftungsverz. Brandenburg: 26 742-00/7026


More information about the AstroPy mailing list