##// END OF EJS Templates
merge voltage ftp
José Chávez -
r1037:2fe9a199ea60
parent child
Show More
@@ -180,17 +180,10 class VoltageReader(JRODataReader, ProcessingUnit):
180 180
181 181 def getBlockDimension(self):
182 182 """
183 <<<<<<< HEAD
184 Obtiene la cantidad de puntos a leer por cada bloque de datos
185
186 Affected:
187 self.blocksize
188 =======
189 183 Obtiene la cantidad de puntos a leer por cada bloque de datos
190 184
191 185 Affected:
192 186 self.blocksize
193 >>>>>>> online_data_hour
194 187
195 188 Return:
196 189 None
@@ -202,28 +195,6 class VoltageReader(JRODataReader, ProcessingUnit):
202 195
203 196 def readBlock(self):
204 197 """
205 <<<<<<< HEAD
206 readBlock lee el bloque de datos desde la posicion actual del puntero del archivo
207 (self.fp) y actualiza todos los parametros relacionados al bloque de datos
208 (metadata + data). La data leida es almacenada en el buffer y el contador del buffer
209 es seteado a 0
210
211 Inputs:
212 None
213
214 Return:
215 None
216
217 Affected:
218 self.profileIndex
219 self.datablock
220 self.flagIsNewFile
221 self.flagIsNewBlock
222 self.nTotalBlocks
223
224 Exceptions:
225 Si un bloque leido no es un bloque valido
226 =======
227 198 readBlock lee el bloque de datos desde la posicion actual del puntero del archivo
228 199 (self.fp) y actualiza todos los parametros relacionados al bloque de datos
229 200 (metadata + data). La data leida es almacenada en el buffer y el contador del buffer
@@ -244,7 +215,6 class VoltageReader(JRODataReader, ProcessingUnit):
244 215
245 216 Exceptions:
246 217 Si un bloque leido no es un bloque valido
247 >>>>>>> online_data_hour
248 218 """
249 219
250 220 # if self.server is not None:
@@ -438,41 +408,6 class VoltageReader(JRODataReader, ProcessingUnit):
438 408
439 409 def getData(self):
440 410 """
441 <<<<<<< HEAD
442 getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut
443 del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos
444 en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando
445 "readNextBlock"
446
447 Ademas incrementa el contador del buffer "self.profileIndex" en 1.
448
449 Return:
450
451 Si el flag self.getByBlock ha sido seteado el bloque completo es copiado a self.dataOut y el self.profileIndex
452 es igual al total de perfiles leidos desde el archivo.
453
454 Si self.getByBlock == False:
455
456 self.dataOut.data = buffer[:, thisProfile, :]
457
458 shape = [nChannels, nHeis]
459
460 Si self.getByBlock == True:
461
462 self.dataOut.data = buffer[:, :, :]
463
464 shape = [nChannels, nProfiles, nHeis]
465
466 Variables afectadas:
467 self.dataOut
468 self.profileIndex
469
470 Affected:
471 self.dataOut
472 self.profileIndex
473 self.flagDiscontinuousBlock
474 self.flagIsNewBlock
475 =======
476 411 getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut
477 412 del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos
478 413 en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando
@@ -506,7 +441,6 class VoltageReader(JRODataReader, ProcessingUnit):
506 441 self.profileIndex
507 442 self.flagDiscontinuousBlock
508 443 self.flagIsNewBlock
509 >>>>>>> online_data_hour
510 444 """
511 445 if self.flagNoMoreFiles:
512 446 self.dataOut.flagNoData = True
@@ -528,36 +462,16 class VoltageReader(JRODataReader, ProcessingUnit):
528 462 if not self.getByBlock:
529 463
530 464 """
531 <<<<<<< HEAD
532 Return profile by profile
533
534 If nTxs > 1 then one profile is divided by nTxs and number of total
535 blocks is increased by nTxs (nProfiles *= nTxs)
536 =======
537 465 Return profile by profile
538 466
539 467 If nTxs > 1 then one profile is divided by nTxs and number of total
540 468 blocks is increased by nTxs (nProfiles *= nTxs)
541 >>>>>>> online_data_hour
542 469 """
543 470 self.dataOut.flagDataAsBlock = False
544 471 self.dataOut.data = self.datablock[:,self.profileIndex,:]
545 472 self.dataOut.profileIndex = self.profileIndex
546 473
547 474 self.profileIndex += 1
548 <<<<<<< HEAD
549
550 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
551 # """
552 # Return all block
553 # """
554 # self.dataOut.flagDataAsBlock = True
555 # self.dataOut.data = self.datablock
556 # self.dataOut.profileIndex = self.dataOut.nProfiles - 1
557 #
558 # self.profileIndex = self.dataOut.nProfiles
559
560 =======
561 475
562 476 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
563 477 # """
@@ -569,7 +483,6 class VoltageReader(JRODataReader, ProcessingUnit):
569 483 #
570 484 # self.profileIndex = self.dataOut.nProfiles
571 485
572 >>>>>>> online_data_hour
573 486 else:
574 487 """
575 488 Return a block
@@ -166,21 +166,12 class Remote(Thread):
166 166 return 0
167 167
168 168 self.mutex.acquire()
169 <<<<<<< HEAD
170 169 # init = time.time()
171 170 #
172 171 # while(self.bussy):
173 172 # sleep(0.1)
174 173 # if time.time() - init > 2*self.period:
175 174 # return 0
176 =======
177 # init = time.time()
178 #
179 # while(self.bussy):
180 # sleep(0.1)
181 # if time.time() - init > 2*self.period:
182 # return 0
183 >>>>>>> online_data_hour
184 175
185 176 self.fileList = fileList
186 177 self.mutex.release()
@@ -205,11 +196,7 class Remote(Thread):
205 196 if self.stopFlag:
206 197 break
207 198
208 <<<<<<< HEAD
209 199 # self.bussy = True
210 =======
211 # self.bussy = True
212 >>>>>>> online_data_hour
213 200 self.mutex.acquire()
214 201
215 202 print "[Remote Server] Opening %s" %self.__server
General Comments 0
You need to be logged in to leave comments. Login now