Validation and Bounds checking¶
Validating the WCS keywords in a FITS file¶
astropy includes a command-line tool,
wcslint, to check the WCS
keywords in a FITS file. The example below shows it reporting back
results for a problematic file named
> wcslint invalid.fits HDU 1: WCS key ' ': - RADECSYS= 'ICRS ' / Astrometric system RADECSYS is non-standard, use RADESYSa. - The WCS transformation has more axes (2) than the image it is associated with (0) - 'celfix' made the change 'PV1_5 : Unrecognized coordinate transformation parameter'. HDU 2: WCS key ' ': - The WCS transformation has more axes (3) than the image it is associated with (0) - 'celfix' made the change 'In CUNIT2 : Mismatched units type 'length': have 'Hz', want 'm''. - 'unitfix' made the change 'Changed units: 'HZ ' -> 'Hz''.