@@ -32,7 +32,7 class Figure: | |||||
32 |
|
32 | |||
33 | def getFilename(self, name, ext='.png'): |
|
33 | def getFilename(self, name, ext='.png'): | |
34 |
|
34 | |||
35 | filename = '%s_%s%s' %(self.PREFIX, name, ext) |
|
35 | filename = '%s-%s_%s%s' %(self.wintitle[0:10], self.PREFIX, name, ext) | |
36 |
|
36 | |||
37 | return filename |
|
37 | return filename | |
38 |
|
38 |
@@ -95,6 +95,11 class CrossSpectraPlot(Figure): | |||||
95 |
|
95 | |||
96 | noise = dataOut.getNoise() |
|
96 | noise = dataOut.getNoise() | |
97 |
|
97 | |||
|
98 | thisDatetime = dataOut.datatime | |||
|
99 | title = "Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |||
|
100 | xlabel = "Velocity (m/s)" | |||
|
101 | ylabel = "Range (Km)" | |||
|
102 | ||||
98 | if not self.__isConfig: |
|
103 | if not self.__isConfig: | |
99 |
|
104 | |||
100 | nplots = len(pairsIndexList) |
|
105 | nplots = len(pairsIndexList) | |
@@ -112,11 +117,6 class CrossSpectraPlot(Figure): | |||||
112 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 |
|
117 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 | |
113 |
|
118 | |||
114 | self.__isConfig = True |
|
119 | self.__isConfig = True | |
115 |
|
||||
116 | thisDatetime = dataOut.datatime |
|
|||
117 | title = "Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) |
|
|||
118 | xlabel = "Velocity (m/s)" |
|
|||
119 | ylabel = "Range (Km)" |
|
|||
120 |
|
120 | |||
121 | self.setWinTitle(title) |
|
121 | self.setWinTitle(title) | |
122 |
|
122 | |||
@@ -163,7 +163,7 class CrossSpectraPlot(Figure): | |||||
163 | self.draw() |
|
163 | self.draw() | |
164 |
|
164 | |||
165 | if save: |
|
165 | if save: | |
166 | date = thisDatetime.strftime("%Y%m%d") |
|
166 | date = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
167 | if figfile == None: |
|
167 | if figfile == None: | |
168 | figfile = self.getFilename(name = date) |
|
168 | figfile = self.getFilename(name = date) | |
169 |
|
169 | |||
@@ -425,6 +425,11 class SpectraPlot(Figure): | |||||
425 |
|
425 | |||
426 | noise = dataOut.getNoise() |
|
426 | noise = dataOut.getNoise() | |
427 |
|
427 | |||
|
428 | thisDatetime = dataOut.datatime | |||
|
429 | title = "Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |||
|
430 | xlabel = "Velocity (m/s)" | |||
|
431 | ylabel = "Range (Km)" | |||
|
432 | ||||
428 | if not self.__isConfig: |
|
433 | if not self.__isConfig: | |
429 |
|
434 | |||
430 | nplots = len(channelIndexList) |
|
435 | nplots = len(channelIndexList) | |
@@ -442,11 +447,6 class SpectraPlot(Figure): | |||||
442 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 |
|
447 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 | |
443 |
|
448 | |||
444 | self.__isConfig = True |
|
449 | self.__isConfig = True | |
445 |
|
||||
446 | thisDatetime = dataOut.datatime |
|
|||
447 | title = "Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) |
|
|||
448 | xlabel = "Velocity (m/s)" |
|
|||
449 | ylabel = "Range (Km)" |
|
|||
450 |
|
450 | |||
451 | self.setWinTitle(title) |
|
451 | self.setWinTitle(title) | |
452 |
|
452 | |||
@@ -469,7 +469,7 class SpectraPlot(Figure): | |||||
469 | self.draw() |
|
469 | self.draw() | |
470 |
|
470 | |||
471 | if save: |
|
471 | if save: | |
472 | date = thisDatetime.strftime("%Y%m%d") |
|
472 | date = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
473 | if figfile == None: |
|
473 | if figfile == None: | |
474 | figfile = self.getFilename(name = date) |
|
474 | figfile = self.getFilename(name = date) | |
475 |
|
475 | |||
@@ -507,7 +507,8 class Scope(Figure): | |||||
507 |
|
507 | |||
508 |
|
508 | |||
509 | def run(self, dataOut, idfigure, wintitle="", channelList=None, |
|
509 | def run(self, dataOut, idfigure, wintitle="", channelList=None, | |
510 |
xmin=None, xmax=None, ymin=None, ymax=None, save=False, |
|
510 | xmin=None, xmax=None, ymin=None, ymax=None, save=False, | |
|
511 | figpath='./', figfile=None): | |||
511 |
|
512 | |||
512 | """ |
|
513 | """ | |
513 |
|
514 | |||
@@ -535,6 +536,11 class Scope(Figure): | |||||
535 | y = dataOut.data[channelIndexList,:] * numpy.conjugate(dataOut.data[channelIndexList,:]) |
|
536 | y = dataOut.data[channelIndexList,:] * numpy.conjugate(dataOut.data[channelIndexList,:]) | |
536 | y = y.real |
|
537 | y = y.real | |
537 |
|
538 | |||
|
539 | thisDatetime = dataOut.datatime | |||
|
540 | title = "Scope: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |||
|
541 | xlabel = "Range (Km)" | |||
|
542 | ylabel = "Intensity" | |||
|
543 | ||||
538 | if not self.__isConfig: |
|
544 | if not self.__isConfig: | |
539 | nplots = len(channelIndexList) |
|
545 | nplots = len(channelIndexList) | |
540 |
|
546 | |||
@@ -549,12 +555,6 class Scope(Figure): | |||||
549 |
|
555 | |||
550 | self.__isConfig = True |
|
556 | self.__isConfig = True | |
551 |
|
557 | |||
552 |
|
||||
553 | thisDatetime = dataOut.datatime |
|
|||
554 | title = "Scope: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) |
|
|||
555 | xlabel = "Range (Km)" |
|
|||
556 | ylabel = "Intensity" |
|
|||
557 |
|
||||
558 | self.setWinTitle(title) |
|
558 | self.setWinTitle(title) | |
559 |
|
559 | |||
560 | for i in range(len(self.axesList)): |
|
560 | for i in range(len(self.axesList)): | |
@@ -568,7 +568,11 class Scope(Figure): | |||||
568 | self.draw() |
|
568 | self.draw() | |
569 |
|
569 | |||
570 | if save: |
|
570 | if save: | |
571 | self.saveFigure(filename) |
|
571 | date = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
|
572 | if figfile == None: | |||
|
573 | figfile = self.getFilename(name = date) | |||
|
574 | ||||
|
575 | self.saveFigure(figpath, figfile) | |||
572 |
|
576 | |||
573 | class ProfilePlot(Figure): |
|
577 | class ProfilePlot(Figure): | |
574 | __isConfig = None |
|
578 | __isConfig = None | |
@@ -629,6 +633,10 class ProfilePlot(Figure): | |||||
629 | x = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:]) |
|
633 | x = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:]) | |
630 | avg = numpy.average(x, axis=1) |
|
634 | avg = numpy.average(x, axis=1) | |
631 |
|
635 | |||
|
636 | thisDatetime = dataOut.datatime | |||
|
637 | title = "Power Profile" | |||
|
638 | xlabel = "dB" | |||
|
639 | ylabel = "Range (Km)" | |||
632 |
|
640 | |||
633 | if not self.__isConfig: |
|
641 | if not self.__isConfig: | |
634 |
|
642 | |||
@@ -644,11 +652,6 class ProfilePlot(Figure): | |||||
644 | if xmax == None: xmax = numpy.nanmax(avg)*0.9 |
|
652 | if xmax == None: xmax = numpy.nanmax(avg)*0.9 | |
645 |
|
653 | |||
646 | self.__isConfig = True |
|
654 | self.__isConfig = True | |
647 |
|
||||
648 | thisDatetime = dataOut.datatime |
|
|||
649 | title = "Power Profile" |
|
|||
650 | xlabel = "dB" |
|
|||
651 | ylabel = "Range (Km)" |
|
|||
652 |
|
655 | |||
653 | self.setWinTitle(title) |
|
656 | self.setWinTitle(title) | |
654 |
|
657 | |||
@@ -750,6 +753,11 class CoherenceMap(Figure): | |||||
750 | x = dataOut.getTimeRange() |
|
753 | x = dataOut.getTimeRange() | |
751 | y = dataOut.getHeiRange() |
|
754 | y = dataOut.getHeiRange() | |
752 |
|
755 | |||
|
756 | thisDatetime = dataOut.datatime | |||
|
757 | title = "CoherenceMap: %s" %(thisDatetime.strftime("%d-%b-%Y")) | |||
|
758 | xlabel = "" | |||
|
759 | ylabel = "Range (Km)" | |||
|
760 | ||||
753 | if not self.__isConfig: |
|
761 | if not self.__isConfig: | |
754 | nplots = len(pairsIndexList) |
|
762 | nplots = len(pairsIndexList) | |
755 | self.setup(idfigure=idfigure, |
|
763 | self.setup(idfigure=idfigure, | |
@@ -761,13 +769,10 class CoherenceMap(Figure): | |||||
761 | if ymin == None: ymin = numpy.nanmin(y) |
|
769 | if ymin == None: ymin = numpy.nanmin(y) | |
762 | if ymax == None: ymax = numpy.nanmax(y) |
|
770 | if ymax == None: ymax = numpy.nanmax(y) | |
763 |
|
771 | |||
|
772 | self.name = thisDatetime.strftime("%Y%m%d_%H%M%S") | |||
|
773 | ||||
764 | self.__isConfig = True |
|
774 | self.__isConfig = True | |
765 |
|
775 | |||
766 | thisDatetime = dataOut.datatime |
|
|||
767 | title = "CoherenceMap: %s" %(thisDatetime.strftime("%d-%b-%Y")) |
|
|||
768 | xlabel = "" |
|
|||
769 | ylabel = "Range (Km)" |
|
|||
770 |
|
||||
771 | self.setWinTitle(title) |
|
776 | self.setWinTitle(title) | |
772 |
|
777 | |||
773 | for i in range(self.nplots): |
|
778 | for i in range(self.nplots): | |
@@ -820,9 +825,9 class CoherenceMap(Figure): | |||||
820 | self.draw() |
|
825 | self.draw() | |
821 |
|
826 | |||
822 | if save: |
|
827 | if save: | |
823 | date = thisDatetime.strftime("%Y%m%d") |
|
828 | ||
824 | if figfile == None: |
|
829 | if figfile == None: | |
825 |
figfile = self.getFilename(name = |
|
830 | figfile = self.getFilename(name = self.name) | |
826 |
|
831 | |||
827 | self.saveFigure(figpath, figfile) |
|
832 | self.saveFigure(figpath, figfile) | |
828 |
|
833 | |||
@@ -927,7 +932,13 class RTIfromNoise(Figure): | |||||
927 | # avg = numpy.average(z, axis=1) |
|
932 | # avg = numpy.average(z, axis=1) | |
928 |
|
933 | |||
929 | noise = dataOut.getNoise() |
|
934 | noise = dataOut.getNoise() | |
930 |
|
|
935 | ||
|
936 | thisDatetime = dataOut.datatime | |||
|
937 | title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y")) | |||
|
938 | xlabel = "Velocity (m/s)" | |||
|
939 | ylabel = "Range (Km)" | |||
|
940 | ||||
|
941 | ||||
931 | if not self.__isConfig: |
|
942 | if not self.__isConfig: | |
932 |
|
943 | |||
933 | nplots = len(channelIndexList) |
|
944 | nplots = len(channelIndexList) | |
@@ -945,10 +956,6 class RTIfromNoise(Figure): | |||||
945 |
|
956 | |||
946 | self.__isConfig = True |
|
957 | self.__isConfig = True | |
947 |
|
958 | |||
948 | thisDatetime = dataOut.datatime |
|
|||
949 | title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y")) |
|
|||
950 | xlabel = "Velocity (m/s)" |
|
|||
951 | ylabel = "Range (Km)" |
|
|||
952 |
|
959 | |||
953 | self.setWinTitle(title) |
|
960 | self.setWinTitle(title) | |
954 |
|
961 |
General Comments 0
You need to be logged in to leave comments.
Login now