@@ -131,6 +131,8 class MomentsPlot(Figure): | |||
|
131 | 131 | xlabel = "Velocity (m/s)" |
|
132 | 132 | ylabel = "Range (Km)" |
|
133 | 133 | |
|
134 | update_figfile = False | |
|
135 | ||
|
134 | 136 | if not self.isConfig: |
|
135 | 137 | |
|
136 | 138 | nplots = len(channelIndexList) |
@@ -154,6 +156,7 class MomentsPlot(Figure): | |||
|
154 | 156 | self.PLOT_POS = plot_pos |
|
155 | 157 | |
|
156 | 158 | self.isConfig = True |
|
159 | update_figfile = True | |
|
157 | 160 | |
|
158 | 161 | self.setWinTitle(title) |
|
159 | 162 | |
@@ -248,7 +251,7 class SkyMapPlot(Figure): | |||
|
248 | 251 | self.addAxes(1, 1, 0, 0, 1, 1, True) |
|
249 | 252 | |
|
250 | 253 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile=False, |
|
251 |
|
|
|
254 | tmin=None, tmax=None, timerange=None, | |
|
252 | 255 | save=False, figpath='./', figfile=None, show=True, ftp=False, wr_period=1, |
|
253 | 256 | server=None, folder=None, username=None, password=None, |
|
254 | 257 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, realtime=False): |
@@ -278,13 +281,14 class SkyMapPlot(Figure): | |||
|
278 | 281 | |
|
279 | 282 | x = finalAzimuth*numpy.pi/180 |
|
280 | 283 | y = finalZenith |
|
284 | x1 = dataOut.getTimeRange() | |
|
281 | 285 | |
|
282 | ||
|
283 | 286 | #thisDatetime = dataOut.datatime |
|
284 | 287 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[0]) |
|
285 | 288 | title = wintitle + " Parameters" |
|
286 | 289 | xlabel = "Zonal Zenith Angle (deg) " |
|
287 | 290 | ylabel = "Meridional Zenith Angle (deg)" |
|
291 | update_figfile = False | |
|
288 | 292 | |
|
289 | 293 | if not self.__isConfig: |
|
290 | 294 | |
@@ -295,7 +299,14 class SkyMapPlot(Figure): | |||
|
295 | 299 | wintitle=wintitle, |
|
296 | 300 | showprofile=showprofile, |
|
297 | 301 | show=show) |
|
298 | ||
|
302 | ||
|
303 | self.xmin, self.xmax = self.getTimeLim(x1, tmin, tmax, timerange) | |
|
304 | ||
|
305 | if timerange != None: | |
|
306 | self.timerange = timerange | |
|
307 | else: | |
|
308 | self.timerange = self.xmax - self.xmin | |
|
309 | ||
|
299 | 310 | self.FTP_WEI = ftp_wei |
|
300 | 311 | self.EXP_CODE = exp_code |
|
301 | 312 | self.SUB_EXP_CODE = sub_exp_code |
@@ -303,6 +314,7 class SkyMapPlot(Figure): | |||
|
303 | 314 | self.name = thisDatetime.strftime("%Y%m%d_%H%M%S") |
|
304 | 315 | self.firstdate = '%s %s'%(thisDatetime.strftime("%Y/%m/%d"),thisDatetime.strftime("%H:%M:%S")) |
|
305 | 316 | self.__isConfig = True |
|
317 | update_figfile = True | |
|
306 | 318 | |
|
307 | 319 | self.setWinTitle(title) |
|
308 | 320 | |
@@ -317,14 +329,24 class SkyMapPlot(Figure): | |||
|
317 | 329 | ticksize=9, cblabel='') |
|
318 | 330 | |
|
319 | 331 | self.draw() |
|
320 |
|
|
|
332 | ||
|
321 | 333 | self.save(figpath=figpath, |
|
322 | 334 | figfile=figfile, |
|
323 | 335 | save=save, |
|
324 | 336 | ftp=ftp, |
|
325 | 337 | wr_period=wr_period, |
|
326 | 338 | thisDatetime=thisDatetime, |
|
327 |
update_figfile= |
|
|
339 | update_figfile=update_figfile) | |
|
340 | ||
|
341 | if dataOut.ltctime >= self.xmax: | |
|
342 | self.counter_imagwr = wr_period | |
|
343 | self.__isConfig = False | |
|
344 | update_figfile = True | |
|
345 | axes.__firsttime = True | |
|
346 | self.xmin += self.timerange | |
|
347 | self.xmax += self.timerange | |
|
348 | ||
|
349 | ||
|
328 | 350 | |
|
329 | 351 | |
|
330 | 352 | class WindProfilerPlot(Figure): |
@@ -461,6 +483,7 class WindProfilerPlot(Figure): | |||
|
461 | 483 | title = wintitle + "Wind" |
|
462 | 484 | xlabel = "" |
|
463 | 485 | ylabel = "Range (Km)" |
|
486 | update_figfile = False | |
|
464 | 487 | |
|
465 | 488 | if not self.__isConfig: |
|
466 | 489 | |
@@ -499,6 +522,7 class WindProfilerPlot(Figure): | |||
|
499 | 522 | self.name = thisDatetime.strftime("%Y%m%d_%H%M%S") |
|
500 | 523 | self.__isConfig = True |
|
501 | 524 | self.figfile = figfile |
|
525 | update_figfile = True | |
|
502 | 526 | |
|
503 | 527 | self.setWinTitle(title) |
|
504 | 528 | |
@@ -537,10 +561,10 class WindProfilerPlot(Figure): | |||
|
537 | 561 | |
|
538 | 562 | self.draw() |
|
539 | 563 | |
|
540 |
if |
|
|
564 | if dataOut.ltctime >= self.xmax: | |
|
541 | 565 | self.counter_imagwr = wr_period |
|
542 | 566 | self.__isConfig = False |
|
543 |
|
|
|
567 | update_figfile = True | |
|
544 | 568 | |
|
545 | 569 | self.save(figpath=figpath, |
|
546 | 570 | figfile=figfile, |
@@ -548,7 +572,8 class WindProfilerPlot(Figure): | |||
|
548 | 572 | ftp=ftp, |
|
549 | 573 | wr_period=wr_period, |
|
550 | 574 | thisDatetime=thisDatetime, |
|
551 |
update_figfile= |
|
|
575 | update_figfile=update_figfile) | |
|
576 | ||
|
552 | 577 | |
|
553 | 578 | |
|
554 | 579 | class ParametersPlot(Figure): |
@@ -1247,7 +1272,7 class PhasePlot(Figure): | |||
|
1247 | 1272 | def run(self, dataOut, id, wintitle="", pairsList=None, showprofile='True', |
|
1248 | 1273 | xmin=None, xmax=None, ymin=None, ymax=None, |
|
1249 | 1274 | timerange=None, |
|
1250 | save=False, figpath='', figfile=None, show=True, ftp=False, wr_period=1, | |
|
1275 | save=False, figpath='./', figfile=None, show=True, ftp=False, wr_period=1, | |
|
1251 | 1276 | server=None, folder=None, username=None, password=None, |
|
1252 | 1277 | ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0): |
|
1253 | 1278 | |
@@ -1267,7 +1292,7 class PhasePlot(Figure): | |||
|
1267 | 1292 | |
|
1268 | 1293 | #phase = numpy.zeros((len(pairsIndexList),len(dataOut.beacon_heiIndexList))) |
|
1269 | 1294 | phase_beacon = dataOut.data_output |
|
1270 | ||
|
1295 | update_figfile = False | |
|
1271 | 1296 | |
|
1272 | 1297 | if not self.__isConfig: |
|
1273 | 1298 | |
@@ -1302,7 +1327,7 class PhasePlot(Figure): | |||
|
1302 | 1327 | path = '%s%03d' %(self.PREFIX, self.id) |
|
1303 | 1328 | beacon_file = os.path.join(path,'%s.txt'%self.name) |
|
1304 | 1329 | self.filename_phase = os.path.join(figpath,beacon_file) |
|
1305 | #self.save_phase(self.filename_phase) | |
|
1330 | update_figfile = True | |
|
1306 | 1331 | |
|
1307 | 1332 | |
|
1308 | 1333 | #store data beacon phase |
@@ -1333,27 +1358,10 class PhasePlot(Figure): | |||
|
1333 | 1358 | |
|
1334 | 1359 | self.draw() |
|
1335 | 1360 | |
|
1336 |
if |
|
|
1361 | if dataOut.ltctime >= self.xmax: | |
|
1337 | 1362 | self.counter_imagwr = wr_period |
|
1338 | del self.xdata | |
|
1339 | del self.ydata | |
|
1340 | 1363 | self.__isConfig = False |
|
1341 | ||
|
1342 | # if self.figfile == None: | |
|
1343 | # str_datetime = thisDatetime.strftime("%Y%m%d_%H%M%S") | |
|
1344 | # self.figfile = self.getFilename(name = str_datetime) | |
|
1345 | ||
|
1346 | # if figpath != '': | |
|
1347 | # self.counter_imagwr += 1 | |
|
1348 | # if (self.counter_imagwr>=wr_period): | |
|
1349 | # # store png plot to local folder | |
|
1350 | # self.saveFigure(figpath, self.figfile) | |
|
1351 | # # store png plot to FTP server according to RT-Web format | |
|
1352 | # name = self.getNameToFtp(thisDatetime, self.FTP_WEI, self.EXP_CODE, self.SUB_EXP_CODE, self.PLOT_CODE, self.PLOT_POS) | |
|
1353 | # ftp_filename = os.path.join(figpath, name) | |
|
1354 | # self.saveFigure(figpath, ftp_filename) | |
|
1355 | # self.counter_imagwr = 0 | |
|
1356 | # self.figfile = None | |
|
1364 | update_figfile = True | |
|
1357 | 1365 | |
|
1358 | 1366 | self.save(figpath=figpath, |
|
1359 | 1367 | figfile=figfile, |
@@ -1361,4 +1369,4 class PhasePlot(Figure): | |||
|
1361 | 1369 | ftp=ftp, |
|
1362 | 1370 | wr_period=wr_period, |
|
1363 | 1371 | thisDatetime=thisDatetime, |
|
1364 |
update_figfile= |
|
|
1372 | update_figfile=update_figfile) |
General Comments 0
You need to be logged in to leave comments.
Login now