|
@@
-86,14
+86,18
class CrossSpectraPlot(Figure):
|
|
86
|
|
|
86
|
|
|
87
|
if len(pairsIndexList) > 4:
|
|
87
|
if len(pairsIndexList) > 4:
|
|
88
|
pairsIndexList = pairsIndexList[0:4]
|
|
88
|
pairsIndexList = pairsIndexList[0:4]
|
|
89
|
|
|
89
|
factor = dataOut.normFactor
|
|
90
|
x = dataOut.getVelRange(1)
|
|
90
|
x = dataOut.getVelRange(1)
|
|
91
|
y = dataOut.getHeiRange()
|
|
91
|
y = dataOut.getHeiRange()
|
|
92
|
z = 10.*numpy.log10(dataOut.data_spc[:,:,:])
|
|
92
|
z = dataOut.data_spc[:,:,:]/factor
|
|
93
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
93
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
94
|
avg = numpy.average(numpy.abs(z), axis=1)
|
|
94
|
avg = numpy.average(numpy.abs(z), axis=1)
|
|
|
|
|
95
|
noise = dataOut.getNoise()/factor
|
|
|
|
|
96
|
|
|
|
|
|
97
|
zdB = 10*numpy.log10(z)
|
|
|
|
|
98
|
avgdB = 10*numpy.log10(avg)
|
|
|
|
|
99
|
noisedB = 10*numpy.log10(noise)
|
|
95
|
|
|
100
|
|
|
96
|
noise = dataOut.getNoise()
|
|
|
|
|
97
|
|
|
101
|
|
|
98
|
thisDatetime = dataOut.datatime
|
|
102
|
thisDatetime = dataOut.datatime
|
|
99
|
title = "Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
103
|
title = "Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
@@
-113,8
+117,8
class CrossSpectraPlot(Figure):
|
|
113
|
if xmax == None: xmax = numpy.nanmax(x)
|
|
117
|
if xmax == None: xmax = numpy.nanmax(x)
|
|
114
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
118
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
115
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
119
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
116
|
if zmin == None: zmin = numpy.nanmin(avg)*0.9
|
|
120
|
if zmin == None: zmin = numpy.nanmin(avgdB)*0.9
|
|
117
|
if zmax == None: zmax = numpy.nanmax(avg)*0.9
|
|
121
|
if zmax == None: zmax = numpy.nanmax(avgdB)*0.9
|
|
118
|
|
|
122
|
|
|
119
|
self.__isConfig = True
|
|
123
|
self.__isConfig = True
|
|
120
|
|
|
124
|
|
|
@@
-123,18
+127,18
class CrossSpectraPlot(Figure):
|
|
123
|
for i in range(self.nplots):
|
|
127
|
for i in range(self.nplots):
|
|
124
|
pair = dataOut.pairsList[pairsIndexList[i]]
|
|
128
|
pair = dataOut.pairsList[pairsIndexList[i]]
|
|
125
|
|
|
129
|
|
|
126
|
title = "Channel %d: %4.2fdB" %(pair[0], noise[pair[0]])
|
|
130
|
title = "Channel %d: %4.2fdB" %(pair[0], noisedB[pair[0]])
|
|
127
|
z = 10.*numpy.log10(dataOut.data_spc[pair[0],:,:])
|
|
131
|
zdB = 10.*numpy.log10(dataOut.data_spc[pair[0],:,:]/factor)
|
|
128
|
axes0 = self.axesList[i*self.__nsubplots]
|
|
132
|
axes0 = self.axesList[i*self.__nsubplots]
|
|
129
|
axes0.pcolor(x, y, z,
|
|
133
|
axes0.pcolor(x, y, zdB,
|
|
130
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
134
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
131
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
135
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
132
|
ticksize=9, cblabel='')
|
|
136
|
ticksize=9, cblabel='')
|
|
133
|
|
|
137
|
|
|
134
|
title = "Channel %d: %4.2fdB" %(pair[1], noise[pair[1]])
|
|
138
|
title = "Channel %d: %4.2fdB" %(pair[1], noisedB[pair[1]])
|
|
135
|
z = 10.*numpy.log10(dataOut.data_spc[pair[1],:,:])
|
|
139
|
zdB = 10.*numpy.log10(dataOut.data_spc[pair[1],:,:]/factor)
|
|
136
|
axes0 = self.axesList[i*self.__nsubplots+1]
|
|
140
|
axes0 = self.axesList[i*self.__nsubplots+1]
|
|
137
|
axes0.pcolor(x, y, z,
|
|
141
|
axes0.pcolor(x, y, zdB,
|
|
138
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
142
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
139
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
143
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
140
|
ticksize=9, cblabel='')
|
|
144
|
ticksize=9, cblabel='')
|
|
@@
-265,13
+269,18
class RTIPlot(Figure):
|
|
265
|
|
|
269
|
|
|
266
|
tmin = None
|
|
270
|
tmin = None
|
|
267
|
tmax = None
|
|
271
|
tmax = None
|
|
|
|
|
272
|
factor = dataOut.normFactor
|
|
268
|
x = dataOut.getTimeRange()
|
|
273
|
x = dataOut.getTimeRange()
|
|
269
|
y = dataOut.getHeiRange()
|
|
274
|
y = dataOut.getHeiRange()
|
|
270
|
z = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:])
|
|
275
|
|
|
271
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
276
|
z = dataOut.data_spc[channelIndexList,:,:]/factor
|
|
|
|
|
277
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
272
|
avg = numpy.average(z, axis=1)
|
|
278
|
avg = numpy.average(z, axis=1)
|
|
|
|
|
279
|
noise = dataOut.getNoise()/factor
|
|
273
|
|
|
280
|
|
|
274
|
noise = dataOut.getNoise()
|
|
281
|
# zdB = 10.*numpy.log10(z)
|
|
|
|
|
282
|
avgdB = 10.*numpy.log10(avg)
|
|
|
|
|
283
|
noisedB = 10.*numpy.log10(noise)
|
|
275
|
|
|
284
|
|
|
276
|
thisDatetime = dataOut.datatime
|
|
285
|
thisDatetime = dataOut.datatime
|
|
277
|
title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y"))
|
|
286
|
title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y"))
|
|
@@
-290,8
+299,8
class RTIPlot(Figure):
|
|
290
|
tmin, tmax = self.getTimeLim(x, xmin, xmax)
|
|
299
|
tmin, tmax = self.getTimeLim(x, xmin, xmax)
|
|
291
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
300
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
292
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
301
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
293
|
if zmin == None: zmin = numpy.nanmin(avg)*0.9
|
|
302
|
if zmin == None: zmin = numpy.nanmin(avgdB)*0.9
|
|
294
|
if zmax == None: zmax = numpy.nanmax(avg)*0.9
|
|
303
|
if zmax == None: zmax = numpy.nanmax(avgdB)*0.9
|
|
295
|
|
|
304
|
|
|
296
|
self.name = thisDatetime.strftime("%Y%m%d_%H%M%S")
|
|
305
|
self.name = thisDatetime.strftime("%Y%m%d_%H%M%S")
|
|
297
|
self.__isConfig = True
|
|
306
|
self.__isConfig = True
|
|
@@
-302,15
+311,15
class RTIPlot(Figure):
|
|
302
|
for i in range(self.nplots):
|
|
311
|
for i in range(self.nplots):
|
|
303
|
title = "Channel %d: %s" %(dataOut.channelList[i], thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
312
|
title = "Channel %d: %s" %(dataOut.channelList[i], thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
304
|
axes = self.axesList[i*self.__nsubplots]
|
|
313
|
axes = self.axesList[i*self.__nsubplots]
|
|
305
|
z = avg[i].reshape((1,-1))
|
|
314
|
zdB = avgdB[i].reshape((1,-1))
|
|
306
|
axes.pcolor(x, y, z,
|
|
315
|
axes.pcolor(x, y, zdB,
|
|
307
|
xmin=tmin, xmax=tmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
316
|
xmin=tmin, xmax=tmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
308
|
xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,
|
|
317
|
xlabel=xlabel, ylabel=ylabel, title=title, rti=True, XAxisAsTime=True,
|
|
309
|
ticksize=9, cblabel='', cbsize="1%")
|
|
318
|
ticksize=9, cblabel='', cbsize="1%")
|
|
310
|
|
|
319
|
|
|
311
|
if self.__showprofile:
|
|
320
|
if self.__showprofile:
|
|
312
|
axes = self.axesList[i*self.__nsubplots +1]
|
|
321
|
axes = self.axesList[i*self.__nsubplots +1]
|
|
313
|
axes.pline(avg[i], y,
|
|
322
|
axes.pline(avgdB[i], y,
|
|
314
|
xmin=zmin, xmax=zmax, ymin=ymin, ymax=ymax,
|
|
323
|
xmin=zmin, xmax=zmax, ymin=ymin, ymax=ymax,
|
|
315
|
xlabel='dB', ylabel='', title='',
|
|
324
|
xlabel='dB', ylabel='', title='',
|
|
316
|
ytick_visible=False,
|
|
325
|
ytick_visible=False,
|
|
@@
-415,15
+424,18
class SpectraPlot(Figure):
|
|
415
|
if channel not in dataOut.channelList:
|
|
424
|
if channel not in dataOut.channelList:
|
|
416
|
raise ValueError, "Channel %d is not in dataOut.channelList"
|
|
425
|
raise ValueError, "Channel %d is not in dataOut.channelList"
|
|
417
|
channelIndexList.append(dataOut.channelList.index(channel))
|
|
426
|
channelIndexList.append(dataOut.channelList.index(channel))
|
|
418
|
|
|
427
|
factor = dataOut.normFactor
|
|
419
|
x = dataOut.getVelRange(1)
|
|
428
|
x = dataOut.getVelRange(1)
|
|
420
|
y = dataOut.getHeiRange()
|
|
429
|
y = dataOut.getHeiRange()
|
|
421
|
|
|
430
|
|
|
422
|
z = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:])
|
|
431
|
z = dataOut.data_spc[channelIndexList,:,:]/factor
|
|
423
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
432
|
z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
|
|
424
|
avg = numpy.average(z, axis=1)
|
|
433
|
avg = numpy.average(z, axis=1)
|
|
|
|
|
434
|
noise = dataOut.getNoise()/factor
|
|
425
|
|
|
435
|
|
|
426
|
noise = dataOut.getNoise()
|
|
436
|
zdB = 10*numpy.log10(z)
|
|
|
|
|
437
|
avgdB = 10*numpy.log10(avg)
|
|
|
|
|
438
|
noisedB = 10*numpy.log10(noise)
|
|
427
|
|
|
439
|
|
|
428
|
thisDatetime = dataOut.datatime
|
|
440
|
thisDatetime = dataOut.datatime
|
|
429
|
title = "Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
441
|
title = "Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
|
|
@@
-443,30
+455,30
class SpectraPlot(Figure):
|
|
443
|
if xmax == None: xmax = numpy.nanmax(x)
|
|
455
|
if xmax == None: xmax = numpy.nanmax(x)
|
|
444
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
456
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
445
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
457
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
446
|
if zmin == None: zmin = numpy.nanmin(avg)*0.9
|
|
458
|
if zmin == None: zmin = numpy.nanmin(avgdB)*0.9
|
|
447
|
if zmax == None: zmax = numpy.nanmax(avg)*0.9
|
|
459
|
if zmax == None: zmax = numpy.nanmax(avgdB)*0.9
|
|
448
|
|
|
460
|
|
|
449
|
self.__isConfig = True
|
|
461
|
self.__isConfig = True
|
|
450
|
|
|
462
|
|
|
451
|
self.setWinTitle(title)
|
|
463
|
self.setWinTitle(title)
|
|
452
|
|
|
464
|
|
|
453
|
for i in range(self.nplots):
|
|
465
|
for i in range(self.nplots):
|
|
454
|
title = "Channel %d: %4.2fdB" %(dataOut.channelList[i], noise[i])
|
|
466
|
title = "Channel %d: %4.2fdB" %(dataOut.channelList[i], noisedB[i])
|
|
455
|
axes = self.axesList[i*self.__nsubplots]
|
|
467
|
axes = self.axesList[i*self.__nsubplots]
|
|
456
|
axes.pcolor(x, y, z[i,:,:],
|
|
468
|
axes.pcolor(x, y, zdB[i,:,:],
|
|
457
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
469
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
|
|
458
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
470
|
xlabel=xlabel, ylabel=ylabel, title=title,
|
|
459
|
ticksize=9, cblabel='')
|
|
471
|
ticksize=9, cblabel='')
|
|
460
|
|
|
472
|
|
|
461
|
if self.__showprofile:
|
|
473
|
if self.__showprofile:
|
|
462
|
axes = self.axesList[i*self.__nsubplots +1]
|
|
474
|
axes = self.axesList[i*self.__nsubplots +1]
|
|
463
|
axes.pline(avg[i], y,
|
|
475
|
axes.pline(avgdB[i], y,
|
|
464
|
xmin=zmin, xmax=zmax, ymin=ymin, ymax=ymax,
|
|
476
|
xmin=zmin, xmax=zmax, ymin=ymin, ymax=ymax,
|
|
465
|
xlabel='dB', ylabel='', title='',
|
|
477
|
xlabel='dB', ylabel='', title='',
|
|
466
|
ytick_visible=False,
|
|
478
|
ytick_visible=False,
|
|
467
|
grid='x')
|
|
479
|
grid='x')
|
|
468
|
|
|
480
|
|
|
469
|
noiseline = numpy.repeat(noise[i], len(y))
|
|
481
|
noiseline = numpy.repeat(noisedB[i], len(y))
|
|
470
|
axes.addpline(noiseline, y, idline=1, color="black", linestyle="dashed", lw=2)
|
|
482
|
axes.addpline(noiseline, y, idline=1, color="black", linestyle="dashed", lw=2)
|
|
471
|
|
|
483
|
|
|
472
|
self.draw()
|
|
484
|
self.draw()
|
|
@@
-631,11
+643,14
class ProfilePlot(Figure):
|
|
631
|
raise ValueError, "Channel %d is not in dataOut.channelList"
|
|
643
|
raise ValueError, "Channel %d is not in dataOut.channelList"
|
|
632
|
channelIndexList.append(dataOut.channelList.index(channel))
|
|
644
|
channelIndexList.append(dataOut.channelList.index(channel))
|
|
633
|
|
|
645
|
|
|
634
|
|
|
646
|
factor = dataOut.normFactor
|
|
635
|
y = dataOut.getHeiRange()
|
|
647
|
y = dataOut.getHeiRange()
|
|
636
|
x = 10.*numpy.log10(dataOut.data_spc[channelIndexList,:,:])
|
|
648
|
x = dataOut.data_spc[channelIndexList,:,:]/factor
|
|
|
|
|
649
|
x = numpy.where(numpy.isfinite(x), x, numpy.NAN)
|
|
637
|
avg = numpy.average(x, axis=1)
|
|
650
|
avg = numpy.average(x, axis=1)
|
|
638
|
|
|
651
|
|
|
|
|
|
652
|
avgdB = 10*numpy.log10(avg)
|
|
|
|
|
653
|
|
|
639
|
thisDatetime = dataOut.datatime
|
|
654
|
thisDatetime = dataOut.datatime
|
|
640
|
title = "Power Profile"
|
|
655
|
title = "Power Profile"
|
|
641
|
xlabel = "dB"
|
|
656
|
xlabel = "dB"
|
|
@@
-651,8
+666,8
class ProfilePlot(Figure):
|
|
651
|
|
|
666
|
|
|
652
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
667
|
if ymin == None: ymin = numpy.nanmin(y)
|
|
653
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
668
|
if ymax == None: ymax = numpy.nanmax(y)
|
|
654
|
if xmin == None: xmin = numpy.nanmin(avg)*0.9
|
|
669
|
if xmin == None: xmin = numpy.nanmin(avgdB)*0.9
|
|
655
|
if xmax == None: xmax = numpy.nanmax(avg)*0.9
|
|
670
|
if xmax == None: xmax = numpy.nanmax(avgdB)*0.9
|
|
656
|
|
|
671
|
|
|
657
|
self.__isConfig = True
|
|
672
|
self.__isConfig = True
|
|
658
|
|
|
673
|
|
|
@@
-663,7
+678,7
class ProfilePlot(Figure):
|
|
663
|
axes = self.axesList[0]
|
|
678
|
axes = self.axesList[0]
|
|
664
|
|
|
679
|
|
|
665
|
legendlabels = ["channel %d"%x for x in channelList]
|
|
680
|
legendlabels = ["channel %d"%x for x in channelList]
|
|
666
|
axes.pmultiline(avg, y,
|
|
681
|
axes.pmultiline(avgdB, y,
|
|
667
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax,
|
|
682
|
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax,
|
|
668
|
xlabel=xlabel, ylabel=ylabel, title=title, legendlabels=legendlabels,
|
|
683
|
xlabel=xlabel, ylabel=ylabel, title=title, legendlabels=legendlabels,
|
|
669
|
ytick_visible=True, nxticks=5,
|
|
684
|
ytick_visible=True, nxticks=5,
|
|
@@
-852,6
+867,10
class RTIfromNoise(Figure):
|
|
852
|
|
|
867
|
|
|
853
|
self.WIDTH = 820
|
|
868
|
self.WIDTH = 820
|
|
854
|
self.HEIGHT = 200
|
|
869
|
self.HEIGHT = 200
|
|
|
|
|
870
|
self.WIDTHPROF = 120
|
|
|
|
|
871
|
self.HEIGHTPROF = 0
|
|
|
|
|
872
|
self.xdata = None
|
|
|
|
|
873
|
self.ydata = None
|
|
855
|
|
|
874
|
|
|
856
|
def getSubplots(self):
|
|
875
|
def getSubplots(self):
|
|
857
|
|
|
876
|
|
|
@@
-865,17
+884,19
class RTIfromNoise(Figure):
|
|
865
|
self.__showprofile = showprofile
|
|
884
|
self.__showprofile = showprofile
|
|
866
|
self.nplots = nplots
|
|
885
|
self.nplots = nplots
|
|
867
|
|
|
886
|
|
|
868
|
ncolspan = 1
|
|
887
|
ncolspan = 7
|
|
869
|
colspan = 1
|
|
888
|
colspan = 6
|
|
870
|
|
|
889
|
self.__nsubplots = 2
|
|
|
|
|
890
|
|
|
871
|
self.createFigure(idfigure = idfigure,
|
|
891
|
self.createFigure(idfigure = idfigure,
|
|
872
|
wintitle = wintitle,
|
|
892
|
wintitle = wintitle,
|
|
873
|
widthplot = self.WIDTH,
|
|
893
|
widthplot = self.WIDTH+self.WIDTHPROF,
|
|
874
|
heightplot = self.HEIGHT)
|
|
894
|
heightplot = self.HEIGHT+self.HEIGHTPROF)
|
|
875
|
|
|
895
|
|
|
876
|
nrow, ncol = self.getSubplots()
|
|
896
|
nrow, ncol = self.getSubplots()
|
|
877
|
|
|
897
|
|
|
878
|
self.addAxes(nrow, ncol, 0, 0, 1, 1)
|
|
898
|
self.addAxes(nrow, ncol*ncolspan, 0, 0, colspan, 1)
|
|
|
|
|
899
|
|
|
879
|
|
|
900
|
|
|
880
|
def run(self, dataOut, idfigure, wintitle="", channelList=None, showprofile='True',
|
|
901
|
def run(self, dataOut, idfigure, wintitle="", channelList=None, showprofile='True',
|
|
881
|
xmin=None, xmax=None, ymin=None, ymax=None,
|
|
902
|
xmin=None, xmax=None, ymin=None, ymax=None,
|
|
@@
-899,12
+920,13
class RTIfromNoise(Figure):
|
|
899
|
tmax = None
|
|
920
|
tmax = None
|
|
900
|
x = dataOut.getTimeRange()
|
|
921
|
x = dataOut.getTimeRange()
|
|
901
|
y = dataOut.getHeiRange()
|
|
922
|
y = dataOut.getHeiRange()
|
|
902
|
|
|
923
|
factor = dataOut.normFactor
|
|
903
|
noise = dataOut.getNoise()
|
|
924
|
noise = dataOut.getNoise()/factor
|
|
|
|
|
925
|
noisedB = 10*numpy.log10(noise)
|
|
904
|
|
|
926
|
|
|
905
|
thisDatetime = dataOut.datatime
|
|
927
|
thisDatetime = dataOut.datatime
|
|
906
|
title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y"))
|
|
928
|
title = "RTI: %s" %(thisDatetime.strftime("%d-%b-%Y"))
|
|
907
|
xlabel = "Velocity (m/s)"
|
|
929
|
xlabel = ""
|
|
908
|
ylabel = "Range (Km)"
|
|
930
|
ylabel = "Range (Km)"
|
|
909
|
|
|
931
|
|
|
910
|
if not self.__isConfig:
|
|
932
|
if not self.__isConfig:
|
|
@@
-917,12
+939,14
class RTIfromNoise(Figure):
|
|
917
|
showprofile=showprofile)
|
|
939
|
showprofile=showprofile)
|
|
918
|
|
|
940
|
|
|
919
|
tmin, tmax = self.getTimeLim(x, xmin, xmax)
|
|
941
|
tmin, tmax = self.getTimeLim(x, xmin, xmax)
|
|
920
|
if ymin == None: ymin = numpy.nanmin(noise)
|
|
942
|
if ymin == None: ymin = numpy.nanmin(noisedB)
|
|
921
|
if ymax == None: ymax = numpy.nanmax(noise)
|
|
943
|
if ymax == None: ymax = numpy.nanmax(noisedB)
|
|
922
|
|
|
944
|
|
|
923
|
self.name = thisDatetime.strftime("%Y%m%d_%H%M%S")
|
|
945
|
self.name = thisDatetime.strftime("%Y%m%d_%H%M%S")
|
|
924
|
self.__isConfig = True
|
|
946
|
self.__isConfig = True
|
|
925
|
|
|
947
|
|
|
|
|
|
948
|
self.xdata = numpy.array([])
|
|
|
|
|
949
|
self.ydata = numpy.array([])
|
|
926
|
|
|
950
|
|
|
927
|
self.setWinTitle(title)
|
|
951
|
self.setWinTitle(title)
|
|
928
|
|
|
952
|
|
|
@@
-931,15
+955,21
class RTIfromNoise(Figure):
|
|
931
|
|
|
955
|
|
|
932
|
legendlabels = ["channel %d"%idchannel for idchannel in channelList]
|
|
956
|
legendlabels = ["channel %d"%idchannel for idchannel in channelList]
|
|
933
|
axes = self.axesList[0]
|
|
957
|
axes = self.axesList[0]
|
|
934
|
xdata = x[0:1]
|
|
958
|
|
|
935
|
ydata = noise[channelIndexList].reshape(-1,1)
|
|
959
|
self.xdata = numpy.hstack((self.xdata, x[0:1]))
|
|
936
|
axes.pmultilineyaxis(x=xdata, y=ydata,
|
|
960
|
|
|
|
|
|
961
|
if len(self.ydata)==0:
|
|
|
|
|
962
|
self.ydata = noisedB[channelIndexList].reshape(-1,1)
|
|
|
|
|
963
|
else:
|
|
|
|
|
964
|
self.ydata = numpy.hstack((self.ydata, noisedB[channelIndexList].reshape(-1,1)))
|
|
|
|
|
965
|
|
|
|
|
|
966
|
|
|
|
|
|
967
|
axes.pmultilineyaxis(x=self.xdata, y=self.ydata,
|
|
937
|
xmin=tmin, xmax=tmax, ymin=ymin, ymax=ymax,
|
|
968
|
xmin=tmin, xmax=tmax, ymin=ymin, ymax=ymax,
|
|
938
|
xlabel=xlabel, ylabel=ylabel, title=title, legendlabels=legendlabels, marker='x', markersize=8, linestyle="solid",
|
|
969
|
xlabel=xlabel, ylabel=ylabel, title=title, legendlabels=legendlabels, marker='x', markersize=8, linestyle="solid",
|
|
939
|
XAxisAsTime=True
|
|
970
|
XAxisAsTime=True
|
|
940
|
)
|
|
971
|
)
|
|
941
|
|
|
972
|
|
|
942
|
|
|
|
|
|
943
|
self.draw()
|
|
973
|
self.draw()
|
|
944
|
|
|
974
|
|
|
945
|
if save:
|
|
975
|
if save:
|
|
@@
-951,4
+981,6
class RTIfromNoise(Figure):
|
|
951
|
|
|
981
|
|
|
952
|
if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax:
|
|
982
|
if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax:
|
|
953
|
self.__isConfig = False
|
|
983
|
self.__isConfig = False
|
|
|
|
|
984
|
del self.xdata
|
|
|
|
|
985
|
del self.ydata
|
|
954
|
No newline at end of file
|
|
986
|
|