Example #1
0
        #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()
            if nfound == -1:
                print 'Could not find stars in %i iterations' % niter
                g.park_mode()

            os.system('./ave_frames 10 \!center.fits')
            nstars = find_boxes('center.fits')

    #start turbina running
    try:
        current_star = open('current_object').read().strip()
    except:
Example #2
0
        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(
                g)
            print ra_i
            nfound, sx, sy = spiralsearch()
            ra_f, dec_f, ha_f, lst_f, alt_f, az_f, airmass_f, pier_f = status(
                g)
            sout = open(spiral_log, 'a')
            sout.write('%s %i %i %i %s %s %s %s %s %s\n' %
                       (datetime.datetime.now(), sx, sy, nfound, lst_i, ra_i,
                        dec_i, lst_f, ra_f, dec_f))
            sout.close()
            os.system('./ave_frames 10 \!center.fits')
            nstars = find_boxes('center.fits')

    #start turbina running
    try:
        current_star = open('current_object').read().strip()
    except:
        old_star = None
      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(g)
          print ra_i
          nfound, sx, sy = spiralsearch()
          ra_f, dec_f, ha_f, lst_f, alt_f ,az_f ,airmass_f ,pier_f = status(g)
          sout = open(spiral_log, 'a')
          sout.write('%s %i %i %i %s %s %s %s %s %s\n' % (datetime.datetime.now(), sx, sy, nfound,lst_i,ra_i,dec_i,lst_f,ra_f,dec_f))
          sout.close()
          os.system('./ave_frames 10 \!center.fits')
          nstars = find_boxes('center.fits')

   #start turbina running
   try:
       current_star=open('current_object').read().strip()
   except:
       old_star = None

   if (old_star is None) or (old_star != current_star):
      #os.system('./run_turbina.py')
Example #4
0
        #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()
           if nfound == -1:
              print 'Could not find stars in %i iterations' % niter
              g.park_mode()
                
           os.system('./ave_frames 10 \!center.fits')
           nstars = find_boxes('center.fits')

   #start turbina running
   try:
       current_star=open('current_object').read().strip()
   except:
       old_star = None