##// END OF EJS Templates
cambio
Erick Valdez -
r870:bd8def453202
parent child
Show More
@@ -4,8 +4,7 import numpy
4 4
5 5 from figure import Figure, isRealtime, isTimeInHourRange
6 6 from plotting_codes import *
7
8 import matplotlib.pyplot as plt
7 from numpy import NaN
9 8
10 9 class MomentsPlot(Figure):
11 10
@@ -447,13 +446,18 class WindProfilerPlot(Figure):
447 446 # tmin = None
448 447 # tmax = None
449 448
450 x = dataOut.getTimeRange1(dataOut.outputInterval)
451 y = dataOut.heightList
449
450 x = dataOut.getTimeRange()
451 y = dataOut.getHeiRange()
452 #x = dataOut.getTimeRange1(dataOut.outputInterval)
453 #y = dataOut.heightList
454
452 455 z = dataOut.data_output.copy()
456 #print 'dataOut_JI',z
453 457 nplots = z.shape[0] #Number of wind dimensions estimated
454
455 458 nplotsw = nplots
456 459
460
457 461 #If there is a SNR function defined
458 462 if dataOut.data_SNR is not None:
459 463 nplots += 1
@@ -472,8 +476,7 class WindProfilerPlot(Figure):
472 476
473 477 # showprofile = False
474 478 # thisDatetime = dataOut.datatime
475 #thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.ltctime)
476 thisDatetime = datetime.datetime.now()
479 thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.ltctime)
477 480 title = wintitle + "Wind"
478 481 xlabel = ""
479 482 ylabel = "Height (km)"
@@ -492,8 +495,8 class WindProfilerPlot(Figure):
492 495
493 496 self.xmin, self.xmax = self.getTimeLim(x, xmin, xmax, timerange)
494 497
495 #if ymin == None: ymin = numpy.nanmin(y)
496 #if ymax == None: ymax = numpy.nanmax(y)
498 if ymin == None: ymin = numpy.nanmin(y)
499 if ymax == None: ymax = numpy.nanmax(y)
497 500
498 501 if zmax == None: zmax = numpy.nanmax(abs(z[range(2),:]))
499 502 #if numpy.isnan(zmax): zmax = 50
@@ -503,9 +506,9 class WindProfilerPlot(Figure):
503 506 if zmax_ver == None: zmax_ver = numpy.nanmax(abs(z[2,:]))
504 507 if zmin_ver == None: zmin_ver = -zmax_ver
505 508
506 # if dataOut.data_SNR is not None:
507 # if SNRmin == None: SNRmin = numpy.nanmin(SNRavgdB)
508 # if SNRmax == None: SNRmax = numpy.nanmax(SNRavgdB)
509 if dataOut.data_SNR is not None:
510 if SNRmin == None: SNRmin = numpy.nanmin(SNRavgdB)
511 if SNRmax == None: SNRmax = numpy.nanmax(SNRavgdB)
509 512
510 513
511 514 self.FTP_WEI = ftp_wei
@@ -520,8 +523,8 class WindProfilerPlot(Figure):
520 523
521 524 self.setWinTitle(title)
522 525
523 #if ((self.xmax - x[1]) < (x[1]-x[0])):
524 # x[1] = self.xmax
526 if ((self.xmax - x[1]) < (x[1]-x[0])):
527 x[1] = self.xmax
525 528
526 529 strWind = ['Zonal', 'Meridional', 'Vertical']
527 530 strCb = ['Velocity (m/s)','Velocity (m/s)','Velocity (cm/s)']
@@ -535,11 +538,12 class WindProfilerPlot(Figure):
535 538 axes = self.axesList[i*self.__nsubplots]
536 539
537 540 z1 = z[i,:].reshape((1,-1))*windFactor[i]
541 #z1=numpy.ma.masked_where(z1==0.,z1)
538 542
539 543 axes.pcolorbuffer(x, y, z1,
540 544 xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=zminVector[i], zmax=zmaxVector[i],
541 545 xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,
542 ticksize=9, cblabel=strCb[i], cbsize="1%", colormap="RdBu_r" )
546 ticksize=9, cblabel=strCb[i], cbsize="1%", colormap="seismic" )
543 547
544 548 if dataOut.data_SNR is not None:
545 549 i += 1
@@ -563,7 +567,7 class WindProfilerPlot(Figure):
563 567 thisDatetime=thisDatetime,
564 568 update_figfile=update_figfile)
565 569
566 if False and dataOut.ltctime + dataOut.outputInterval >= self.xmax:
570 if dataOut.ltctime + dataOut.outputInterval >= self.xmax:
567 571 self.counter_imagwr = wr_period
568 572 self.isConfig = False
569 573 update_figfile = True
@@ -780,7 +784,7 class ParametersPlot(Figure):
780 784
781 785
782 786
783 class ParametersPlot(Figure):
787 class Parameters1Plot(Figure):
784 788
785 789 __isConfig = None
786 790 __nsubplots = None
General Comments 0
You need to be logged in to leave comments. Login now