##// END OF EJS Templates
formatting, bug en controller.py
José Chávez -
r1017:934ca8cba82f
parent child
Show More
@@ -10,7 +10,6 import traceback
10 10 import math
11 11 import time
12 12 from multiprocessing import Process, Queue, cpu_count
13 from profilehooks import profile, coverage
14 13
15 14 import schainpy
16 15 import schainpy.admin
@@ -694,7 +693,6 class ProcUnitConf():
694 693
695 694 return procUnitObj
696 695
697 ## @profile
698 696 def run(self):
699 697
700 698 is_ok = False
@@ -713,8 +711,7 class ProcUnitConf():
713 711 #print "\tRunning the '%s' operation with %s" %(opConfObj.name, opConfObj.id)
714 712 sts = self.procUnitObj.call(opType = opConfObj.type,
715 713 opName = opConfObj.name,
716 opId = opConfObj.id,
717 **kwargs)
714 opId = opConfObj.id)
718 715
719 716 # total_time = time.time() - ini
720 717 #
@@ -766,7 +763,6 class ReadUnitConf(ProcUnitConf):
766 763
767 764 def setup(self, id, name, datatype, path='', startDate="", endDate="", startTime="",
768 765 endTime="", parentId=None, queue=None, server=None, **kwargs):
769
770 766 #Compatible with old signal chain version
771 767 if datatype==None and name==None:
772 768 raise ValueError, "datatype or name should be defined"
@@ -987,7 +983,6 class Project():
987 983 self.description = description
988 984
989 985 def addReadUnit(self, id=None, datatype=None, name=None, **kwargs):
990
991 986 if id is None:
992 987 idReadUnit = self.__getNewId()
993 988 else:
@@ -1380,9 +1380,9 class JRODataReader(JRODataIO):
1380 1380
1381 1381 # self.getBasicHeader()
1382 1382
1383 if last_set != None:
1384 self.dataOut.last_block = last_set * self.processingHeaderObj.dataBlocksPerFile + self.basicHeaderObj.dataBlock
1385 return
1383 if last_set != None:
1384 self.dataOut.last_block = last_set * self.processingHeaderObj.dataBlocksPerFile + self.basicHeaderObj.dataBlock
1385 return
1386 1386
1387 1387 def getBasicHeader(self):
1388 1388
@@ -237,7 +237,7 class VoltageReader(JRODataReader, ProcessingUnit):
237 237 if self.waitDataBlock(pointer_location=current_pointer_location):
238 238 junk = numpy.fromfile( self.fp, self.dtype, self.blocksize )
239 239 junk = junk.reshape( (self.processingHeaderObj.profilesPerBlock, self.processingHeaderObj.nHeights, self.systemHeaderObj.nChannels) )
240 # return 0
240 # return 0
241 241
242 242 #Dimensions : nChannels, nProfiles, nSamples
243 243
@@ -267,15 +267,15 class VoltageReader(JRODataReader, ProcessingUnit):
267 267
268 268 #Time interval and code are propierties of dataOut. Its value depends of radarControllerHeaderObj.
269 269
270 # self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt
271 #
272 # if self.radarControllerHeaderObj.code is not None:
273 #
274 # self.dataOut.nCode = self.radarControllerHeaderObj.nCode
275 #
276 # self.dataOut.nBaud = self.radarControllerHeaderObj.nBaud
277 #
278 # self.dataOut.code = self.radarControllerHeaderObj.code
270 # self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt
271 #
272 # if self.radarControllerHeaderObj.code is not None:
273 #
274 # self.dataOut.nCode = self.radarControllerHeaderObj.nCode
275 #
276 # self.dataOut.nBaud = self.radarControllerHeaderObj.nBaud
277 #
278 # self.dataOut.code = self.radarControllerHeaderObj.code
279 279
280 280 self.dataOut.dtype = self.dtype
281 281
@@ -340,8 +340,8 class VoltageReader(JRODataReader, ProcessingUnit):
340 340 self.dtype = datatype_str
341 341 #self.ippSeconds = 2 * 1000 * self.radarControllerHeaderObj.ipp / self.c
342 342 self.fileSizeByHeader = self.processingHeaderObj.dataBlocksPerFile * self.processingHeaderObj.blockSize + self.firstHeaderSize + self.basicHeaderSize*(self.processingHeaderObj.dataBlocksPerFile - 1)
343 # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels)
344 # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels)
343 # self.dataOut.channelList = numpy.arange(self.systemHeaderObj.numChannels)
344 # self.dataOut.channelIndexList = numpy.arange(self.systemHeaderObj.numChannels)
345 345 self.getBlockDimension()
346 346
347 347
@@ -355,7 +355,7 class VoltageReader(JRODataReader, ProcessingUnit):
355 355 self.blockPointer = 0
356 356
357 357 block = self.receiver.recv()
358
358
359 359 self.basicHeaderObj.read(block[self.blockPointer:])
360 360 self.blockPointer += self.basicHeaderObj.length
361 361 self.systemHeaderObj.read(block[self.blockPointer:])
@@ -378,7 +378,7 class VoltageReader(JRODataReader, ProcessingUnit):
378 378 if self.waitDataBlock(pointer_location=current_pointer_location):
379 379 junk = numpy.fromstring( block[self.blockPointer:], self.dtype, self.blocksize )
380 380 junk = junk.reshape( (self.processingHeaderObj.profilesPerBlock, self.processingHeaderObj.nHeights, self.systemHeaderObj.nChannels) )
381 # return 0
381 # return 0
382 382
383 383 #Dimensions : nChannels, nProfiles, nSamples
384 384
@@ -473,15 +473,15 class VoltageReader(JRODataReader, ProcessingUnit):
473 473
474 474 self.profileIndex += 1
475 475
476 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
477 # """
478 # Return all block
479 # """
480 # self.dataOut.flagDataAsBlock = True
481 # self.dataOut.data = self.datablock
482 # self.dataOut.profileIndex = self.dataOut.nProfiles - 1
483 #
484 # self.profileIndex = self.dataOut.nProfiles
476 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
477 # """
478 # Return all block
479 # """
480 # self.dataOut.flagDataAsBlock = True
481 # self.dataOut.data = self.datablock
482 # self.dataOut.profileIndex = self.dataOut.nProfiles - 1
483 #
484 # self.profileIndex = self.dataOut.nProfiles
485 485
486 486 else:
487 487 """
@@ -200,7 +200,6 class ProcessingUnit(object):
200 200 return True
201 201
202 202 def call(self, opType, opName=None, opId=None):
203
204 203 """
205 204 Return True si ejecuta la operacion interna nombrada "opName" o la operacion externa
206 205 identificada con el id "opId"; con los argumentos "**kwargs".
@@ -7,7 +7,7 Created on Jul 16, 2014
7 7
8 8 import numpy
9 9 from setuptools import setup, Extension
10 import numpy
10 from schainpy import __version__
11 11
12 12 setup(name="schainpy",
13 13 version=__version__,
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now