@@ -31,10 +31,6 def multiSchain(child, nProcess=cpu_count(), startDate=None, endDate=None, by_da | |||
|
31 | 31 | cursor = 0 |
|
32 | 32 | nFiles = None |
|
33 | 33 | processes = [] |
|
34 | ||
|
35 | ||
|
36 | ||
|
37 | ||
|
38 | 34 | dt1 = datetime.datetime.strptime(startDate, '%Y/%m/%d') |
|
39 | 35 | dt2 = datetime.datetime.strptime(endDate, '%Y/%m/%d') |
|
40 | 36 | days = (dt2 - dt1).days |
@@ -5,4 +5,3 from jroplot_correlation import * | |||
|
5 | 5 | from jroplot_parameters import * |
|
6 | 6 | from jroplot_data import * |
|
7 | 7 | from jroplotter import * |
|
8 | No newline at end of file |
@@ -5,6 +5,8 import time | |||
|
5 | 5 | import numpy |
|
6 | 6 | import datetime |
|
7 | 7 | import numpy as np |
|
8 | import matplotlib | |
|
9 | matplotlib.use('TkAgg') | |
|
8 | 10 | import matplotlib.pyplot as plt |
|
9 | 11 | from mpl_toolkits.axes_grid1 import make_axes_locatable |
|
10 | 12 | from matplotlib.ticker import FuncFormatter, LinearLocator |
@@ -12,7 +14,7 from multiprocessing import Process | |||
|
12 | 14 | |
|
13 | 15 | from schainpy.model.proc.jroproc_base import Operation |
|
14 | 16 | |
|
15 |
|
|
|
17 | plt.ioff() | |
|
16 | 18 | |
|
17 | 19 | func = lambda x, pos: ('%s') %(datetime.datetime.fromtimestamp(x).strftime('%H:%M')) |
|
18 | 20 | |
@@ -90,6 +92,7 class PlotData(Operation, Process): | |||
|
90 | 92 | print 'plotting...{}'.format(self.CODE) |
|
91 | 93 | |
|
92 | 94 | if self.show: |
|
95 | print 'showing' | |
|
93 | 96 | self.figure.show() |
|
94 | 97 | |
|
95 | 98 | self.plot() |
@@ -30,9 +30,9 class Plotter(Operation): | |||
|
30 | 30 | name = None |
|
31 | 31 | __queue = None |
|
32 | 32 | |
|
33 | def __init__(self, plotter_name, plotter_queue=None): | |
|
33 | def __init__(self, plotter_name, plotter_queue=None, **kwargs): | |
|
34 | 34 | |
|
35 | Operation.__init__(self) | |
|
35 | Operation.__init__(self, **kwargs) | |
|
36 | 36 | |
|
37 | 37 | self.isConfig = False |
|
38 | 38 | self.name = plotter_name |
@@ -170,7 +170,7 class PlotManager(): | |||
|
170 | 170 | |
|
171 | 171 | if plot_id not in self.plotInstanceDict.keys(): |
|
172 | 172 | className = eval(plot_name) |
|
173 | self.plotInstanceDict[plot_id] = className() | |
|
173 | self.plotInstanceDict[plot_id] = className(**kwargs) | |
|
174 | 174 | |
|
175 | 175 | plotter = self.plotInstanceDict[plot_id] |
|
176 | 176 | try: |
|
1 | NO CONTENT: modified file |
@@ -245,7 +245,7 class PublishData(Operation): | |||
|
245 | 245 | def close(self): |
|
246 | 246 | if self.zeromq is 1: |
|
247 | 247 | self.dataOut.finished = True |
|
248 |
|
|
|
248 | self.zmq_socket.send_pyobj(self.dataOut) | |
|
249 | 249 | |
|
250 | 250 | if self.client: |
|
251 | 251 | self.client.loop_stop() |
@@ -31,8 +31,8 def fiber(cursor, skip, q, dt): | |||
|
31 | 31 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) |
|
32 | 32 | # opObj11 = procUnitConfObj2.addParameter(name='pairsList', value='(0,1)', format='pairslist') |
|
33 | 33 | # |
|
34 |
|
|
|
35 |
|
|
|
34 | procUnitConfObj3 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) | |
|
35 | opObj11 = procUnitConfObj3.addOperation(name='SpectralMoments', optype='other') | |
|
36 | 36 | |
|
37 | 37 | # |
|
38 | 38 | # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='other') |
@@ -58,7 +58,7 def fiber(cursor, skip, q, dt): | |||
|
58 | 58 | # opObj11.addParameter(name='save', value='0', format='int') |
|
59 | 59 | # # opObj11.addParameter(name='figpath', value='/tmp/', format='str') |
|
60 | 60 | # |
|
61 |
opObj12 = procUnitConfObj |
|
|
61 | opObj12 = procUnitConfObj3.addOperation(name='PublishData', optype='other') | |
|
62 | 62 | opObj12.addParameter(name='zeromq', value=1, format='int') |
|
63 | 63 | |
|
64 | 64 |
@@ -16,34 +16,42 if __name__ == '__main__': | |||
|
16 | 16 | |
|
17 | 17 | proc1 = controllerObj.addProcUnit(name='ReceiverData') |
|
18 | 18 | proc1.addParameter(name='realtime', value='0', format='bool') |
|
19 | proc1.addParameter(name='plottypes', value='rti', format='str') | |
|
20 |
|
|
|
19 | proc1.addParameter(name='plottypes', value='rti,coh,phase,snr,dop', format='str') | |
|
20 | proc1.addParameter(name='throttle', value='10', format='int') | |
|
21 | 21 | proc1.addParameter(name='plot_server', value='tcp://10.10.10.82:7000', format='str') |
|
22 | 22 | ## TODO Agregar direccion de server de publicacion a graficos como variable |
|
23 | 23 | |
|
24 | 24 | op1 = proc1.addOperation(name='PlotRTIData', optype='other') |
|
25 | 25 | op1.addParameter(name='wintitle', value='Julia 150Km', format='str') |
|
26 | 26 | op1.addParameter(name='save', value='/home/nanosat/Pictures', format='str') |
|
27 | op1.addParameter(name='show', value='0', format='bool') | |
|
28 | op1.addParameter(name='colormap', value='jet', format='str') | |
|
27 | 29 | # |
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
30 | op2 = proc1.addOperation(name='PlotCOHData', optype='other') | |
|
31 | op2.addParameter(name='wintitle', value='Julia 150Km', format='str') | |
|
32 | op2.addParameter(name='save', value='/home/nanosat/Pictures', format='str') | |
|
33 | op2.addParameter(name='colormap', value='jet', format='str') | |
|
34 | op2.addParameter(name='show', value='0', format='bool') | |
|
31 | 35 | # # |
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
36 | op6 = proc1.addOperation(name='PlotPHASEData', optype='other') | |
|
37 | op6.addParameter(name='wintitle', value='Julia 150Km', format='str') | |
|
38 | op6.addParameter(name='save', value='/home/nanosat/Pictures', format='str') | |
|
39 | op6.addParameter(name='show', value='1', format='bool') | |
|
35 | 40 | # |
|
36 | 41 | # proc2 = controllerObj.addProcUnit(name='ReceiverData') |
|
37 | 42 | # proc2.addParameter(name='server', value='juanca', format='str') |
|
38 | 43 | # proc2.addParameter(name='plottypes', value='snr,dop', format='str') |
|
39 | 44 | # |
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
45 | op3 = proc1.addOperation(name='PlotSNRData', optype='other') | |
|
46 | op3.addParameter(name='wintitle', value='Julia 150Km', format='str') | |
|
47 | op3.addParameter(name='save', value='/home/nanosat/Pictures', format='str') | |
|
48 | op3.addParameter(name='show', value='0', format='bool') | |
|
43 | 49 | # |
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
50 | op4 = proc1.addOperation(name='PlotDOPData', optype='other') | |
|
51 | op4.addParameter(name='wintitle', value='Julia 150Km', format='str') | |
|
52 | op4.addParameter(name='save', value='/home/nanosat/Pictures', format='str') | |
|
53 | op4.addParameter(name='show', value='0', format='bool') | |
|
54 | op4.addParameter(name='colormap', value='jet', format='str') | |
|
47 | 55 | |
|
48 | 56 | |
|
49 | 57 |
@@ -1,1 +1,1 | |||
|
1 | <Project description="Segundo Test" id="191" name="test01"><ProcUnit datatype="ReceiverData" id="1911" inputId="0" name="ReceiverData"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="bool" id="191111" name="realtime" value="1" /><Parameter format="str" id="191112" name="plottypes" value="rti" /><Parameter format="str" id="191113" name="plot_server" value="tcp://10.10.10.82:7000" /></Operation><Operation id="19112" name="PlotRTIData" priority="2" type="other"><Parameter format="str" id="191121" name="wintitle" value="Julia 150Km" /><Parameter format="str" id="191122" name="save" value="/home/nanosat/Pictures" /></Operation></ProcUnit></Project> No newline at end of file | |
|
1 | <Project description="HF_EXAMPLE" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/home/nanosat/data/hysell_data20/pdata" /><Parameter format="date" id="191113" name="startDate" value="2015/09/26" /><Parameter format="date" id="191114" name="endDate" value="2015/09/26" /><Parameter format="time" id="191115" name="startTime" value="00:00:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:59" /><Parameter format="int" id="191118" name="cursor" value="2" /><Parameter format="int" id="191119" name="skip" value="720" /><Parameter format="int" id="191120" name="delay" value="10" /><Parameter format="int" id="191121" name="walk" value="1" /><Parameter format="int" id="191122" name="online" value="0" /></Operation></ReadUnit><ProcUnit datatype="ParametersProc" id="1913" inputId="1911" name="ParametersProc"><Operation id="19131" name="run" priority="1" type="self" /><Operation id="19132" name="SpectralMoments" priority="2" type="other" /><Operation id="19133" name="PublishData" priority="3" type="other"><Parameter format="int" id="191331" name="zeromq" value="1" /><Parameter format="int" id="191332" name="delay" value="1" /></Operation></ProcUnit><ProcUnit datatype="Spectra" id="1912" inputId="1911" name="SpectraProc"><Operation id="19121" name="run" priority="1" type="self" /></ProcUnit></Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now