@@ -576,14 +576,14 class WindProfilerPlot(Figure): | |||
|
576 | 576 | self.figfile = None |
|
577 | 577 | |
|
578 | 578 | |
|
579 |
class |
|
|
579 | class ParametersPlot(Figure): | |
|
580 | 580 | |
|
581 | 581 | __isConfig = None |
|
582 | 582 | __nsubplots = None |
|
583 | 583 | |
|
584 | 584 | WIDTHPROF = None |
|
585 | 585 | HEIGHTPROF = None |
|
586 |
PREFIX = ' |
|
|
586 | PREFIX = 'prm' | |
|
587 | 587 | |
|
588 | 588 | def __init__(self): |
|
589 | 589 | |
@@ -649,7 +649,8 class RadialVelocityPlot(Figure): | |||
|
649 | 649 | |
|
650 | 650 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile=False, |
|
651 | 651 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None,timerange=None, |
|
652 | SNRmin = None, SNRmax = None, SNRthresh = None, paramIndex = None, | |
|
652 | SNRmin = None, SNRmax = None, SNRthresh = None, paramIndex = None, onlyPositive = False, | |
|
653 | zlabel = "", parameterName = "", | |
|
653 | 654 | save=False, figpath='', lastone=0,figfile=None, ftp=False, wr_period=1, show=True, |
|
654 | 655 | server=None, folder=None, username=None, password=None, |
|
655 | 656 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0): |
@@ -692,26 +693,16 class RadialVelocityPlot(Figure): | |||
|
692 | 693 | |
|
693 | 694 | zRange = dataOut.abscissaRange |
|
694 | 695 | nplots = z.shape[0] #Number of wind dimensions estimated |
|
695 | nplotsw = nplots | |
|
696 | ||
|
697 | if dataOut.SNR != None: | |
|
698 | nplots += 1 | |
|
699 | SNR = dataOut.SNR | |
|
700 | SNRavg = numpy.average(SNR, axis=0) | |
|
701 | ||
|
702 | SNRdB = 10*numpy.log10(SNR) | |
|
703 | SNRavgdB = 10*numpy.log10(SNRavg) | |
|
704 | ||
|
705 | if SNRthresh == None: SNRthresh = -5.0 | |
|
706 | ind = numpy.where(SNRavg < 10**(SNRthresh/10))[0] | |
|
707 | ||
|
708 | for i in range(nplotsw): | |
|
709 | z[i,ind] = numpy.nan | |
|
710 | 696 | # thisDatetime = dataOut.datatime |
|
711 | 697 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[1]) |
|
712 |
title = wintitle + " |
|
|
698 | title = wintitle + " Parameters Plot" #: %s" %(thisDatetime.strftime("%d-%b-%Y")) | |
|
713 | 699 | xlabel = "" |
|
714 |
ylabel = " |
|
|
700 | ylabel = "Range (Km)" | |
|
701 | ||
|
702 | if onlyPositive: | |
|
703 | colormap = "jet" | |
|
704 | zmin = 0 | |
|
705 | else: colormap = "RdBu_r" | |
|
715 | 706 | |
|
716 | 707 | if not self.__isConfig: |
|
717 | 708 | |
@@ -727,6 +718,7 class RadialVelocityPlot(Figure): | |||
|
727 | 718 | if ymax == None: ymax = numpy.nanmax(y) |
|
728 | 719 | if zmin == None: zmin = numpy.nanmin(zRange) |
|
729 | 720 | if zmax == None: zmax = numpy.nanmax(zRange) |
|
721 | ||
|
730 | 722 | if dataOut.SNR != None: |
|
731 | 723 | if SNRmin == None: SNRmin = numpy.nanmin(SNRavgdB) |
|
732 | 724 | if SNRmax == None: SNRmax = numpy.nanmax(SNRavgdB) |
@@ -745,28 +737,17 class RadialVelocityPlot(Figure): | |||
|
745 | 737 | if ((self.xmax - x[1]) < (x[1]-x[0])): |
|
746 | 738 | x[1] = self.xmax |
|
747 | 739 | |
|
748 |
for i in range(nplots |
|
|
749 | title = "Channel %d: %s" %(dataOut.channelList[i]+1, thisDatetime.strftime("%Y/%m/%d %H:%M:%S")) | |
|
740 | for i in range(nplots): | |
|
741 | title = "%s Channel %d: %s" %(parameterName, dataOut.channelList[i]+1, thisDatetime.strftime("%Y/%m/%d %H:%M:%S")) | |
|
742 | ||
|
750 | 743 | if ((dataOut.azimuth!=None) and (dataOut.zenith!=None)): |
|
751 | 744 | title = title + '_' + 'azimuth,zenith=%2.2f,%2.2f'%(dataOut.azimuth, dataOut.zenith) |
|
752 | 745 | axes = self.axesList[i*self.__nsubplots] |
|
753 | 746 | z1 = z[i,:].reshape((1,-1)) |
|
754 | 747 | axes.pcolorbuffer(x, y, z1, |
|
755 | 748 | xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax, |
|
756 |
xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,colormap= |
|
|
757 |
ticksize=9, cblabel= |
|
|
758 | ||
|
759 | if dataOut.SNR != None: | |
|
760 | i += 1 | |
|
761 | title = "Signal Noise Ratio (SNR): %s" %(thisDatetime.strftime("%Y/%m/%d %H:%M:%S")) | |
|
762 | axes = self.axesList[i*self.__nsubplots] | |
|
763 | ||
|
764 | SNRavgdB = SNRavgdB.reshape((1,-1)) | |
|
765 | ||
|
766 | axes.pcolorbuffer(x, y, SNRavgdB, | |
|
767 | xmin=self.xmin, xmax=self.xmax, ymin=ymin, ymax=ymax, zmin=SNRmin, zmax=SNRmax, | |
|
768 | xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True, | |
|
769 | ticksize=9, cblabel='', cbsize="1%", colormap="jet") | |
|
749 | xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,colormap=colormap, | |
|
750 | ticksize=9, cblabel=zlabel, cbsize="1%") | |
|
770 | 751 | |
|
771 | 752 | self.draw() |
|
772 | 753 |
General Comments 0
You need to be logged in to leave comments.
Login now