@@ -85,7 +85,8 class SpectraPlot(Figure): | |||
|
85 | 85 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
86 | 86 | save=False, figpath='./', figfile=None, show=True, ftp=False, wr_period=1, |
|
87 | 87 | server=None, folder=None, username=None, password=None, |
|
88 |
ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, realtime=False |
|
|
88 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, realtime=False, | |
|
89 | xaxis="velocity"): | |
|
89 | 90 | |
|
90 | 91 | """ |
|
91 | 92 | |
@@ -119,8 +120,20 class SpectraPlot(Figure): | |||
|
119 | 120 | |
|
120 | 121 | factor = dataOut.normFactor |
|
121 | 122 | |
|
122 | x = dataOut.getFreqRange(1)/1000 | |
|
123 |
|
|
|
123 | if xaxis == "frequency": | |
|
124 | x = dataOut.getFreqRange(1)/1000. | |
|
125 | xlabel = "Frquency (KHz)" | |
|
126 | ||
|
127 | elif xaxis == "time": | |
|
128 | x = dataOut.getAcfRange(1) | |
|
129 | xlabel = "Time (ms)" | |
|
130 | ||
|
131 | else: | |
|
132 | x = dataOut.getVelRange(1) | |
|
133 | xlabel = "Velocity (m/s)" | |
|
134 | ||
|
135 | ylabel = "Range (Km)" | |
|
136 | ||
|
124 | 137 | y = dataOut.getHeiRange() |
|
125 | 138 | |
|
126 | 139 | z = dataOut.data_spc/factor |
@@ -137,10 +150,7 class SpectraPlot(Figure): | |||
|
137 | 150 | title = wintitle + " Spectra" |
|
138 | 151 | if ((dataOut.azimuth!=None) and (dataOut.zenith!=None)): |
|
139 | 152 | title = title + '_' + 'azimuth,zenith=%2.2f,%2.2f'%(dataOut.azimuth, dataOut.zenith) |
|
140 | ||
|
141 | xlabel = "Frequency (KHz)" | |
|
142 | ylabel = "Range (Km)" | |
|
143 | ||
|
153 | ||
|
144 | 154 | if not self.isConfig: |
|
145 | 155 | |
|
146 | 156 | nplots = len(channelIndexList) |
@@ -987,7 +997,8 class SpectraCutPlot(Figure): | |||
|
987 | 997 | xmin=None, xmax=None, ymin=None, ymax=None, |
|
988 | 998 | save=False, figpath='./', figfile=None, show=True, |
|
989 | 999 | ftp=False, wr_period=1, server=None, |
|
990 |
folder=None, username=None, password=None |
|
|
1000 | folder=None, username=None, password=None, | |
|
1001 | xaxis="velocity"): | |
|
991 | 1002 | |
|
992 | 1003 | |
|
993 | 1004 | if channelList == None: |
@@ -1002,22 +1013,33 class SpectraCutPlot(Figure): | |||
|
1002 | 1013 | |
|
1003 | 1014 | factor = dataOut.normFactor |
|
1004 | 1015 | |
|
1005 | x = dataOut.getFreqRangeTimeResponse()/1000 | |
|
1006 | 1016 | y = dataOut.getHeiRange() |
|
1007 | 1017 | |
|
1008 | 1018 | z = dataOut.data_spc/factor |
|
1009 | 1019 | z = numpy.where(numpy.isfinite(z), z, numpy.NAN) |
|
1010 | 1020 | |
|
1011 |
hei_index = numpy.arange( |
|
|
1012 | ||
|
1013 | zdB = 10*numpy.log10(z[0,:,hei_index]) | |
|
1014 | # zdB = numpy.swapaxes(zdB, 0, 1) | |
|
1021 | hei_index = numpy.arange(15)*3 + 20 | |
|
1015 | 1022 | |
|
1023 | if xaxis == "frequency": | |
|
1024 | x = dataOut.getFreqRange()/1000. | |
|
1025 | zdB = 10*numpy.log10(z[0,:,hei_index]) | |
|
1026 | xlabel = "Frquency (KHz)" | |
|
1027 | ylabel = "Power (dB)" | |
|
1028 | ||
|
1029 | elif xaxis == "time": | |
|
1030 | x = dataOut.getAcfRange() | |
|
1031 | zdB = z[0,:,hei_index] | |
|
1032 | xlabel = "Time (ms)" | |
|
1033 | ylabel = "ACF" | |
|
1034 | ||
|
1035 | else: | |
|
1036 | x = dataOut.getVelRange() | |
|
1037 | zdB = 10*numpy.log10(z[0,:,hei_index]) | |
|
1038 | xlabel = "Velocity (m/s)" | |
|
1039 | ylabel = "Power (dB)" | |
|
1016 | 1040 | |
|
1017 | 1041 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[0]) |
|
1018 |
title = wintitle + " |
|
|
1019 | xlabel = "Frequency (KHz)" | |
|
1020 | ylabel = "Power (dB)" | |
|
1042 | title = wintitle + " Range Cuts %s" %(thisDatetime.strftime("%d-%b-%Y")) | |
|
1021 | 1043 | |
|
1022 | 1044 | if not self.isConfig: |
|
1023 | 1045 |
General Comments 0
You need to be logged in to leave comments.
Login now