예제 #1
0
    def update(self):
        'Called automatically every second to update screen'
        #print 'trying to update'
        if not self.data_queue.empty():

            try:
                #self.solnLock.acquire()
                #t, soln = self._soln_t, self._soln_copy.copy()
                data = self.data_queue.get(False)
                #print 'got data!!!'

                t = data.time
                self.last_soln = data.soln
                new_metric = data.metric

                field = physical(self.last_soln, self.combobox.get_active_text())
                self.vis.update('MIT xWind  t ={0:10.6f}'.format(t), field)

                self.metric = 0.99*self.metric + 0.01*new_metric
            except e:
                print 'no data available?', e
                #return False

        else:
            pass#print 'data queue is empty'

        return True
예제 #2
0
    def update(self):
        'Called automatically every second to update screen'
        #print 'trying to update'
        if not self.data_queue.empty():

            try:
                #self.solnLock.acquire()
                #t, soln = self._soln_t, self._soln_copy.copy()
                data = self.data_queue.get(False)
                #print 'got data!!!'

                t = data.time
                self.last_soln = data.soln
                new_metric = data.metric

                field = physical(self.last_soln,
                                 self.combobox.get_active_text())
                self.vis.update('MIT xWind  t ={0:10.6f}'.format(t), field)

                self.metric = 0.99 * self.metric + 0.01 * new_metric
            except e:
                print 'no data available?', e
                #return False

        else:
            pass  #print 'data queue is empty'

        return True
예제 #3
0
 def update(self):
     'Called automatically every second to update screen'
     try:
         self.solnLock.acquire()
         t, soln = self._soln_t, self._soln_copy.copy()
         self.solnLock.release()
         field = physical(soln, self.combobox.get_active_text())
         self.vis.update('MIT xWind  t ={0:10.6f}'.format(t), field)
     except:
         self.solnLock.release()
     return True
예제 #4
0
 def update(self):
     'Called automatically every second to update screen'
     try:
         self.solnLock.acquire()
         t, soln = self._soln_t, self._soln_copy.copy()
         self.solnLock.release()
         field = physical(soln, self.combobox.get_active_text())
         self.vis.update('MIT xWind  t ={0:10.6f}'.format(t), field)
     except:
         self.solnLock.release()
     return True
예제 #5
0
    def run(self, event=None):

        if not self.data_queue.empty():
            try:
                new_data = self.data_queue.get(False)

                t = new_data.time
                soln = new_data.soln
                field = physical(soln, 'X-velocity')
                self.vis.update( 'MIT xWind, t = {0:.5f}'.format(t), field)

            except e:
                print 'no data available?'

        else:
            pass

        return True