[AstroPy] Check if header contains WCS

Martin Beroiz martinberoiz at gmail.com
Thu May 28 15:48:35 EDT 2015


Hello, 

Is there a way of checking if a header has WCS info?
Right now I’m using

try:
    the_wcs = wcs.WCS(header_in)
except WcsError:
    print("No WCS information found in header”)
    DoesImageHaveWCS = False

 But I wonder if WcsError will catch all exceptions regarding WCS headers.

Thanks,
Martin.




More information about the AstroPy mailing list