#Warning if telescope is pointing too low with GTO900() as g: alt = g.alt() if alt <= 30.0: print '!!!WARNING: Telescope is at an altitude lower than 30 degrees !!!' print 'Seeing measurements will not start' print 'YOU MAY WANT TO CHECK THE TELESCOPE ALIGNMENT AND POINTING BEFORE STARTING MEASUREMENTS' g.park_mode() sys.exit() else: print 'Telescope position checked' #pick the star try: pick_star.pick_star(g) except Exception, e: print Exception print 'Could not pick new star because %s' % e print 'WARNING: YOU MAY WANT TO STOP MEASUREMENT AND START AGAIN' g.park_mode() exit() #check to see if the star is available os.system('./ave_frames 10 \!center.fits') nstars = find_boxes('center.fits') if nstars < 2: nfound, sx, sy = spiralsearch(g, niter=niter) sout = open(spiral_log, 'a') sout.write('%s %i %i %i\n' % (datetime.datetime.now(), sx, sy, nfound))
os.system('pkill ave_frames') os.system('pkill measure_seeing') #Make sure the ox wagon is open try: ox = ox_wagon.OxWagon() ox = ox.open() except Exception, e: print Exception print 'Could not give open command to Ox Wagon' pass #pick the star try: pick_star.pick_star() except Exception, e: print Exception print 'Could not pick new star because %s' % e print 'WARNING: YOU MAY WANT TO STOP MEASUREMENT AND START AGAIN' os.system('./pygto900.py init') exit() pass #check to see if the star is available with GTO900() as g: os.system('./ave_frames 10 \!center.fits') nstars = find_boxes('center.fits') if nstars < 2: ra_i, dec_i, ha_i, lst_i, alt_i, az_i, airmass_i, pier_i = status(
os.system('pkill measure_seeing') #Make sure the ox wagon is open try: ox=ox_wagon.OxWagon() ox=ox.open() except Exception,e: print Exception print 'Could not give open command to Ox Wagon' pass #pick the star try: pick_star.pick_star() except Exception, e: print Exception print 'Could not pick new star because %s' % e print 'WARNING: YOU MAY WANT TO STOP MEASUREMENT AND START AGAIN' os.system('./pygto900.py init') exit() pass #check to see if the star is available with GTO900() as g: os.system('./ave_frames 10 \!center.fits') nstars = find_boxes('center.fits') if nstars < 2:
#Warning if telescope is pointing too low with GTO900() as g: alt = g.alt() if alt<=30.0: print '!!!WARNING: Telescope is at an altitude lower than 30 degrees !!!' print 'Seeing measurements will not start' print 'YOU MAY WANT TO CHECK THE TELESCOPE ALIGNMENT AND POINTING BEFORE STARTING MEASUREMENTS' g.park_mode() sys.exit() else: print 'Telescope position checked' #pick the star try: pick_star.pick_star(g) except Exception, e: print Exception print 'Could not pick new star because %s' % e print 'WARNING: YOU MAY WANT TO STOP MEASUREMENT AND START AGAIN' g.park_mode() exit() #check to see if the star is available os.system('./ave_frames 10 \!center.fits') nstars = find_boxes('center.fits') if nstars < 2: nfound, sx, sy = spiralsearch(g,niter=niter) sout = open(spiral_log, 'a') sout.write('%s %i %i %i\n' % (datetime.datetime.now(), sx, sy, nfound)) sout.close()