def verify_compliance(filename):
 hdulist = fits.open(filename)
 try:
  hdulist.verify('exception')
 except fits.VerifyError as exc:
  log.warning('NONCOMPLIANT {!r} .. {}'.format(filename), str(exc).replace('\n', ' '))
  return 1
 return 0

def verify_compliance ( filename ) : hdulist = fits . open ( filename ) try : hdulist . verify ( 'exception' ) except fits . VerifyError as exc : log . warning ( 'NONCOMPLIANT {!r} .. {}' . format ( filename ) , str ( exc ) . replace ( '\n' , ' ' ) ) return 1 return 0
check for fits standard compliance .