@@ -9,7 +9,7 class Figure: | |||
|
9 | 9 | __driver = mpldriver |
|
10 | 10 | fig = None |
|
11 | 11 | |
|
12 |
id |
|
|
12 | id = None | |
|
13 | 13 | wintitle = None |
|
14 | 14 | width = None |
|
15 | 15 | height = None |
@@ -32,7 +32,7 class Figure: | |||
|
32 | 32 | |
|
33 | 33 | def getFilename(self, name, ext='.png'): |
|
34 | 34 | |
|
35 |
path = '%s%03d' %(self.PREFIX, self.id |
|
|
35 | path = '%s%03d' %(self.PREFIX, self.id) | |
|
36 | 36 | filename = '%s_%s%s' %(self.PREFIX, name, ext) |
|
37 | 37 | |
|
38 | 38 | return os.path.join(path, filename) |
@@ -82,11 +82,11 class Figure: | |||
|
82 | 82 | |
|
83 | 83 | return tmin, tmax |
|
84 | 84 | |
|
85 |
def init(self, id |
|
|
85 | def init(self, id, nplots, wintitle): | |
|
86 | 86 | |
|
87 | 87 | raise ValueError, "This method has been replaced with createFigure" |
|
88 | 88 | |
|
89 |
def createFigure(self, id |
|
|
89 | def createFigure(self, id, wintitle, widthplot=None, heightplot=None, show=True): | |
|
90 | 90 | |
|
91 | 91 | """ |
|
92 | 92 | Crea la figura de acuerdo al driver y parametros seleccionados seleccionados. |
@@ -94,7 +94,7 class Figure: | |||
|
94 | 94 | y self.HEIGHT y el numero de subplots (nrow, ncol) |
|
95 | 95 | |
|
96 | 96 | Input: |
|
97 |
id |
|
|
97 | id : Los parametros necesarios son | |
|
98 | 98 | wintitle : |
|
99 | 99 | |
|
100 | 100 | """ |
@@ -105,13 +105,13 class Figure: | |||
|
105 | 105 | if heightplot == None: |
|
106 | 106 | heightplot = self.HEIGHT |
|
107 | 107 | |
|
108 |
self.id |
|
|
108 | self.id = id | |
|
109 | 109 | |
|
110 | 110 | self.wintitle = wintitle |
|
111 | 111 | |
|
112 | 112 | self.widthscreen, self.heightscreen = self.getScreenDim(widthplot, heightplot) |
|
113 | 113 | |
|
114 |
self.fig = self.__driver.createFigure(id |
|
|
114 | self.fig = self.__driver.createFigure(id=self.id, | |
|
115 | 115 | wintitle=self.wintitle, |
|
116 | 116 | width=self.widthscreen, |
|
117 | 117 | height=self.heightscreen, |
@@ -204,6 +204,9 class Axes: | |||
|
204 | 204 | x_buffer = None |
|
205 | 205 | z_buffer = None |
|
206 | 206 | |
|
207 | __MAXNUMX = 1000 | |
|
208 | __MAXNUMY = 500 | |
|
209 | ||
|
207 | 210 | def __init__(self, *args): |
|
208 | 211 | |
|
209 | 212 | """ |
@@ -429,8 +432,14 class Axes: | |||
|
429 | 432 | zmin=None, zmax=None, |
|
430 | 433 | xlabel='', ylabel='', |
|
431 | 434 | title='', rti = False, colormap='jet', |
|
435 | maxNumX = None, maxNumY = None, | |
|
432 | 436 | **kwargs): |
|
433 | 437 | |
|
438 | if maxNumX == None: | |
|
439 | maxNumX = self.__MAXNUMX | |
|
440 | ||
|
441 | if maxNumY == None: | |
|
442 | maxNumY = self.__MAXNUMY | |
|
434 | 443 | |
|
435 | 444 | if self.__firsttime: |
|
436 | 445 | self.z_buffer = z |
@@ -461,6 +470,16 class Axes: | |||
|
461 | 470 | if self.zmin == None: self.zmin = zmin |
|
462 | 471 | if self.zmax == None: self.zmax = zmax |
|
463 | 472 | |
|
473 | ||
|
474 | deltax = (xmax - xmin)/maxNumX | |
|
475 | deltay = (ymax - ymin)/maxNumY | |
|
476 | ||
|
477 | resolutionx = x[1]-x[0] | |
|
478 | resolutiony = y[1]-y[0] | |
|
479 | ||
|
480 | self.decimationx = numpy.ceil(deltax / resolutionx) | |
|
481 | self.decimationy = numpy.ceil(deltay / resolutiony) | |
|
482 | ||
|
464 | 483 | self.__firsttime = False |
|
465 | 484 | return |
|
466 | 485 | |
@@ -477,13 +496,16 class Axes: | |||
|
477 | 496 | |
|
478 | 497 | self.z_buffer = numpy.hstack((self.z_buffer, z)) |
|
479 | 498 | |
|
480 | newydim = len(y) | |
|
481 | ||
|
482 | 499 | # self.z_buffer = numpy.ma.masked_inside(self.z_buffer,0.99*self.__missing,1.01*self.__missing) |
|
500 | ydim = len(y) | |
|
501 | z_buffer = self.z_buffer.reshape(-1,ydim) | |
|
483 | 502 | |
|
484 |
|
|
|
503 | x_buffer = self.x_buffer[::self.decimationx] | |
|
504 | y_buffer = y[::self.decimationy] | |
|
505 | z_buffer = z_buffer[::self.decimationx, ::self.decimationy] | |
|
506 | #=================================================== | |
|
485 | 507 | |
|
486 |
self.__driver.addpcolorbuffer(self.ax, |
|
|
508 | self.__driver.addpcolorbuffer(self.ax, x_buffer, y_buffer, z_buffer, self.zmin, self.zmax, | |
|
487 | 509 | xlabel=xlabel, |
|
488 | 510 | ylabel=ylabel, |
|
489 | 511 | title=title, |
@@ -18,10 +18,10 from matplotlib.ticker import * | |||
|
18 | 18 | #Actualizacion de las funciones del driver |
|
19 | 19 | ########################################### |
|
20 | 20 | |
|
21 |
def createFigure(id |
|
|
21 | def createFigure(id, wintitle, width, height, facecolor="w", show=True): | |
|
22 | 22 | |
|
23 | 23 | matplotlib.pyplot.ioff() |
|
24 |
fig = matplotlib.pyplot.figure(num=id |
|
|
24 | fig = matplotlib.pyplot.figure(num=id, facecolor=facecolor) | |
|
25 | 25 | fig.canvas.manager.set_window_title(wintitle) |
|
26 | 26 | fig.canvas.manager.resize(width, height) |
|
27 | 27 | matplotlib.pyplot.ion() |
@@ -36,7 +36,7 class CrossSpectraPlot(Figure): | |||
|
36 | 36 | |
|
37 | 37 | return nrow, ncol |
|
38 | 38 | |
|
39 |
def setup(self, id |
|
|
39 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
40 | 40 | |
|
41 | 41 | self.__showprofile = showprofile |
|
42 | 42 | self.nplots = nplots |
@@ -44,7 +44,7 class CrossSpectraPlot(Figure): | |||
|
44 | 44 | ncolspan = 1 |
|
45 | 45 | colspan = 1 |
|
46 | 46 | |
|
47 |
self.createFigure(id |
|
|
47 | self.createFigure(id = id, | |
|
48 | 48 | wintitle = wintitle, |
|
49 | 49 | widthplot = self.WIDTH + self.WIDTHPROF, |
|
50 | 50 | heightplot = self.HEIGHT + self.HEIGHTPROF, |
@@ -59,7 +59,7 class CrossSpectraPlot(Figure): | |||
|
59 | 59 | |
|
60 | 60 | counter += 1 |
|
61 | 61 | |
|
62 |
def run(self, dataOut, id |
|
|
62 | def run(self, dataOut, id, wintitle="", pairsList=None, showprofile='True', | |
|
63 | 63 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
64 | 64 | save=False, figpath='./', figfile=None, |
|
65 | 65 | power_cmap='jet', coherence_cmap='jet', phase_cmap='RdBu_r', show=True): |
@@ -68,7 +68,7 class CrossSpectraPlot(Figure): | |||
|
68 | 68 | |
|
69 | 69 | Input: |
|
70 | 70 | dataOut : |
|
71 |
id |
|
|
71 | id : | |
|
72 | 72 | wintitle : |
|
73 | 73 | channelList : |
|
74 | 74 | showProfile : |
@@ -117,7 +117,7 class CrossSpectraPlot(Figure): | |||
|
117 | 117 | |
|
118 | 118 | nplots = len(pairsIndexList) |
|
119 | 119 | |
|
120 |
self.setup(id |
|
|
120 | self.setup(id=id, | |
|
121 | 121 | nplots=nplots, |
|
122 | 122 | wintitle=wintitle, |
|
123 | 123 | showprofile=showprofile, |
@@ -203,7 +203,7 class RTIPlot(Figure): | |||
|
203 | 203 | self.HEIGHT = 150 |
|
204 | 204 | self.WIDTHPROF = 120 |
|
205 | 205 | self.HEIGHTPROF = 0 |
|
206 |
self.counter |
|
|
206 | self.counter_imagwr = 0 | |
|
207 | 207 | |
|
208 | 208 | def getSubplots(self): |
|
209 | 209 | |
@@ -212,7 +212,7 class RTIPlot(Figure): | |||
|
212 | 212 | |
|
213 | 213 | return nrow, ncol |
|
214 | 214 | |
|
215 |
def setup(self, id |
|
|
215 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
216 | 216 | |
|
217 | 217 | self.__showprofile = showprofile |
|
218 | 218 | self.nplots = nplots |
@@ -224,7 +224,7 class RTIPlot(Figure): | |||
|
224 | 224 | colspan = 6 |
|
225 | 225 | self.__nsubplots = 2 |
|
226 | 226 | |
|
227 |
self.createFigure(id |
|
|
227 | self.createFigure(id = id, | |
|
228 | 228 | wintitle = wintitle, |
|
229 | 229 | widthplot = self.WIDTH + self.WIDTHPROF, |
|
230 | 230 | heightplot = self.HEIGHT + self.HEIGHTPROF, |
@@ -246,16 +246,16 class RTIPlot(Figure): | |||
|
246 | 246 | |
|
247 | 247 | counter += 1 |
|
248 | 248 | |
|
249 |
def run(self, dataOut, id |
|
|
249 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True', | |
|
250 | 250 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
251 | 251 | timerange=None, |
|
252 |
save=False, figpath='./', figfile=None, ftp=False, |
|
|
252 | save=False, figpath='./', figfile=None, ftp=False, res_imagwr=1, show=True): | |
|
253 | 253 | |
|
254 | 254 | """ |
|
255 | 255 | |
|
256 | 256 | Input: |
|
257 | 257 | dataOut : |
|
258 |
id |
|
|
258 | id : | |
|
259 | 259 | wintitle : |
|
260 | 260 | channelList : |
|
261 | 261 | showProfile : |
@@ -302,7 +302,7 class RTIPlot(Figure): | |||
|
302 | 302 | |
|
303 | 303 | nplots = len(channelIndexList) |
|
304 | 304 | |
|
305 |
self.setup(id |
|
|
305 | self.setup(id=id, | |
|
306 | 306 | nplots=nplots, |
|
307 | 307 | wintitle=wintitle, |
|
308 | 308 | showprofile=showprofile, |
@@ -341,16 +341,18 class RTIPlot(Figure): | |||
|
341 | 341 | |
|
342 | 342 | if save: |
|
343 | 343 | |
|
344 | if figfile == None: | |
|
345 | figfile = self.getFilename(name = self.name) | |
|
346 | ||
|
347 | self.saveFigure(figpath, figfile) | |
|
348 | ||
|
349 | self.counterftp += 1 | |
|
350 | if (ftp and (self.counterftp==ftpratio)): | |
|
351 |
|
|
|
352 | self.sendByFTP(figfilename) | |
|
353 | self.counterftp = 0 | |
|
344 | self.counter_imagwr += 1 | |
|
345 | if (self.counter_imagwr==res_imagwr): | |
|
346 | ||
|
347 | ||
|
348 | fig_file = self.getFilename(name = self.name) | |
|
349 | self.saveFigure(figpath, fig_file) | |
|
350 | if ftp: | |
|
351 | self.saveFigure(figpath, figfile) | |
|
352 | figfilename = os.path.join(figpath,figfile) | |
|
353 | self.sendByFTP(figfilename) | |
|
354 | ||
|
355 | self.counter_imagwr = 0 | |
|
354 | 356 | |
|
355 | 357 | if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax: |
|
356 | 358 | self.__isConfig = False |
@@ -381,7 +383,7 class SpectraPlot(Figure): | |||
|
381 | 383 | |
|
382 | 384 | return nrow, ncol |
|
383 | 385 | |
|
384 |
def setup(self, id |
|
|
386 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
385 | 387 | |
|
386 | 388 | self.__showprofile = showprofile |
|
387 | 389 | self.nplots = nplots |
@@ -393,7 +395,7 class SpectraPlot(Figure): | |||
|
393 | 395 | colspan = 2 |
|
394 | 396 | self.__nsubplots = 2 |
|
395 | 397 | |
|
396 |
self.createFigure(id |
|
|
398 | self.createFigure(id = id, | |
|
397 | 399 | wintitle = wintitle, |
|
398 | 400 | widthplot = self.WIDTH + self.WIDTHPROF, |
|
399 | 401 | heightplot = self.HEIGHT + self.HEIGHTPROF, |
@@ -415,7 +417,7 class SpectraPlot(Figure): | |||
|
415 | 417 | |
|
416 | 418 | counter += 1 |
|
417 | 419 | |
|
418 |
def run(self, dataOut, id |
|
|
420 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True', | |
|
419 | 421 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
420 | 422 | save=False, figpath='./', figfile=None, show=True): |
|
421 | 423 | |
@@ -423,7 +425,7 class SpectraPlot(Figure): | |||
|
423 | 425 | |
|
424 | 426 | Input: |
|
425 | 427 | dataOut : |
|
426 |
id |
|
|
428 | id : | |
|
427 | 429 | wintitle : |
|
428 | 430 | channelList : |
|
429 | 431 | showProfile : |
@@ -466,7 +468,7 class SpectraPlot(Figure): | |||
|
466 | 468 | |
|
467 | 469 | nplots = len(channelIndexList) |
|
468 | 470 | |
|
469 |
self.setup(id |
|
|
471 | self.setup(id=id, | |
|
470 | 472 | nplots=nplots, |
|
471 | 473 | wintitle=wintitle, |
|
472 | 474 | showprofile=showprofile, |
@@ -527,11 +529,11 class Scope(Figure): | |||
|
527 | 529 | ncol = 3 |
|
528 | 530 | return nrow, ncol |
|
529 | 531 | |
|
530 |
def setup(self, id |
|
|
532 | def setup(self, id, nplots, wintitle, show): | |
|
531 | 533 | |
|
532 | 534 | self.nplots = nplots |
|
533 | 535 | |
|
534 |
self.createFigure(id |
|
|
536 | self.createFigure(id=id, | |
|
535 | 537 | wintitle=wintitle, |
|
536 | 538 | show=show) |
|
537 | 539 | |
@@ -544,7 +546,7 class Scope(Figure): | |||
|
544 | 546 | |
|
545 | 547 | |
|
546 | 548 | |
|
547 |
def run(self, dataOut, id |
|
|
549 | def run(self, dataOut, id, wintitle="", channelList=None, | |
|
548 | 550 | xmin=None, xmax=None, ymin=None, ymax=None, save=False, |
|
549 | 551 | figpath='./', figfile=None, show=True): |
|
550 | 552 | |
@@ -552,7 +554,7 class Scope(Figure): | |||
|
552 | 554 | |
|
553 | 555 | Input: |
|
554 | 556 | dataOut : |
|
555 |
id |
|
|
557 | id : | |
|
556 | 558 | wintitle : |
|
557 | 559 | channelList : |
|
558 | 560 | xmin : None, |
@@ -583,7 +585,7 class Scope(Figure): | |||
|
583 | 585 | if not self.__isConfig: |
|
584 | 586 | nplots = len(channelIndexList) |
|
585 | 587 | |
|
586 |
self.setup(id |
|
|
588 | self.setup(id=id, | |
|
587 | 589 | nplots=nplots, |
|
588 | 590 | wintitle=wintitle, |
|
589 | 591 | show=show) |
@@ -635,14 +637,14 class PowerProfilePlot(Figure): | |||
|
635 | 637 | |
|
636 | 638 | return nrow, ncol |
|
637 | 639 | |
|
638 |
def setup(self, id |
|
|
640 | def setup(self, id, nplots, wintitle, show): | |
|
639 | 641 | |
|
640 | 642 | self.nplots = nplots |
|
641 | 643 | |
|
642 | 644 | ncolspan = 1 |
|
643 | 645 | colspan = 1 |
|
644 | 646 | |
|
645 |
self.createFigure(id |
|
|
647 | self.createFigure(id = id, | |
|
646 | 648 | wintitle = wintitle, |
|
647 | 649 | widthplot = self.WIDTH, |
|
648 | 650 | heightplot = self.HEIGHT, |
@@ -655,7 +657,7 class PowerProfilePlot(Figure): | |||
|
655 | 657 | for x in range(ncol): |
|
656 | 658 | self.addAxes(nrow, ncol*ncolspan, y, x*ncolspan, colspan, 1) |
|
657 | 659 | |
|
658 |
def run(self, dataOut, id |
|
|
660 | def run(self, dataOut, id, wintitle="", channelList=None, | |
|
659 | 661 | xmin=None, xmax=None, ymin=None, ymax=None, |
|
660 | 662 | save=False, figpath='./', figfile=None, show=True): |
|
661 | 663 | |
@@ -687,7 +689,7 class PowerProfilePlot(Figure): | |||
|
687 | 689 | |
|
688 | 690 | nplots = 1 |
|
689 | 691 | |
|
690 |
self.setup(id |
|
|
692 | self.setup(id=id, | |
|
691 | 693 | nplots=nplots, |
|
692 | 694 | wintitle=wintitle, |
|
693 | 695 | show=show) |
@@ -738,7 +740,7 class CoherenceMap(Figure): | |||
|
738 | 740 | self.HEIGHT = 150 |
|
739 | 741 | self.WIDTHPROF = 120 |
|
740 | 742 | self.HEIGHTPROF = 0 |
|
741 |
self.counter |
|
|
743 | self.counter_imagwr = 0 | |
|
742 | 744 | |
|
743 | 745 | def getSubplots(self): |
|
744 | 746 | ncol = 1 |
@@ -746,7 +748,7 class CoherenceMap(Figure): | |||
|
746 | 748 | |
|
747 | 749 | return nrow, ncol |
|
748 | 750 | |
|
749 |
def setup(self, id |
|
|
751 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
750 | 752 | self.__showprofile = showprofile |
|
751 | 753 | self.nplots = nplots |
|
752 | 754 | |
@@ -757,7 +759,7 class CoherenceMap(Figure): | |||
|
757 | 759 | colspan = 6 |
|
758 | 760 | self.__nsubplots = 2 |
|
759 | 761 | |
|
760 |
self.createFigure(id |
|
|
762 | self.createFigure(id = id, | |
|
761 | 763 | wintitle = wintitle, |
|
762 | 764 | widthplot = self.WIDTH + self.WIDTHPROF, |
|
763 | 765 | heightplot = self.HEIGHT + self.HEIGHTPROF, |
@@ -773,10 +775,10 class CoherenceMap(Figure): | |||
|
773 | 775 | if showprofile: |
|
774 | 776 | self.addAxes(nrow, ncol*ncolspan, y, x*ncolspan+colspan, 1, 1) |
|
775 | 777 | |
|
776 |
def run(self, dataOut, id |
|
|
778 | def run(self, dataOut, id, wintitle="", pairsList=None, showprofile='True', | |
|
777 | 779 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
778 | 780 | timerange=None, |
|
779 |
save=False, figpath='./', figfile=None, ftp=False, |
|
|
781 | save=False, figpath='./', figfile=None, ftp=False, res_imagwr=1, | |
|
780 | 782 | coherence_cmap='jet', phase_cmap='RdBu_r', show=True): |
|
781 | 783 | |
|
782 | 784 | if pairsList == None: |
@@ -810,7 +812,7 class CoherenceMap(Figure): | |||
|
810 | 812 | |
|
811 | 813 | if not self.__isConfig: |
|
812 | 814 | nplots = len(pairsIndexList) |
|
813 |
self.setup(id |
|
|
815 | self.setup(id=id, | |
|
814 | 816 | nplots=nplots, |
|
815 | 817 | wintitle=wintitle, |
|
816 | 818 | showprofile=showprofile, |
@@ -881,16 +883,16 class CoherenceMap(Figure): | |||
|
881 | 883 | |
|
882 | 884 | if save: |
|
883 | 885 | |
|
884 | if figfile == None: | |
|
885 | figfile = self.getFilename(name = self.name) | |
|
886 | ||
|
887 | self.saveFigure(figpath, figfile) | |
|
888 | ||
|
889 | self.counterftp += 1 | |
|
890 | if (ftp and (self.counterftp==ftpratio)): | |
|
891 | figfilename = os.path.join(figpath,figfile) | |
|
892 | self.sendByFTP(figfilename) | |
|
893 |
self.counter |
|
|
886 | self.counter_imagwr += 1 | |
|
887 | if (self.counter_imagwr==res_imagwr): | |
|
888 | fig_file = self.getFilename(name = self.name) | |
|
889 | self.saveFigure(figpath, fig_file) | |
|
890 | if ftp: | |
|
891 | self.saveFigure(figpath, figfile) | |
|
892 | figfilename = os.path.join(figpath,figfile) | |
|
893 | self.sendByFTP(figfilename) | |
|
894 | ||
|
895 | self.counter_imagwr = 0 | |
|
894 | 896 | |
|
895 | 897 | if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax: |
|
896 | 898 | self.__isConfig = False |
@@ -922,7 +924,7 class RTIfromNoise(Figure): | |||
|
922 | 924 | |
|
923 | 925 | return nrow, ncol |
|
924 | 926 | |
|
925 |
def setup(self, id |
|
|
927 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
926 | 928 | |
|
927 | 929 | self.__showprofile = showprofile |
|
928 | 930 | self.nplots = nplots |
@@ -931,7 +933,7 class RTIfromNoise(Figure): | |||
|
931 | 933 | colspan = 6 |
|
932 | 934 | self.__nsubplots = 2 |
|
933 | 935 | |
|
934 |
self.createFigure(id |
|
|
936 | self.createFigure(id = id, | |
|
935 | 937 | wintitle = wintitle, |
|
936 | 938 | widthplot = self.WIDTH+self.WIDTHPROF, |
|
937 | 939 | heightplot = self.HEIGHT+self.HEIGHTPROF, |
@@ -942,7 +944,7 class RTIfromNoise(Figure): | |||
|
942 | 944 | self.addAxes(nrow, ncol*ncolspan, 0, 0, colspan, 1) |
|
943 | 945 | |
|
944 | 946 | |
|
945 |
def run(self, dataOut, id |
|
|
947 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True', | |
|
946 | 948 | xmin=None, xmax=None, ymin=None, ymax=None, |
|
947 | 949 | timerange=None, |
|
948 | 950 | save=False, figpath='./', figfile=None, show=True): |
@@ -978,7 +980,7 class RTIfromNoise(Figure): | |||
|
978 | 980 | |
|
979 | 981 | nplots = 1 |
|
980 | 982 | |
|
981 |
self.setup(id |
|
|
983 | self.setup(id=id, | |
|
982 | 984 | nplots=nplots, |
|
983 | 985 | wintitle=wintitle, |
|
984 | 986 | showprofile=showprofile, |
@@ -1050,7 +1052,7 class SpectraHeisScope(Figure): | |||
|
1050 | 1052 | self.HEIGHT = 250 |
|
1051 | 1053 | self.WIDTHPROF = 120 |
|
1052 | 1054 | self.HEIGHTPROF = 0 |
|
1053 |
self.counter |
|
|
1055 | self.counter_imagwr = 0 | |
|
1054 | 1056 | |
|
1055 | 1057 | def getSubplots(self): |
|
1056 | 1058 | |
@@ -1059,7 +1061,7 class SpectraHeisScope(Figure): | |||
|
1059 | 1061 | |
|
1060 | 1062 | return nrow, ncol |
|
1061 | 1063 | |
|
1062 |
def setup(self, id |
|
|
1064 | def setup(self, id, nplots, wintitle, show): | |
|
1063 | 1065 | |
|
1064 | 1066 | showprofile = False |
|
1065 | 1067 | self.__showprofile = showprofile |
@@ -1072,7 +1074,7 class SpectraHeisScope(Figure): | |||
|
1072 | 1074 | colspan = 2 |
|
1073 | 1075 | self.__nsubplots = 2 |
|
1074 | 1076 | |
|
1075 |
self.createFigure(id |
|
|
1077 | self.createFigure(id = id, | |
|
1076 | 1078 | wintitle = wintitle, |
|
1077 | 1079 | widthplot = self.WIDTH + self.WIDTHPROF, |
|
1078 | 1080 | heightplot = self.HEIGHT + self.HEIGHTPROF, |
@@ -1107,11 +1109,11 class SpectraHeisScope(Figure): | |||
|
1107 | 1109 | # ncol = 3 |
|
1108 | 1110 | # return nrow, ncol |
|
1109 | 1111 | # |
|
1110 |
# def setup(self, id |
|
|
1112 | # def setup(self, id, nplots, wintitle): | |
|
1111 | 1113 | # |
|
1112 | 1114 | # self.nplots = nplots |
|
1113 | 1115 | # |
|
1114 |
# self.createFigure(id |
|
|
1116 | # self.createFigure(id, wintitle) | |
|
1115 | 1117 | # |
|
1116 | 1118 | # nrow,ncol = self.getSubplots() |
|
1117 | 1119 | # colspan = 3 |
@@ -1120,15 +1122,15 class SpectraHeisScope(Figure): | |||
|
1120 | 1122 | # for i in range(nplots): |
|
1121 | 1123 | # self.addAxes(nrow, ncol, i, 0, colspan, rowspan) |
|
1122 | 1124 | |
|
1123 |
def run(self, dataOut, id |
|
|
1125 | def run(self, dataOut, id, wintitle="", channelList=None, | |
|
1124 | 1126 | xmin=None, xmax=None, ymin=None, ymax=None, save=False, |
|
1125 |
figpath='./', figfile=None, ftp=False, |
|
|
1127 | figpath='./', figfile=None, ftp=False, res_imagwr=1, show=True): | |
|
1126 | 1128 | |
|
1127 | 1129 | """ |
|
1128 | 1130 | |
|
1129 | 1131 | Input: |
|
1130 | 1132 | dataOut : |
|
1131 |
id |
|
|
1133 | id : | |
|
1132 | 1134 | wintitle : |
|
1133 | 1135 | channelList : |
|
1134 | 1136 | xmin : None, |
@@ -1171,7 +1173,7 class SpectraHeisScope(Figure): | |||
|
1171 | 1173 | if not self.__isConfig: |
|
1172 | 1174 | nplots = len(channelIndexList) |
|
1173 | 1175 | |
|
1174 |
self.setup(id |
|
|
1176 | self.setup(id=id, | |
|
1175 | 1177 | nplots=nplots, |
|
1176 | 1178 | wintitle=wintitle, |
|
1177 | 1179 | show=show) |
@@ -1203,11 +1205,11 class SpectraHeisScope(Figure): | |||
|
1203 | 1205 | |
|
1204 | 1206 | self.saveFigure(figpath, figfile) |
|
1205 | 1207 | |
|
1206 |
self.counter |
|
|
1207 |
if (ftp and (self.counter |
|
|
1208 | self.counter_imagwr += 1 | |
|
1209 | if (ftp and (self.counter_imagwr==res_imagwr)): | |
|
1208 | 1210 | figfilename = os.path.join(figpath,figfile) |
|
1209 | 1211 | self.sendByFTP(figfilename) |
|
1210 |
self.counter |
|
|
1212 | self.counter_imagwr = 0 | |
|
1211 | 1213 | |
|
1212 | 1214 | |
|
1213 | 1215 | class RTIfromSpectraHeis(Figure): |
@@ -1227,7 +1229,7 class RTIfromSpectraHeis(Figure): | |||
|
1227 | 1229 | self.HEIGHT = 200 |
|
1228 | 1230 | self.WIDTHPROF = 120 |
|
1229 | 1231 | self.HEIGHTPROF = 0 |
|
1230 |
self.counter |
|
|
1232 | self.counter_imagwr = 0 | |
|
1231 | 1233 | self.xdata = None |
|
1232 | 1234 | self.ydata = None |
|
1233 | 1235 | |
@@ -1238,7 +1240,7 class RTIfromSpectraHeis(Figure): | |||
|
1238 | 1240 | |
|
1239 | 1241 | return nrow, ncol |
|
1240 | 1242 | |
|
1241 |
def setup(self, id |
|
|
1243 | def setup(self, id, nplots, wintitle, showprofile=True, show=True): | |
|
1242 | 1244 | |
|
1243 | 1245 | self.__showprofile = showprofile |
|
1244 | 1246 | self.nplots = nplots |
@@ -1247,7 +1249,7 class RTIfromSpectraHeis(Figure): | |||
|
1247 | 1249 | colspan = 6 |
|
1248 | 1250 | self.__nsubplots = 2 |
|
1249 | 1251 | |
|
1250 |
self.createFigure(id |
|
|
1252 | self.createFigure(id = id, | |
|
1251 | 1253 | wintitle = wintitle, |
|
1252 | 1254 | widthplot = self.WIDTH+self.WIDTHPROF, |
|
1253 | 1255 | heightplot = self.HEIGHT+self.HEIGHTPROF, |
@@ -1258,10 +1260,10 class RTIfromSpectraHeis(Figure): | |||
|
1258 | 1260 | self.addAxes(nrow, ncol*ncolspan, 0, 0, colspan, 1) |
|
1259 | 1261 | |
|
1260 | 1262 | |
|
1261 |
def run(self, dataOut, id |
|
|
1263 | def run(self, dataOut, id, wintitle="", channelList=None, showprofile='True', | |
|
1262 | 1264 | xmin=None, xmax=None, ymin=None, ymax=None, |
|
1263 | 1265 | timerange=None, |
|
1264 |
save=False, figpath='./', figfile=None, ftp=False, |
|
|
1266 | save=False, figpath='./', figfile=None, ftp=False, res_imagwr=1, show=True): | |
|
1265 | 1267 | |
|
1266 | 1268 | if channelList == None: |
|
1267 | 1269 | channelIndexList = dataOut.channelIndexList |
@@ -1300,7 +1302,7 class RTIfromSpectraHeis(Figure): | |||
|
1300 | 1302 | |
|
1301 | 1303 | nplots = 1 |
|
1302 | 1304 | |
|
1303 |
self.setup(id |
|
|
1305 | self.setup(id=id, | |
|
1304 | 1306 | nplots=nplots, |
|
1305 | 1307 | wintitle=wintitle, |
|
1306 | 1308 | showprofile=showprofile, |
@@ -1348,11 +1350,11 class RTIfromSpectraHeis(Figure): | |||
|
1348 | 1350 | |
|
1349 | 1351 | self.saveFigure(figpath, figfile) |
|
1350 | 1352 | |
|
1351 |
self.counter |
|
|
1352 |
if (ftp and (self.counter |
|
|
1353 | self.counter_imagwr += 1 | |
|
1354 | if (ftp and (self.counter_imagwr==res_imagwr)): | |
|
1353 | 1355 | figfilename = os.path.join(figpath,figfile) |
|
1354 | 1356 | self.sendByFTP(figfilename) |
|
1355 |
self.counter |
|
|
1357 | self.counter_imagwr = 0 | |
|
1356 | 1358 | |
|
1357 | 1359 | if x[1] + (x[1]-x[0]) >= self.axesList[0].xmax: |
|
1358 | 1360 | self.__isConfig = False |
General Comments 0
You need to be logged in to leave comments.
Login now