##// END OF EJS Templates
Bug fixed reading voltage data by block....
Miguel Valdez -
r605:a6d4a56ce242
parent child
Show More
@@ -86,8 +86,6 def hildebrand_sekhon(data, navg):
86 86
87 87 sumq += sortdata[j]**2
88 88
89 j += 1
90
91 89 if j > nums_min:
92 90 rtest = float(j)/(j-1) + 1.0/navg
93 91 if ((sumq*j) > (rtest*sump**2)):
@@ -95,7 +93,9 def hildebrand_sekhon(data, navg):
95 93 sump = sump - sortdata[j]
96 94 sumq = sumq - sortdata[j]**2
97 95 cont = 0
98
96
97 j += 1
98
99 99 lnoise = sump /j
100 100 stdv = numpy.sqrt((sumq - lnoise**2)/(j - 1))
101 101 return lnoise
@@ -344,16 +344,15 class VoltageReader(JRODataReader, ProcessingUnit):
344 344 If nTxs > 1 then one profile is divided by nTxs and number of total
345 345 blocks is increased by nTxs (nProfiles *= nTxs)
346 346 """
347 self.dataOut.flagDataAsBlock = False
348
347 349 if self.nTxs == 1:
348 self.dataOut.flagDataAsBlock = False
349 350 self.dataOut.data = self.datablock[:,self.profileIndex,:]
350 351 self.dataOut.profileIndex = self.profileIndex
351 352
352 353 self.profileIndex += 1
353 354
354 355 else:
355 self.dataOut.flagDataAsBlock = False
356
357 356 iniHei_ForThisTx = (self.txIndex)*int(self.processingHeaderObj.nHeights/self.nTxs)
358 357 endHei_ForThisTx = (self.txIndex+1)*int(self.processingHeaderObj.nHeights/self.nTxs)
359 358
@@ -374,9 +373,9 class VoltageReader(JRODataReader, ProcessingUnit):
374 373 """
375 374 self.dataOut.flagDataAsBlock = True
376 375 self.dataOut.data = self.datablock
377 self.dataOut.profileIndex = self.processingHeaderObj.profilesPerBlock - 1
376 self.dataOut.profileIndex = self.processingHeaderObj.profilesPerBlock
378 377
379 self.profileIndex = self.processingHeaderObj.profilesPerBlock - 1
378 self.profileIndex = self.processingHeaderObj.profilesPerBlock
380 379
381 380 self.dataOut.flagNoData = False
382 381
@@ -626,7 +626,7 class Decoder(Operation):
626 626
627 627 return self.datadecTime
628 628
629 def run(self, dataOut, code=None, nCode=None, nBaud=None, mode = 0, osamp=None):
629 def run(self, dataOut, code=None, nCode=None, nBaud=None, mode = 0, osamp=None, times=None):
630 630
631 631 if not self.isConfig:
632 632
@@ -5,7 +5,7 import datetime
5 5 path = os.path.split(os.getcwd())[0]
6 6 path = os.path.split(path)[0]
7 7
8 sys.path.append(path)
8 sys.path.insert(0, path)
9 9
10 10 from schainpy.controller import Project
11 11
General Comments 0
You need to be logged in to leave comments. Login now