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