@@ -127,6 +127,26 class ScopePlot(Plot): | |||||
127 | #pass |
|
127 | #pass | |
128 | ax.plt_r.set_data(xchannel, yreal) |
|
128 | ax.plt_r.set_data(xchannel, yreal) | |
129 |
|
129 | |||
|
130 | def plot_weatherspecwidth(self, x, y, channelIndexList, thisDatetime, wintitle): | |||
|
131 | ||||
|
132 | x = x[channelIndexList,:] | |||
|
133 | yreal = y | |||
|
134 | self.y = yreal | |||
|
135 | title = wintitle + " Scope: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |||
|
136 | self.xlabel = "width " | |||
|
137 | self.ylabel = "Range (Km)" | |||
|
138 | self.xmin = numpy.min(x) | |||
|
139 | self.xmax = numpy.max(x) | |||
|
140 | self.titles[0] =title | |||
|
141 | for i,ax in enumerate(self.axes): | |||
|
142 | title = "Channel %d" %(i) | |||
|
143 | xchannel = x[i,:] | |||
|
144 | if ax.firsttime: | |||
|
145 | ax.plt_r = ax.plot(xchannel, yreal)[0] | |||
|
146 | else: | |||
|
147 | #pass | |||
|
148 | ax.plt_r.set_data(xchannel, yreal) | |||
|
149 | ||||
130 | def plot(self): |
|
150 | def plot(self): | |
131 | if self.channels: |
|
151 | if self.channels: | |
132 | channels = self.channels |
|
152 | channels = self.channels | |
@@ -138,6 +158,8 class ScopePlot(Plot): | |||||
138 | scope = self.data['pp_power'] |
|
158 | scope = self.data['pp_power'] | |
139 | elif self.CODE == "pp_velocity": |
|
159 | elif self.CODE == "pp_velocity": | |
140 | scope = self.data["pp_velocity"] |
|
160 | scope = self.data["pp_velocity"] | |
|
161 | elif self.CODE == "pp_specwidth": | |||
|
162 | scope = self.data["pp_specwidth"] | |||
141 | else: |
|
163 | else: | |
142 | scope =self.data["scope"] |
|
164 | scope =self.data["scope"] | |
143 |
|
165 | |||
@@ -176,6 +198,13 class ScopePlot(Plot): | |||||
176 | thisDatetime, |
|
198 | thisDatetime, | |
177 | wintitle |
|
199 | wintitle | |
178 | ) |
|
200 | ) | |
|
201 | if self.CODE=="pp_spcwidth": | |||
|
202 | self.plot_weatherspecwidth(scope[:,i,:], | |||
|
203 | self.data.heights, | |||
|
204 | channels, | |||
|
205 | thisDatetime, | |||
|
206 | wintitle | |||
|
207 | ) | |||
179 | else: |
|
208 | else: | |
180 | wintitle = " [Profile = %d] " %self.data.profileIndex |
|
209 | wintitle = " [Profile = %d] " %self.data.profileIndex | |
181 | if self.CODE== "scope": |
|
210 | if self.CODE== "scope": | |
@@ -208,6 +237,13 class ScopePlot(Plot): | |||||
208 | thisDatetime, |
|
237 | thisDatetime, | |
209 | wintitle |
|
238 | wintitle | |
210 | ) |
|
239 | ) | |
|
240 | if self.CODE=="pp_specwidth": | |||
|
241 | self.plot_weatherspecwidth(scope, | |||
|
242 | self.data.heights, | |||
|
243 | channels, | |||
|
244 | thisDatetime, | |||
|
245 | wintitle | |||
|
246 | ) | |||
211 |
|
247 | |||
212 |
|
248 | |||
213 |
|
249 | |||
@@ -221,8 +257,6 class PulsepairPowerPlot(ScopePlot): | |||||
221 | plot_type = 'scatter' |
|
257 | plot_type = 'scatter' | |
222 | buffering = False |
|
258 | buffering = False | |
223 |
|
259 | |||
224 |
|
||||
225 |
|
||||
226 | class PulsepairVelocityPlot(ScopePlot): |
|
260 | class PulsepairVelocityPlot(ScopePlot): | |
227 | ''' |
|
261 | ''' | |
228 | Plot for |
|
262 | Plot for | |
@@ -231,3 +265,12 class PulsepairVelocityPlot(ScopePlot): | |||||
231 | plot_name = 'PulsepairVelocity' |
|
265 | plot_name = 'PulsepairVelocity' | |
232 | plot_type = 'scatter' |
|
266 | plot_type = 'scatter' | |
233 | buffering = False |
|
267 | buffering = False | |
|
268 | ||||
|
269 | class PulsepairSpecwidthPlot(ScopePlot): | |||
|
270 | ''' | |||
|
271 | Plot for | |||
|
272 | ''' | |||
|
273 | CODE = 'pp_specwidth' | |||
|
274 | plot_name = 'PulsepairSpecwidth' | |||
|
275 | plot_type = 'scatter' | |||
|
276 | buffering = False |
General Comments 0
You need to be logged in to leave comments.
Login now