##// END OF EJS Templates
update readNextUnit y minHei case equal 0
Alexander Valdez -
r1675:d3470f93cd6c
parent child
Show More
1 NO CONTENT: modified file
@@ -63,6 +63,11 class SpectraProc(ProcessingUnit):
63 63 self.dataOut.beam.codeList = self.dataIn.beam.codeList
64 64 self.dataOut.beam.azimuthList = self.dataIn.beam.azimuthList
65 65 self.dataOut.beam.zenithList = self.dataIn.beam.zenithList
66 self.dataOut.runNextUnit = self.dataIn.runNextUnit
67 try:
68 self.dataOut.step = self.dataIn.step
69 except:
70 pass
66 71
67 72 def __getFft(self):
68 73 """
@@ -116,8 +121,9 class SpectraProc(ProcessingUnit):
116 121 self.dataOut.blockSize = blocksize
117 122 self.dataOut.flagShiftFFT = False
118 123
119 def run(self, nProfiles=None, nFFTPoints=None, pairsList=None, ippFactor=None, shift_fft=False):
124 def run(self, nProfiles=None, nFFTPoints=None, pairsList=None, ippFactor=None, shift_fft=False, runNextUnit = 0):
120 125
126 self.dataIn.runNextUnit = runNextUnit
121 127 if self.dataIn.type == "Spectra":
122 128 self.dataOut.copy(self.dataIn)
123 129 if shift_fft:
@@ -5,8 +5,7 from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecora
5 5 from schainpy.model.data.jrodata import Voltage,hildebrand_sekhon
6 6 from schainpy.utils import log
7 7 from time import time
8
9
8 # voltage proc master
10 9
11 10 class VoltageProc(ProcessingUnit):
12 11
@@ -18,13 +17,15 class VoltageProc(ProcessingUnit):
18 17 self.flip = 1
19 18 self.setupReq = False
20 19
21 def run(self):
20 def run(self, runNextUnit = 0):
22 21
23 22 if self.dataIn.type == 'AMISR':
24 23 self.__updateObjFromAmisrInput()
25 24
26 25 if self.dataIn.type == 'Voltage':
27 26 self.dataOut.copy(self.dataIn)
27 self.dataOut.runNextUnit = runNextUnit
28
28 29
29 30 def __updateObjFromAmisrInput(self):
30 31
@@ -164,8 +165,12 class selectHeights(Operation):
164 165
165 166 self.dataOut = dataOut
166 167
167 if minHei and maxHei:
168 if type(minHei) == int or type(minHei) == float:
169 v_minHei= True
170 else:
171 v_minHei= False
168 172
173 if v_minHei and maxHei:
169 174 if (minHei < self.dataOut.heightList[0]):
170 175 minHei = self.dataOut.heightList[0]
171 176
@@ -175,7 +180,6 class selectHeights(Operation):
175 180 minIndex = 0
176 181 maxIndex = 0
177 182 heights = self.dataOut.heightList
178
179 183 inda = numpy.where(heights >= minHei)
180 184 indb = numpy.where(heights <= maxHei)
181 185
@@ -188,7 +192,8 class selectHeights(Operation):
188 192 maxIndex = indb[0][-1]
189 193 except:
190 194 maxIndex = len(heights)
191
195 print(minIndex)
196 print(maxIndex)
192 197 self.selectHeightsByIndex(minIndex, maxIndex)
193 198
194 199 return self.dataOut
@@ -211,6 +216,8 class selectHeights(Operation):
211 216 """
212 217
213 218 if self.dataOut.type == 'Voltage':
219 print(minIndex)
220 print(maxIndex)
214 221 if (minIndex < 0) or (minIndex > maxIndex):
215 222 raise ValueError("Height index range (%d,%d) is not valid" % (minIndex, maxIndex))
216 223
@@ -647,7 +654,6 class CohInt(Operation):
647 654 if not self.isConfig:
648 655 self.setup(n=n, stride=stride, timeInterval=timeInterval, overlapping=overlapping, byblock=byblock, **kwargs)
649 656 self.isConfig = True
650
651 657 if dataOut.flagDataAsBlock:
652 658 """
653 659 Si la data es leida por bloques, dimension = [nChannels, nProfiles, nHeis]
@@ -853,7 +859,6 class Decoder(Operation):
853 859 dataOut.nBaud = self.nBaud
854 860
855 861 dataOut.data = datadec
856
857 862 dataOut.heightList = dataOut.heightList[0:datadec.shape[-1]]
858 863
859 864 dataOut.flagDecodeData = True #asumo q la data esta decodificada
@@ -865,7 +870,6 class Decoder(Operation):
865 870 self.__profIndex += 1
866 871
867 872 return dataOut
868 # dataOut.flagDeflipData = True #asumo q la data no esta sin flip
869 873
870 874
871 875 class ProfileConcat(Operation):
General Comments 0
You need to be logged in to leave comments. Login now