1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
@@ -0,0 +1,1 | |||||
|
1 | =: ERROR: cannot open `=' (No such file or directory) |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
@@ -86,6 +86,9 class PlotData(Operation, Process): | |||||
86 |
|
86 | |||
87 | print 'plotting...{}'.format(self.CODE) |
|
87 | print 'plotting...{}'.format(self.CODE) | |
88 |
|
88 | |||
|
89 | if self.show: | |||
|
90 | self.figure.show() | |||
|
91 | ||||
89 | self.plot() |
|
92 | self.plot() | |
90 | self.figure.suptitle('{} {} - Date:{}'.format(self.title, self.CODE.upper(), |
|
93 | self.figure.suptitle('{} {} - Date:{}'.format(self.title, self.CODE.upper(), | |
91 | datetime.datetime.utcfromtimestamp(self.max_time).strftime('%y/%m/%d %H:%M:%S'))) |
|
94 | datetime.datetime.utcfromtimestamp(self.max_time).strftime('%y/%m/%d %H:%M:%S'))) | |
@@ -184,7 +187,6 class PlotSpectraData(PlotData): | |||||
184 | n += 1 |
|
187 | n += 1 | |
185 |
|
188 | |||
186 | self.figure.subplots_adjust(left=0.1, right=0.95, bottom=0.15, top=0.85, wspace=0.9, hspace=0.5) |
|
189 | self.figure.subplots_adjust(left=0.1, right=0.95, bottom=0.15, top=0.85, wspace=0.9, hspace=0.5) | |
187 | self.figure.show() |
|
|||
188 |
|
190 | |||
189 | def plot(self): |
|
191 | def plot(self): | |
190 |
|
192 | |||
@@ -277,7 +279,6 class PlotRTIData(PlotData): | |||||
277 | ax.firsttime = True |
|
279 | ax.firsttime = True | |
278 | self.axes.append(ax) |
|
280 | self.axes.append(ax) | |
279 | self.figure.subplots_adjust(hspace=0.5) |
|
281 | self.figure.subplots_adjust(hspace=0.5) | |
280 | self.figure.show() |
|
|||
281 |
|
282 | |||
282 | def plot(self): |
|
283 | def plot(self): | |
283 |
|
284 | |||
@@ -367,7 +368,6 class PlotCOHData(PlotRTIData): | |||||
367 | self.axes.append(ax) |
|
368 | self.axes.append(ax) | |
368 |
|
369 | |||
369 | self.figure.subplots_adjust(hspace=0.5) |
|
370 | self.figure.subplots_adjust(hspace=0.5) | |
370 | self.figure.show() |
|
|||
371 |
|
371 | |||
372 | class PlotNoiseData(PlotData): |
|
372 | class PlotNoiseData(PlotData): | |
373 | CODE = 'noise' |
|
373 | CODE = 'noise' | |
@@ -392,8 +392,6 class PlotNoiseData(PlotData): | |||||
392 | self.ax = self.figure.add_subplot(self.nrows, self.ncols, 1) |
|
392 | self.ax = self.figure.add_subplot(self.nrows, self.ncols, 1) | |
393 | self.ax.firsttime = True |
|
393 | self.ax.firsttime = True | |
394 |
|
394 | |||
395 | self.figure.show() |
|
|||
396 |
|
||||
397 | def plot(self): |
|
395 | def plot(self): | |
398 |
|
396 | |||
399 | x = self.times |
|
397 | x = self.times |
@@ -31,7 +31,9 def roundFloats(obj): | |||||
31 |
|
31 | |||
32 | def decimate(z): |
|
32 | def decimate(z): | |
33 | # dx = int(len(self.x)/self.__MAXNUMX) + 1 |
|
33 | # dx = int(len(self.x)/self.__MAXNUMX) + 1 | |
|
34 | ||||
34 | dy = int(len(z[0])/MAXNUMY) + 1 |
|
35 | dy = int(len(z[0])/MAXNUMY) + 1 | |
|
36 | ||||
35 | return z[::, ::dy] |
|
37 | return z[::, ::dy] | |
36 |
|
38 | |||
37 | class throttle(object): |
|
39 | class throttle(object): | |
@@ -148,8 +150,6 class PublishData(Operation): | |||||
148 | self.zmq_socket.connect(address) |
|
150 | self.zmq_socket.connect(address) | |
149 | time.sleep(1) |
|
151 | time.sleep(1) | |
150 |
|
152 | |||
151 |
|
||||
152 |
|
||||
153 | def publish_data(self): |
|
153 | def publish_data(self): | |
154 | self.dataOut.finished = False |
|
154 | self.dataOut.finished = False | |
155 | if self.mqtt is 1: |
|
155 | if self.mqtt is 1: | |
@@ -354,10 +354,19 class ReceiverData(ProcessingUnit, Process): | |||||
354 | if plottype == 'phase': |
|
354 | if plottype == 'phase': | |
355 | self.data[plottype][t] = self.dataOut.getCoherence(phase=True) |
|
355 | self.data[plottype][t] = self.dataOut.getCoherence(phase=True) | |
356 | if self.realtime: |
|
356 | if self.realtime: | |
|
357 | <<<<<<< HEAD | |||
357 | self.data_web[plottype] = roundFloats(decimate(self.data[plottype][t]).tolist()) |
|
358 | self.data_web[plottype] = roundFloats(decimate(self.data[plottype][t]).tolist()) | |
358 | self.data_web['timestamp'] = t |
|
359 | self.data_web['timestamp'] = t | |
|
360 | ======= | |||
|
361 | if plottype == 'spc': | |||
|
362 | self.data_web[plottype] = roundFloats(decimate(self.data[plottype]).tolist()) | |||
|
363 | else: | |||
|
364 | self.data_web[plottype] = roundFloats(decimate(self.data[plottype][t]).tolist()) | |||
|
365 | self.data_web['time'] = t | |||
|
366 | >>>>>>> f65929d2cf32d4dddb2d5fa2a72f3970d4d51812 | |||
359 | self.data_web['interval'] = self.dataOut.getTimeInterval() |
|
367 | self.data_web['interval'] = self.dataOut.getTimeInterval() | |
360 | self.data_web['type'] = plottype |
|
368 | self.data_web['type'] = plottype | |
|
369 | ||||
361 | def run(self): |
|
370 | def run(self): | |
362 |
|
371 | |||
363 | print '[Starting] {} from {}'.format(self.name, self.address) |
|
372 | print '[Starting] {} from {}'.format(self.name, self.address) | |
@@ -406,15 +415,18 class ReceiverData(ProcessingUnit, Process): | |||||
406 | context = zmq.Context() |
|
415 | context = zmq.Context() | |
407 | sender_web_config = context.socket(zmq.PUB) |
|
416 | sender_web_config = context.socket(zmq.PUB) | |
408 | if 'tcp://' in self.plot_address: |
|
417 | if 'tcp://' in self.plot_address: | |
409 | print self.plot_address |
|
|||
410 | dum, address, port = self.plot_address.split(':') |
|
418 | dum, address, port = self.plot_address.split(':') | |
411 | conf_address = '{}:{}:{}'.format(dum, address, int(port)+1) |
|
419 | conf_address = '{}:{}:{}'.format(dum, address, int(port)+1) | |
412 | else: |
|
420 | else: | |
413 | conf_address = self.plot_address + '.config' |
|
421 | conf_address = self.plot_address + '.config' | |
414 | sender_web_config.bind(conf_address) |
|
422 | sender_web_config.bind(conf_address) | |
|
423 | <<<<<<< HEAD | |||
415 |
|
424 | |||
|
425 | ======= | |||
|
426 | time.sleep(1) | |||
|
427 | >>>>>>> f65929d2cf32d4dddb2d5fa2a72f3970d4d51812 | |||
416 | for kwargs in self.operationKwargs.values(): |
|
428 | for kwargs in self.operationKwargs.values(): | |
417 | if 'plot' in kwargs: |
|
429 | if 'plot' in kwargs: | |
|
430 | print '[Sending] Config data to web for {}'.format(kwargs['code'].upper()) | |||
418 | sender_web_config.send_string(json.dumps(kwargs)) |
|
431 | sender_web_config.send_string(json.dumps(kwargs)) | |
419 | print kwargs |
|
|||
420 | self.isWebConfig = True |
|
432 | self.isWebConfig = True |
General Comments 0
You need to be logged in to leave comments.
Login now