docs: def _open(file,mode='copyonwrite'):
      """Opens a FITS format file and calls _open_fix if header doesn't
      verify correctly.
      """
      import pyfits
  
      try:
          infits=pyfits.open(file,mode)   
          hdu=infits
      except (ValueError,pyfits.VerifyError,pyfits.FITS_SevereError):
          import sys
          #### I really only know how to deal with one error right now.
          #if str(sys.exc_info()[1])=='mandatory keywords are not fixed format':
          hdu=_open_fix(file)
          #else:
          #    print sys.exc_info()[1]
          #    print " Failed trying to repair  ", file
          #    raise
      
      for f in hdu:
          strip_pad(f)
      return hdu