@@ -0,0 +1,11 | |||||
|
1 | ## ROADMAP | |||
|
2 | ## SCHAIN BRANCHES | |||
|
3 | ||||
|
4 | ### BRANCH - SCHAIN_MP | |||
|
5 | ||||
|
6 | * Revisar si funciona con varios publishers. | |||
|
7 | * Revisar xRange y reinicialización de gráfico. | |||
|
8 | * Grabar cada spectra independientemente. | |||
|
9 | * Agregar kwargs al init | |||
|
10 | * Agregar gráficos restantes | |||
|
11 | * Presentación |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
@@ -1,299 +1,301 | |||||
1 | ''' |
|
1 | ''' | |
2 |
|
2 | |||
3 | $Author: murco $ |
|
3 | $Author: murco $ | |
4 | $Id: jroproc_base.py 1 2012-11-12 18:56:07Z murco $ |
|
4 | $Id: jroproc_base.py 1 2012-11-12 18:56:07Z murco $ | |
5 | ''' |
|
5 | ''' | |
6 |
|
6 | |||
7 | class ProcessingUnit(object): |
|
7 | class ProcessingUnit(object): | |
8 |
|
8 | |||
9 | """ |
|
9 | """ | |
10 | Esta es la clase base para el procesamiento de datos. |
|
10 | Esta es la clase base para el procesamiento de datos. | |
11 |
|
11 | |||
12 | Contiene el metodo "call" para llamar operaciones. Las operaciones pueden ser: |
|
12 | Contiene el metodo "call" para llamar operaciones. Las operaciones pueden ser: | |
13 | - Metodos internos (callMethod) |
|
13 | - Metodos internos (callMethod) | |
14 | - Objetos del tipo Operation (callObject). Antes de ser llamados, estos objetos |
|
14 | - Objetos del tipo Operation (callObject). Antes de ser llamados, estos objetos | |
15 | tienen que ser agreagados con el metodo "add". |
|
15 | tienen que ser agreagados con el metodo "add". | |
16 |
|
16 | |||
17 | """ |
|
17 | """ | |
18 | # objeto de datos de entrada (Voltage, Spectra o Correlation) |
|
18 | # objeto de datos de entrada (Voltage, Spectra o Correlation) | |
19 | dataIn = None |
|
19 | dataIn = None | |
20 | dataInList = [] |
|
20 | dataInList = [] | |
21 |
|
21 | |||
22 | # objeto de datos de entrada (Voltage, Spectra o Correlation) |
|
22 | # objeto de datos de entrada (Voltage, Spectra o Correlation) | |
23 | dataOut = None |
|
23 | dataOut = None | |
24 |
|
24 | |||
25 | operations2RunDict = None |
|
25 | operations2RunDict = None | |
26 |
|
26 | |||
27 | isConfig = False |
|
27 | isConfig = False | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | def __init__(self, *args, **kwargs): |
|
30 | def __init__(self, *args, **kwargs): | |
31 |
|
31 | |||
32 | self.dataIn = None |
|
32 | self.dataIn = None | |
33 | self.dataInList = [] |
|
33 | self.dataInList = [] | |
34 |
|
34 | |||
35 | self.dataOut = None |
|
35 | self.dataOut = None | |
36 |
|
36 | |||
37 | self.operations2RunDict = {} |
|
37 | self.operations2RunDict = {} | |
38 |
|
38 | |||
39 | self.isConfig = False |
|
39 | self.isConfig = False | |
40 |
|
40 | |||
41 | self.args = args |
|
41 | self.args = args | |
|
42 | # if (kwargs): | |||
|
43 | # self.kwargs = kwargs | |||
42 | self.kwargs = kwargs |
|
44 | self.kwargs = kwargs | |
43 |
|
45 | |||
44 | def addOperation(self, opObj, objId): |
|
46 | def addOperation(self, opObj, objId): | |
45 |
|
47 | |||
46 | """ |
|
48 | """ | |
47 | Agrega un objeto del tipo "Operation" (opObj) a la lista de objetos "self.objectList" y retorna el |
|
49 | Agrega un objeto del tipo "Operation" (opObj) a la lista de objetos "self.objectList" y retorna el | |
48 | identificador asociado a este objeto. |
|
50 | identificador asociado a este objeto. | |
49 |
|
51 | |||
50 | Input: |
|
52 | Input: | |
51 |
|
53 | |||
52 | object : objeto de la clase "Operation" |
|
54 | object : objeto de la clase "Operation" | |
53 |
|
55 | |||
54 | Return: |
|
56 | Return: | |
55 |
|
57 | |||
56 | objId : identificador del objeto, necesario para ejecutar la operacion |
|
58 | objId : identificador del objeto, necesario para ejecutar la operacion | |
57 | """ |
|
59 | """ | |
58 |
|
60 | |||
59 | self.operations2RunDict[objId] = opObj |
|
61 | self.operations2RunDict[objId] = opObj | |
60 |
|
62 | |||
61 | return objId |
|
63 | return objId | |
62 |
|
64 | |||
63 | def getOperationObj(self, objId): |
|
65 | def getOperationObj(self, objId): | |
64 |
|
66 | |||
65 | if objId not in self.operations2RunDict.keys(): |
|
67 | if objId not in self.operations2RunDict.keys(): | |
66 | return None |
|
68 | return None | |
67 |
|
69 | |||
68 | return self.operations2RunDict[objId] |
|
70 | return self.operations2RunDict[objId] | |
69 |
|
71 | |||
70 | def operation(self, **kwargs): |
|
72 | def operation(self, **kwargs): | |
71 |
|
73 | |||
72 | """ |
|
74 | """ | |
73 | Operacion directa sobre la data (dataOut.data). Es necesario actualizar los valores de los |
|
75 | Operacion directa sobre la data (dataOut.data). Es necesario actualizar los valores de los | |
74 | atributos del objeto dataOut |
|
76 | atributos del objeto dataOut | |
75 |
|
77 | |||
76 | Input: |
|
78 | Input: | |
77 |
|
79 | |||
78 | **kwargs : Diccionario de argumentos de la funcion a ejecutar |
|
80 | **kwargs : Diccionario de argumentos de la funcion a ejecutar | |
79 | """ |
|
81 | """ | |
80 |
|
82 | |||
81 | raise NotImplementedError |
|
83 | raise NotImplementedError | |
82 |
|
84 | |||
83 | def callMethod(self, name, **kwargs): |
|
85 | def callMethod(self, name, **kwargs): | |
84 |
|
86 | |||
85 | """ |
|
87 | """ | |
86 | Ejecuta el metodo con el nombre "name" y con argumentos **kwargs de la propia clase. |
|
88 | Ejecuta el metodo con el nombre "name" y con argumentos **kwargs de la propia clase. | |
87 |
|
89 | |||
88 | Input: |
|
90 | Input: | |
89 | name : nombre del metodo a ejecutar |
|
91 | name : nombre del metodo a ejecutar | |
90 |
|
92 | |||
91 | **kwargs : diccionario con los nombres y valores de la funcion a ejecutar. |
|
93 | **kwargs : diccionario con los nombres y valores de la funcion a ejecutar. | |
92 |
|
94 | |||
93 | """ |
|
95 | """ | |
94 |
|
96 | |||
95 | #Checking the inputs |
|
97 | #Checking the inputs | |
96 | if name == 'run': |
|
98 | if name == 'run': | |
97 |
|
99 | |||
98 | if not self.checkInputs(): |
|
100 | if not self.checkInputs(): | |
99 | self.dataOut.flagNoData = True |
|
101 | self.dataOut.flagNoData = True | |
100 | return False |
|
102 | return False | |
101 | else: |
|
103 | else: | |
102 | #Si no es un metodo RUN la entrada es la misma dataOut (interna) |
|
104 | #Si no es un metodo RUN la entrada es la misma dataOut (interna) | |
103 | if self.dataOut.isEmpty(): |
|
105 | if self.dataOut.isEmpty(): | |
104 | return False |
|
106 | return False | |
105 |
|
107 | |||
106 | #Getting the pointer to method |
|
108 | #Getting the pointer to method | |
107 | methodToCall = getattr(self, name) |
|
109 | methodToCall = getattr(self, name) | |
108 |
|
110 | |||
109 | #Executing the self method |
|
111 | #Executing the self method | |
110 |
|
112 | |||
111 | if hasattr(self, 'mp'): |
|
113 | if hasattr(self, 'mp'): | |
112 | if self.mp is False: |
|
114 | if self.mp is False: | |
113 | self.mp = True |
|
115 | self.mp = True | |
114 | self.start() |
|
116 | self.start() | |
115 | else: |
|
117 | else: | |
116 | methodToCall(**kwargs) |
|
118 | methodToCall(**kwargs) | |
117 |
|
119 | |||
118 | if self.dataOut is None: |
|
120 | if self.dataOut is None: | |
119 | return False |
|
121 | return False | |
120 |
|
122 | |||
121 | if self.dataOut.isEmpty(): |
|
123 | if self.dataOut.isEmpty(): | |
122 | return False |
|
124 | return False | |
123 |
|
125 | |||
124 | return True |
|
126 | return True | |
125 |
|
127 | |||
126 | def callObject(self, objId): |
|
128 | def callObject(self, objId): | |
127 |
|
129 | |||
128 | """ |
|
130 | """ | |
129 | Ejecuta la operacion asociada al identificador del objeto "objId" |
|
131 | Ejecuta la operacion asociada al identificador del objeto "objId" | |
130 |
|
132 | |||
131 | Input: |
|
133 | Input: | |
132 |
|
134 | |||
133 | objId : identificador del objeto a ejecutar |
|
135 | objId : identificador del objeto a ejecutar | |
134 |
|
136 | |||
135 | **kwargs : diccionario con los nombres y valores de la funcion a ejecutar. |
|
137 | **kwargs : diccionario con los nombres y valores de la funcion a ejecutar. | |
136 |
|
138 | |||
137 | Return: |
|
139 | Return: | |
138 |
|
140 | |||
139 | None |
|
141 | None | |
140 | """ |
|
142 | """ | |
141 |
|
143 | |||
142 | if self.dataOut is not None and self.dataOut.isEmpty(): |
|
144 | if self.dataOut is not None and self.dataOut.isEmpty(): | |
143 | return False |
|
145 | return False | |
144 |
|
146 | |||
145 | externalProcObj = self.operations2RunDict[objId] |
|
147 | externalProcObj = self.operations2RunDict[objId] | |
146 |
|
148 | |||
147 | if hasattr(externalProcObj, 'mp'): |
|
149 | if hasattr(externalProcObj, 'mp'): | |
148 | if externalProcObj.mp is False: |
|
150 | if externalProcObj.mp is False: | |
149 | externalProcObj.mp = True |
|
151 | externalProcObj.mp = True | |
150 | externalProcObj.start() |
|
152 | externalProcObj.start() | |
151 | else: |
|
153 | else: | |
152 | externalProcObj.run(self.dataOut, **externalProcObj.kwargs) |
|
154 | externalProcObj.run(self.dataOut, **externalProcObj.kwargs) | |
153 |
|
155 | |||
154 | return True |
|
156 | return True | |
155 |
|
157 | |||
156 | def call(self, opType, opName=None, opId=None): |
|
158 | def call(self, opType, opName=None, opId=None): | |
157 |
|
159 | |||
158 | """ |
|
160 | """ | |
159 | Return True si ejecuta la operacion interna nombrada "opName" o la operacion externa |
|
161 | Return True si ejecuta la operacion interna nombrada "opName" o la operacion externa | |
160 | identificada con el id "opId"; con los argumentos "**kwargs". |
|
162 | identificada con el id "opId"; con los argumentos "**kwargs". | |
161 |
|
163 | |||
162 | False si la operacion no se ha ejecutado. |
|
164 | False si la operacion no se ha ejecutado. | |
163 |
|
165 | |||
164 | Input: |
|
166 | Input: | |
165 |
|
167 | |||
166 | opType : Puede ser "self" o "external" |
|
168 | opType : Puede ser "self" o "external" | |
167 |
|
169 | |||
168 | Depende del tipo de operacion para llamar a:callMethod or callObject: |
|
170 | Depende del tipo de operacion para llamar a:callMethod or callObject: | |
169 |
|
171 | |||
170 | 1. If opType = "self": Llama a un metodo propio de esta clase: |
|
172 | 1. If opType = "self": Llama a un metodo propio de esta clase: | |
171 |
|
173 | |||
172 | name_method = getattr(self, name) |
|
174 | name_method = getattr(self, name) | |
173 | name_method(**kwargs) |
|
175 | name_method(**kwargs) | |
174 |
|
176 | |||
175 |
|
177 | |||
176 | 2. If opType = "other" o"external": Llama al metodo "run()" de una instancia de la |
|
178 | 2. If opType = "other" o"external": Llama al metodo "run()" de una instancia de la | |
177 | clase "Operation" o de un derivado de ella: |
|
179 | clase "Operation" o de un derivado de ella: | |
178 |
|
180 | |||
179 | instanceName = self.operationList[opId] |
|
181 | instanceName = self.operationList[opId] | |
180 | instanceName.run(**kwargs) |
|
182 | instanceName.run(**kwargs) | |
181 |
|
183 | |||
182 | opName : Si la operacion es interna (opType = 'self'), entonces el "opName" sera |
|
184 | opName : Si la operacion es interna (opType = 'self'), entonces el "opName" sera | |
183 | usada para llamar a un metodo interno de la clase Processing |
|
185 | usada para llamar a un metodo interno de la clase Processing | |
184 |
|
186 | |||
185 | opId : Si la operacion es externa (opType = 'other' o 'external), entonces el |
|
187 | opId : Si la operacion es externa (opType = 'other' o 'external), entonces el | |
186 | "opId" sera usada para llamar al metodo "run" de la clase Operation |
|
188 | "opId" sera usada para llamar al metodo "run" de la clase Operation | |
187 | registrada anteriormente con ese Id |
|
189 | registrada anteriormente con ese Id | |
188 |
|
190 | |||
189 | Exception: |
|
191 | Exception: | |
190 | Este objeto de tipo Operation debe de haber sido agregado antes con el metodo: |
|
192 | Este objeto de tipo Operation debe de haber sido agregado antes con el metodo: | |
191 | "addOperation" e identificado con el valor "opId" = el id de la operacion. |
|
193 | "addOperation" e identificado con el valor "opId" = el id de la operacion. | |
192 | De lo contrario retornara un error del tipo ValueError |
|
194 | De lo contrario retornara un error del tipo ValueError | |
193 |
|
195 | |||
194 | """ |
|
196 | """ | |
195 |
|
197 | |||
196 | if opType == 'self': |
|
198 | if opType == 'self': | |
197 |
|
199 | |||
198 | if not opName: |
|
200 | if not opName: | |
199 | raise ValueError, "opName parameter should be defined" |
|
201 | raise ValueError, "opName parameter should be defined" | |
200 |
|
202 | |||
201 | sts = self.callMethod(opName, **self.kwargs) |
|
203 | sts = self.callMethod(opName, **self.kwargs) | |
202 |
|
204 | |||
203 | elif opType == 'other' or opType == 'external' or opType == 'plotter': |
|
205 | elif opType == 'other' or opType == 'external' or opType == 'plotter': | |
204 |
|
206 | |||
205 | if not opId: |
|
207 | if not opId: | |
206 | raise ValueError, "opId parameter should be defined" |
|
208 | raise ValueError, "opId parameter should be defined" | |
207 |
|
209 | |||
208 | if opId not in self.operations2RunDict.keys(): |
|
210 | if opId not in self.operations2RunDict.keys(): | |
209 | raise ValueError, "Any operation with id=%s has been added" %str(opId) |
|
211 | raise ValueError, "Any operation with id=%s has been added" %str(opId) | |
210 |
|
212 | |||
211 | sts = self.callObject(opId) |
|
213 | sts = self.callObject(opId) | |
212 |
|
214 | |||
213 | else: |
|
215 | else: | |
214 | raise ValueError, "opType should be 'self', 'external' or 'plotter'; and not '%s'" %opType |
|
216 | raise ValueError, "opType should be 'self', 'external' or 'plotter'; and not '%s'" %opType | |
215 |
|
217 | |||
216 | return sts |
|
218 | return sts | |
217 |
|
219 | |||
218 | def setInput(self, dataIn): |
|
220 | def setInput(self, dataIn): | |
219 |
|
221 | |||
220 | self.dataIn = dataIn |
|
222 | self.dataIn = dataIn | |
221 | self.dataInList.append(dataIn) |
|
223 | self.dataInList.append(dataIn) | |
222 |
|
224 | |||
223 | def getOutputObj(self): |
|
225 | def getOutputObj(self): | |
224 |
|
226 | |||
225 | return self.dataOut |
|
227 | return self.dataOut | |
226 |
|
228 | |||
227 | def checkInputs(self): |
|
229 | def checkInputs(self): | |
228 |
|
230 | |||
229 | for thisDataIn in self.dataInList: |
|
231 | for thisDataIn in self.dataInList: | |
230 |
|
232 | |||
231 | if thisDataIn.isEmpty(): |
|
233 | if thisDataIn.isEmpty(): | |
232 | return False |
|
234 | return False | |
233 |
|
235 | |||
234 | return True |
|
236 | return True | |
235 |
|
237 | |||
236 | def setup(self): |
|
238 | def setup(self): | |
237 |
|
239 | |||
238 | raise NotImplementedError |
|
240 | raise NotImplementedError | |
239 |
|
241 | |||
240 | def run(self): |
|
242 | def run(self): | |
241 |
|
243 | |||
242 | raise NotImplementedError |
|
244 | raise NotImplementedError | |
243 |
|
245 | |||
244 | def close(self): |
|
246 | def close(self): | |
245 | #Close every thread, queue or any other object here is it is neccesary. |
|
247 | #Close every thread, queue or any other object here is it is neccesary. | |
246 | return |
|
248 | return | |
247 |
|
249 | |||
248 | class Operation(object): |
|
250 | class Operation(object): | |
249 |
|
251 | |||
250 | """ |
|
252 | """ | |
251 | Clase base para definir las operaciones adicionales que se pueden agregar a la clase ProcessingUnit |
|
253 | Clase base para definir las operaciones adicionales que se pueden agregar a la clase ProcessingUnit | |
252 | y necesiten acumular informacion previa de los datos a procesar. De preferencia usar un buffer de |
|
254 | y necesiten acumular informacion previa de los datos a procesar. De preferencia usar un buffer de | |
253 | acumulacion dentro de esta clase |
|
255 | acumulacion dentro de esta clase | |
254 |
|
256 | |||
255 | Ejemplo: Integraciones coherentes, necesita la informacion previa de los n perfiles anteriores (bufffer) |
|
257 | Ejemplo: Integraciones coherentes, necesita la informacion previa de los n perfiles anteriores (bufffer) | |
256 |
|
258 | |||
257 | """ |
|
259 | """ | |
258 |
|
260 | |||
259 | __buffer = None |
|
261 | __buffer = None | |
260 | isConfig = False |
|
262 | isConfig = False | |
261 |
|
263 | |||
262 | def __init__(self, **kwargs): |
|
264 | def __init__(self, **kwargs): | |
263 |
|
265 | |||
264 | self.__buffer = None |
|
266 | self.__buffer = None | |
265 | self.isConfig = False |
|
267 | self.isConfig = False | |
266 | self.kwargs = kwargs |
|
268 | self.kwargs = kwargs | |
267 |
|
269 | |||
268 | def setup(self): |
|
270 | def setup(self): | |
269 |
|
271 | |||
270 | self.isConfig = True |
|
272 | self.isConfig = True | |
271 |
|
273 | |||
272 | raise NotImplementedError |
|
274 | raise NotImplementedError | |
273 |
|
275 | |||
274 | def run(self, dataIn, **kwargs): |
|
276 | def run(self, dataIn, **kwargs): | |
275 |
|
277 | |||
276 | """ |
|
278 | """ | |
277 | Realiza las operaciones necesarias sobre la dataIn.data y actualiza los |
|
279 | Realiza las operaciones necesarias sobre la dataIn.data y actualiza los | |
278 | atributos del objeto dataIn. |
|
280 | atributos del objeto dataIn. | |
279 |
|
281 | |||
280 | Input: |
|
282 | Input: | |
281 |
|
283 | |||
282 | dataIn : objeto del tipo JROData |
|
284 | dataIn : objeto del tipo JROData | |
283 |
|
285 | |||
284 | Return: |
|
286 | Return: | |
285 |
|
287 | |||
286 | None |
|
288 | None | |
287 |
|
289 | |||
288 | Affected: |
|
290 | Affected: | |
289 | __buffer : buffer de recepcion de datos. |
|
291 | __buffer : buffer de recepcion de datos. | |
290 |
|
292 | |||
291 | """ |
|
293 | """ | |
292 | if not self.isConfig: |
|
294 | if not self.isConfig: | |
293 | self.setup(**kwargs) |
|
295 | self.setup(**kwargs) | |
294 |
|
296 | |||
295 | raise NotImplementedError |
|
297 | raise NotImplementedError | |
296 |
|
298 | |||
297 | def close(self): |
|
299 | def close(self): | |
298 |
|
300 | |||
299 | pass |
|
301 | pass |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
@@ -1,77 +1,75 | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | ''' |
|
2 | ''' | |
3 | Created on Jul 7, 2014 |
|
3 | Created on Jul 7, 2014 | |
4 |
|
4 | |||
5 | @author: roj-idl71 |
|
5 | @author: roj-idl71 | |
6 | ''' |
|
6 | ''' | |
7 | import os, sys |
|
7 | import os, sys | |
8 | from datetime import datetime, timedelta |
|
8 | from datetime import datetime, timedelta | |
9 | import multiprocessing |
|
9 | import multiprocessing | |
10 | from schainpy.controller import Project |
|
10 | from schainpy.controller import Project | |
11 |
|
11 | |||
12 | def main(date): |
|
12 | def main(date): | |
13 |
|
13 | |||
14 | controllerObj = Project() |
|
14 | controllerObj = Project() | |
15 |
|
15 | |||
16 |
controllerObj.setup(id |
|
16 | controllerObj.setup(id='191', name='test01', description='') | |
17 |
|
17 | |||
18 | readUnitConfObj = controllerObj.addReadUnit(datatype='Spectra', |
|
18 | readUnitConfObj = controllerObj.addReadUnit(datatype='Spectra', | |
19 |
path='/ |
|
19 | path='/home/nanosat/data/zeus', | |
20 | startDate=date, |
|
20 | startDate=date, | |
21 | endDate=date, |
|
21 | endDate=date, | |
22 | startTime='00:00:00', |
|
22 | startTime='00:00:00', | |
23 | endTime='23:59:59', |
|
23 | endTime='23:59:59', | |
24 | online=0, |
|
24 | online=0, | |
25 | walk=1, |
|
25 | walk=1, | |
26 | expLabel='') |
|
26 | expLabel='') | |
27 |
|
27 | |||
28 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) |
|
28 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) | |
29 | #opObj11 = procUnitConfObj1.addOperation(name='removeDC') |
|
29 | #opObj11 = procUnitConfObj1.addOperation(name='removeDC') | |
30 | #opObj11.addParameter(name='mode', value='1', format='int') |
|
30 | #opObj11.addParameter(name='mode', value='1', format='int') | |
31 |
|
31 | |||
32 | #opObj11 = procUnitConfObj1.addOperation(name='removeInterference') |
|
32 | #opObj11 = procUnitConfObj1.addOperation(name='removeInterference') | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | # opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') |
|
35 | # opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') | |
36 | # opObj11.addParameter(name='id', value='10', format='int') |
|
36 | # opObj11.addParameter(name='id', value='10', format='int') | |
37 | # opObj11.addParameter(name='wintitle', value='150Km', format='str') |
|
37 | # opObj11.addParameter(name='wintitle', value='150Km', format='str') | |
38 | # opObj11.addParameter(name='colormap', value='jro', format='str') |
|
38 | # opObj11.addParameter(name='colormap', value='jro', format='str') | |
39 | # opObj11.addParameter(name='xaxis', value='time', format='str') |
|
39 | # opObj11.addParameter(name='xaxis', value='time', format='str') | |
40 | # opObj11.addParameter(name='xmin', value='0', format='int') |
|
40 | # opObj11.addParameter(name='xmin', value='0', format='int') | |
41 | # opObj11.addParameter(name='xmax', value='23', format='int') |
|
41 | # opObj11.addParameter(name='xmax', value='23', format='int') | |
42 | # #opObj11.addParameter(name='ymin', value='100', format='int') |
|
42 | # #opObj11.addParameter(name='ymin', value='100', format='int') | |
43 | # #opObj11.addParameter(name='ymax', value='150', format='int') |
|
43 | # #opObj11.addParameter(name='ymax', value='150', format='int') | |
44 | # opObj11.addParameter(name='zmin', value='10', format='int') |
|
44 | # opObj11.addParameter(name='zmin', value='10', format='int') | |
45 | # opObj11.addParameter(name='zmax', value='35', format='int') |
|
45 | # opObj11.addParameter(name='zmax', value='35', format='int') | |
46 |
|
46 | |||
47 |
|
47 | |||
48 |
|
48 | |||
49 |
|
49 | |||
50 | opObj11 = procUnitConfObj1.addOperation(name='PlotRTIData', optype='other') |
|
50 | opObj11 = procUnitConfObj1.addOperation(name='PlotRTIData', optype='other') | |
51 | opObj11.addParameter(name='id', value='12', format='int') |
|
51 | opObj11.addParameter(name='id', value='12', format='int') | |
52 | opObj11.addParameter(name='wintitle', value='150Km', format='str') |
|
52 | opObj11.addParameter(name='wintitle', value='150Km', format='str') | |
53 | opObj11.addParameter(name='colormap', value='jro', format='str') |
|
53 | opObj11.addParameter(name='colormap', value='jro', format='str') | |
54 | opObj11.addParameter(name='xaxis', value='time', format='str') |
|
54 | opObj11.addParameter(name='xaxis', value='time', format='str') | |
55 | opObj11.addParameter(name='xmin', value='0', format='int') |
|
55 | opObj11.addParameter(name='xmin', value='0', format='int') | |
56 | opObj11.addParameter(name='xmax', value='23', format='int') |
|
56 | opObj11.addParameter(name='xmax', value='23', format='int') | |
57 | #opObj11.addParameter(name='ymin', value='100', format='int') |
|
57 | #opObj11.addParameter(name='ymin', value='100', format='int') | |
58 | #opObj11.addParameter(name='ymax', value='150', format='int') |
|
58 | #opObj11.addParameter(name='ymax', value='150', format='int') | |
59 | opObj11.addParameter(name='zmin', value='10', format='int') |
|
59 | opObj11.addParameter(name='zmin', value='10', format='int') | |
60 | opObj11.addParameter(name='zmax', value='35', format='int') |
|
60 | opObj11.addParameter(name='zmax', value='35', format='int') | |
61 | #opObj11.addParameter(name='pause', value='1', format='bool') |
|
61 | #opObj11.addParameter(name='pause', value='1', format='bool') | |
62 | opObj11.addParameter(name='show', value='0', format='bool') |
|
62 | opObj11.addParameter(name='show', value='0', format='bool') | |
63 | opObj11.addParameter(name='save', value='/tmp', format='str') |
|
63 | opObj11.addParameter(name='save', value='/tmp', format='str') | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | controllerObj.start() |
|
66 | controllerObj.start() | |
67 |
|
67 | |||
68 | if __name__=='__main__': |
|
68 | if __name__=='__main__': | |
69 |
|
69 | |||
70 | dt = datetime(2017, 1, 12) |
|
70 | dt = datetime(2017, 1, 12) | |
71 |
|
71 | |||
72 |
dates = [(dt+timedelta(x)).strftime('%Y/%m/%d') |
|
72 | dates = [(dt+timedelta(x)).strftime('%Y/%m/%d') for x in range(20)] | |
73 |
|
73 | |||
74 | p = multiprocessing.Pool(4) |
|
74 | p = multiprocessing.Pool(4) | |
75 | p.map(main, dates) |
|
75 | p.map(main, dates) | |
76 |
|
||||
77 | No newline at end of file |
|
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now