@@ -32,7 +32,7 class Figure: | |||
|
32 | 32 | |
|
33 | 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 | 37 | return filename |
|
38 | 38 |
@@ -95,6 +95,11 class CrossSpectraPlot(Figure): | |||
|
95 | 95 | |
|
96 | 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 | 103 | if not self.__isConfig: |
|
99 | 104 | |
|
100 | 105 | nplots = len(pairsIndexList) |
@@ -112,11 +117,6 class CrossSpectraPlot(Figure): | |||
|
112 | 117 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 |
|
113 | 118 | |
|
114 | 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 | 121 | self.setWinTitle(title) |
|
122 | 122 | |
@@ -163,7 +163,7 class CrossSpectraPlot(Figure): | |||
|
163 | 163 | self.draw() |
|
164 | 164 | |
|
165 | 165 | if save: |
|
166 | date = thisDatetime.strftime("%Y%m%d") | |
|
166 | date = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
|
167 | 167 | if figfile == None: |
|
168 | 168 | figfile = self.getFilename(name = date) |
|
169 | 169 | |
@@ -425,6 +425,11 class SpectraPlot(Figure): | |||
|
425 | 425 | |
|
426 | 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 | 433 | if not self.__isConfig: |
|
429 | 434 | |
|
430 | 435 | nplots = len(channelIndexList) |
@@ -442,11 +447,6 class SpectraPlot(Figure): | |||
|
442 | 447 | if zmax == None: zmax = numpy.nanmax(avg)*0.9 |
|
443 | 448 | |
|
444 | 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 | 451 | self.setWinTitle(title) |
|
452 | 452 | |
@@ -469,7 +469,7 class SpectraPlot(Figure): | |||
|
469 | 469 | self.draw() |
|
470 | 470 | |
|
471 | 471 | if save: |
|
472 | date = thisDatetime.strftime("%Y%m%d") | |
|
472 | date = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
|
473 | 473 | if figfile == None: |
|
474 | 474 | figfile = self.getFilename(name = date) |
|
475 | 475 | |
@@ -507,7 +507,8 class Scope(Figure): | |||
|
507 | 507 | |
|
508 | 508 | |
|
509 | 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 | 536 | y = dataOut.data[channelIndexList,:] * numpy.conjugate(dataOut.data[channelIndexList,:]) |
|
536 | 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 | 544 | if not self.__isConfig: |
|
539 | 545 | nplots = len(channelIndexList) |
|
540 | 546 | |
@@ -549,12 +555,6 class Scope(Figure): | |||
|
549 | 555 | |
|
550 | 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 | 558 | self.setWinTitle(title) |
|
559 | 559 | |
|
560 | 560 | for i in range(len(self.axesList)): |
@@ -568,7 +568,11 class Scope(Figure): | |||
|
568 | 568 | self.draw() |
|
569 | 569 | |
|
570 | 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 | 577 | class ProfilePlot(Figure): |
|
574 | 578 | __isConfig = None |
@@ -629,6 +633,10 class ProfilePlot(Figure): | |||
|
629 | 633 | x = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:]) |
|
630 | 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 | 641 | if not self.__isConfig: |
|
634 | 642 | |
@@ -644,11 +652,6 class ProfilePlot(Figure): | |||
|
644 | 652 | if xmax == None: xmax = numpy.nanmax(avg)*0.9 |
|
645 | 653 | |
|
646 | 654 | self.__isConfig = True |
|
647 | ||
|
648 | thisDatetime = dataOut.datatime | |
|
649 | title = "Power Profile" | |
|
650 | xlabel = "dB" | |
|
651 | ylabel = "Range (Km)" | |
|
652 | 655 | |
|
653 | 656 | self.setWinTitle(title) |
|
654 | 657 | |
@@ -750,6 +753,11 class CoherenceMap(Figure): | |||
|
750 | 753 | x = dataOut.getTimeRange() |
|
751 | 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 | 761 | if not self.__isConfig: |
|
754 | 762 | nplots = len(pairsIndexList) |
|
755 | 763 | self.setup(idfigure=idfigure, |
@@ -761,13 +769,10 class CoherenceMap(Figure): | |||
|
761 | 769 | if ymin == None: ymin = numpy.nanmin(y) |
|
762 | 770 | if ymax == None: ymax = numpy.nanmax(y) |
|
763 | 771 | |
|
772 | self.name = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
|
773 | ||
|
764 | 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 | 776 | self.setWinTitle(title) |
|
772 | 777 | |
|
773 | 778 | for i in range(self.nplots): |
@@ -820,9 +825,9 class CoherenceMap(Figure): | |||
|
820 | 825 | self.draw() |
|
821 | 826 | |
|
822 | 827 | if save: |
|
823 | date = thisDatetime.strftime("%Y%m%d") | |
|
828 | ||
|
824 | 829 | if figfile == None: |
|
825 |
figfile = self.getFilename(name = |
|
|
830 | figfile = self.getFilename(name = self.name) | |
|
826 | 831 | |
|
827 | 832 | self.saveFigure(figpath, figfile) |
|
828 | 833 | |
@@ -927,7 +932,13 class RTIfromNoise(Figure): | |||
|
927 | 932 | # avg = numpy.average(z, axis=1) |
|
928 | 933 | |
|
929 | 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 | 942 | if not self.__isConfig: |
|
932 | 943 | |
|
933 | 944 | nplots = len(channelIndexList) |
@@ -945,10 +956,6 class RTIfromNoise(Figure): | |||
|
945 | 956 | |
|
946 | 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 | 960 | self.setWinTitle(title) |
|
954 | 961 |
General Comments 0
You need to be logged in to leave comments.
Login now