验证和边界检查#

验证FITS文件中的WCS关键字#

astropy 包括命令行工具, wcslint ,以检查FITS文件中的WCS关键字。下面的示例显示它报告名为的有问题文件的结果 invalid.fits **

> 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''.

边界检查#

默认情况下启用边界检查,并且 [-180°, 180°] 经度和 [-90°, 90°] 在纬度中标记为无效。要禁用此行为,请使用 astropy.wcs.Wcsprm.bounds_check .