import sys import os sys.path.append(pymodules) from ds9 import * from postprocess import writeTalker ##################### ####### MAIN ######## ##################### display = DS9(fifopath) if (display.ds9_exists(ds9_title) == 0): print "Error: No ALFOSC DS9 instance found!" writeTalker('postprocess.imexam', "[DEBUG]: No ALFOSC DS9 instance found!") sys.exit(1) # # Start up IRAF and imexam. This requires a valid login.cl in directory 'irafdir' # os.chdir(irafdir) from pyraf import iraf os.chdir(workdir) #iraf.mscred writeTalker('postprocess.imexam', "[DEBUG]: Starting imexam") iraf.imexam(keeplog='no') #iraf.mscexam(keeplog='no')
display.start_ds9(ds9_title,ds9geometry,fifopath) # # Display image in DS9 # if (getval(imagef,'AMPLMODE',0) == 'AB'): flattenImageALFOSC(imagef,'/tmp/alfosc.fits') imagef = '/tmp/alfosc.fits' display.loadSingleFits(ds9_title,imagef,1) display.loadSingleFits(ds9_title,imagef,2) # # Write to Talker # msg = "[DEBUG]: %s: Display started" % par['im'] writeTalker('postprocess.display',msg) sleep(5) # Overlay the DS9 display with information from # the automatic seeing analysis if exists seeing_fn = "/home/postprocess/seeing_mon/logs/alfosc/%s/%s.ds9" % (par['im'][:-4],par['im']) if os.path.exists(seeing_fn): display.overlayRegions(ds9_title,seeing_fn,1) writeTalker('postprocess.display',"[DEBUG]: %s: Overlaying Seeing Analysis Regions" % par['im']) else: writeTalker('postprocess.display',"[DEBUG]: %s: No regions to overlay" % par['im'])
if (getval(fits_file, 'AMPLMODE', 0) == 'AB'): outfile = os.path.join(mergedir, fits_nm) if not os.path.isfile(outfile): mergeALFOSC(fits_file, outfile) fits_file = outfile display.loadSingleFits(ds9_title, fits_file, 1) display.loadSingleFits(ds9_title, fits_file, 2) # # Write to Talker # msg = "[DEBUG]: %s: Display started" % fits_nm #writeTalker('postprocess.display',msg) #sleep(5) # Overlay the DS9 display with information from # the automatic seeing analysis if exists seeing_fn = "/home/postprocess/seeing_mon/logs/ALFOSC/%s/%s.ds9" % ( fits_nm[:-9], basenm) print seeing_fn if os.path.exists(seeing_fn): display.overlayRegions(ds9_title, seeing_fn, 1) writeTalker('postprocess.display', "[DEBUG]: %s: Overlaying Seeing Analysis Regions" % fits_nm) else: writeTalker('postprocess.display', "[DEBUG]: %s: No regions to overlay" % fits_nm)
# # Display image in DS9 # if (getval(imagef, 'AMPLMODE', 0) == 'AB'): flattenImageALFOSC(imagef, '/tmp/alfosc.fits') imagef = '/tmp/alfosc.fits' display.loadSingleFits(ds9_title, imagef, 1) display.loadSingleFits(ds9_title, imagef, 2) # # Write to Talker # msg = "[DEBUG]: %s: Display started" % par['im'] writeTalker('postprocess.display', msg) sleep(5) # Overlay the DS9 display with information from # the automatic seeing analysis if exists seeing_fn = "/home/postprocess/seeing_mon/logs/alfosc/%s/%s.ds9" % ( par['im'][:-4], par['im']) if os.path.exists(seeing_fn): display.overlayRegions(ds9_title, seeing_fn, 1) writeTalker('postprocess.display', "[DEBUG]: %s: Overlaying Seeing Analysis Regions" % par['im']) else: writeTalker('postprocess.display', "[DEBUG]: %s: No regions to overlay" % par['im'])
import sys import os sys.path.append(pymodules) from ds9 import * from postprocess import writeTalker ##################### ####### MAIN ######## ##################### display = DS9(fifopath) if (display.ds9_exists(ds9_title) == 0): print "Error: No ALFOSC DS9 instance found!" writeTalker('postprocess.imexam',"[DEBUG]: No ALFOSC DS9 instance found!") sys.exit(1) # # Start up IRAF and imexam. This requires a valid login.cl in directory 'irafdir' # os.chdir(irafdir) from pyraf import iraf os.chdir(workdir) #iraf.mscred writeTalker('postprocess.imexam',"[DEBUG]: Starting imexam") iraf.imexam(keeplog='no')