def writefits(struct,file,logfile): status = 0 try: struct.writeto(file) except Exception, e: message = 'ERROR -- SALTIO.WRITE: cannot write %s because %s' % (file, e) status = saltprint.err(logfile,message)
def writefits(struct,outfile, clobber=True): """write to FITS file""" if (os.path.isfile(outfile) and clobber): delete(outfile) try: struct.writeto(outfile) except Exception,e : raise SaltIOError('Cannot write %s because %s' % (outfile, e))
def writefits(struct, outfile, clobber=True): """write to FITS file""" if (os.path.isfile(outfile) and clobber): delete(outfile) try: struct.writeto(outfile) except Exception, e: raise SaltIOError('Cannot write %s because %s' % (outfile, e))