##// END OF EJS Templates
parametrs plotting: SNR and DOP arguments have been added
Miguel Valdez -
r588:c1c257c97d52
parent child
Show More
@@ -621,6 +621,7 class ParametersPlot(Figure):
621 621 xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None,timerange=None,
622 622 parameterIndex = None, onlyPositive = False,
623 623 SNRthresh = -numpy.inf, SNR = True, SNRmin = None, SNRmax = None,
624 DOP = True,
624 625 zlabel = "", parameterName = "", parameterObject = "data_param",
625 626 save=False, figpath='./', lastone=0,figfile=None, ftp=False, wr_period=1, show=True,
626 627 server=None, folder=None, username=None, password=None,
@@ -651,6 +652,21 class ParametersPlot(Figure):
651 652
652 653 nchan = len(channelIndexList) #Number of channels being plotted
653 654
655 if nchan < 1:
656 return
657
658 nGraphsByChannel = 0
659
660 if SNR:
661 nGraphsByChannel += 1
662 if DOP:
663 nGraphsByChannel += 1
664
665 if nGraphsByChannel < 1:
666 return
667
668 nplots = nGraphsByChannel*nchan
669
654 670 if timerange != None:
655 671 self.timerange = timerange
656 672
@@ -658,12 +674,13 class ParametersPlot(Figure):
658 674 #tmax = None
659 675 if parameterIndex == None:
660 676 parameterIndex = 1
677
661 678 x = dataOut.getTimeRange1()
662 679 y = dataOut.heightList
663 680 z = data_param[channelIndexList,parameterIndex,:].copy()
664 681
665 682 zRange = dataOut.abscissaList
666 nplots = z.shape[0] #Number of wind dimensions estimated
683 # nChannels = z.shape[0] #Number of wind dimensions estimated
667 684 # thisDatetime = dataOut.datatime
668 685
669 686 if dataOut.data_SNR != None:
@@ -678,8 +695,6 class ParametersPlot(Figure):
678 695 xlabel = ""
679 696 ylabel = "Range (Km)"
680 697
681 if SNR: nplots = 2*nplots
682
683 698 if onlyPositive:
684 699 colormap = "jet"
685 700 zmin = 0
@@ -700,7 +715,7 class ParametersPlot(Figure):
700 715 if zmin == None: zmin = numpy.nanmin(zRange)
701 716 if zmax == None: zmax = numpy.nanmax(zRange)
702 717
703 if SNR != None:
718 if SNR:
704 719 if SNRmin == None: SNRmin = numpy.nanmin(SNRdB)
705 720 if SNRmax == None: SNRmax = numpy.nanmax(SNRdB)
706 721
@@ -719,23 +734,24 class ParametersPlot(Figure):
719 734 x[1] = self.xmax
720 735
721 736 for i in range(nchan):
722 if SNR: j = 2*i
723 else: j = i
724 737
725 title = "%s Channel %d: %s" %(parameterName, channelIndexList[i]+1, thisDatetime.strftime("%Y/%m/%d %H:%M:%S"))
738 j = nGraphsByChannel*i
726 739
727 if ((dataOut.azimuth!=None) and (dataOut.zenith!=None)):
728 title = title + '_' + 'azimuth,zenith=%2.2f,%2.2f'%(dataOut.azimuth, dataOut.zenith)
729 axes = self.axesList[j*self.__nsubplots]
730 z1 = z[i,:].reshape((1,-1))
731 axes.pcolorbuffer(x, y, z1,
732 xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
733 xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,colormap=colormap,
734 ticksize=9, cblabel=zlabel, cbsize="1%")
740 if DOP:
741 title = "%s Channel %d: %s" %(parameterName, channelIndexList[i]+1, thisDatetime.strftime("%Y/%m/%d %H:%M:%S"))
742
743 if ((dataOut.azimuth!=None) and (dataOut.zenith!=None)):
744 title = title + '_' + 'azimuth,zenith=%2.2f,%2.2f'%(dataOut.azimuth, dataOut.zenith)
745 axes = self.axesList[j]
746 z1 = z[i,:].reshape((1,-1))
747 axes.pcolorbuffer(x, y, z1,
748 xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
749 xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,colormap=colormap,
750 ticksize=9, cblabel=zlabel, cbsize="1%")
735 751
736 752 if SNR:
737 753 title = "Channel %d Signal Noise Ratio (SNR): %s" %(channelIndexList[i]+1, thisDatetime.strftime("%Y/%m/%d %H:%M:%S"))
738 axes = self.axesList[(j + 1)*self.__nsubplots]
754 axes = self.axesList[(j + nGraphsByChannel-1)]
739 755 z1 = SNRdB[i,:].reshape((1,-1))
740 756 axes.pcolorbuffer(x, y, z1,
741 757 xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=SNRmin, zmax=SNRmax,
General Comments 0
You need to be logged in to leave comments. Login now