Ejemplo n.º 1
0
 def fmtstatus(x, y):
     s = ''
     row = int(np.floor(y + 0.5))
     col = int(np.floor(x + 0.5))
     if row >= 0 and col >= 0 and row < h and col < w:
         if nomask or not array.mask[row, col]:
             s += '%g ' % array[row, col]
     if yflip:
         y = h - 1 - y
         row = h - 1 - row
     lat, lon = toworld([y, x])
     s += '[%d,%d] x=%.1f y=%.1f lat=%s lon=%s' % \
         (row, col, x, y, fmtdeglat (lat), fmthours (lon))
     return s
Ejemplo n.º 2
0
 def fmtstatus (x, y):
     s = ''
     row = int (np.floor (y + 0.5))
     col = int (np.floor (x + 0.5))
     if row >= 0 and col >= 0 and row < h and col < w:
         if nomask or not array.mask[row,col]:
             s += '%g ' % array[row,col]
     if yflip:
         y = h - 1 - y
         row = h - 1 - row
     lat, lon = toworld ([y, x])
     s += '[%d,%d] x=%.1f y=%.1f lat=%s lon=%s' % \
         (row, col, x, y, fmtdeglat (lat), fmthours (lon))
     return s
Ejemplo n.º 3
0
 def fmtstatusi(i, x, y):
     s = ''
     row = int(np.floor(y + 0.5))
     col = int(np.floor(x + 0.5))
     if row >= 0 and col >= 0 and row < h and col < w:
         if nomasks[i] or not arrays[i].mask[row, col]:
             s += '%g ' % arrays[i][row, col]
     if yflip:
         y = h - 1 - y
         row = h - 1 - row
     s += '[%d,%d] x=%.1f y=%.1f' % (row, col, x, y)
     if toworlds[i] is not None:
         lat, lon = toworlds[i]([y, x])
         s += ' lat=%s lon=%s' % (fmtdeglat(lat), fmthours(lon))
     return s
Ejemplo n.º 4
0
 def fmtstatusi (i, x, y):
     s = ''
     row = int (np.floor (y + 0.5))
     col = int (np.floor (x + 0.5))
     if row >= 0 and col >= 0 and row < h and col < w:
         if nomasks[i] or not arrays[i].mask[row,col]:
             s += '%g ' % arrays[i][row,col]
     if yflip:
         y = h - 1 - y
         row = h - 1 - row
     s += '[%d,%d] x=%.1f y=%.1f' % (row, col, x, y)
     if toworlds[i] is not None:
         lat, lon = toworlds[i] ([y, x])
         s += ' lat=%s lon=%s' % (fmtdeglat (lat),
                                  fmthours (lon))
     return s