Example #1
0
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)
Example #2
0
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))
Example #3
0
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))