##// END OF EJS Templates
Changes of voltageProc 2to3
George Yong -
r1183:cb5edef78583
parent child
Show More
@@ -136,6 +136,8 class SpectraProc(ProcessingUnit):
136 136
137 137 if self.dataIn.type == "Voltage":
138 138
139 self.dataOut.flagNoData = True
140
139 141 if nFFTPoints == None:
140 142 raise ValueError("This SpectraProc.run() need nFFTPoints input variable")
141 143
@@ -942,8 +944,7 class IncohInt(Operation):
942 944
943 945 dataOut.data_spc = avgdata_spc
944 946 dataOut.data_cspc = avgdata_cspc
945 dataOut.data_dc = avgdata_dc
946
947 dataOut.data_dc = avgdata_dc
947 948 dataOut.nIncohInt *= self.n
948 949 dataOut.utctime = avgdatatime
949 950 dataOut.flagNoData = False
@@ -229,13 +229,13 class VoltageProc(ProcessingUnit):
229 229 """
230 230 Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
231 231 """
232 buffer = self.dataOut.data[:, :, 0:self.dataOut.nHeights-r]
232 buffer = self.dataOut.data[:, :, 0:int(self.dataOut.nHeights-r)]
233 233 buffer = buffer.reshape(self.dataOut.nChannels,self.dataOut.nProfiles,self.dataOut.nHeights/window,window)
234 234 buffer = numpy.sum(buffer,3)
235 235
236 236 else:
237 buffer = self.dataOut.data[:,0:self.dataOut.nHeights-r]
238 buffer = buffer.reshape(self.dataOut.nChannels,self.dataOut.nHeights/window,window)
237 buffer = self.dataOut.data[:,0:int(self.dataOut.nHeights-r)]
238 buffer = buffer.reshape(self.dataOut.nChannels,int(self.dataOut.nHeights/window),int(window))
239 239 buffer = numpy.sum(buffer,2)
240 240
241 241 self.dataOut.data = buffer
@@ -799,7 +799,6 class ProfileConcat(Operation):
799 799 self.start_index = self.start_index + self.nHeights
800 800
801 801 def run(self, dataOut, m):
802
803 802 dataOut.flagNoData = True
804 803
805 804 if not self.isConfig:
@@ -908,7 +907,7 class ProfileSelector(Operation):
908 907 dataOut.profileIndex = dataOut.nProfiles - 1
909 908 dataOut.flagNoData = False
910 909
911 return True
910 return dataOut
912 911
913 912 """
914 913 data dimension = [nChannels, nHeis]
@@ -924,7 +923,7 class ProfileSelector(Operation):
924 923 dataOut.flagNoData = False
925 924
926 925 self.incProfileIndex()
927 return True
926 return dataOut
928 927
929 928 if profileRangeList != None:
930 929
@@ -939,7 +938,7 class ProfileSelector(Operation):
939 938 dataOut.flagNoData = False
940 939
941 940 self.incProfileIndex()
942 return True
941 return dataOut
943 942
944 943 if rangeList != None:
945 944
@@ -967,7 +966,7 class ProfileSelector(Operation):
967 966
968 967 break
969 968
970 return True
969 return dataOut
971 970
972 971
973 972 if beam != None: #beam is only for AMISR data
@@ -977,7 +976,7 class ProfileSelector(Operation):
977 976
978 977 self.incProfileIndex()
979 978
980 return True
979 return dataOut
981 980
982 981 raise ValueError("ProfileSelector needs profileList, profileRangeList or rangeList parameter")
983 982
General Comments 0
You need to be logged in to leave comments. Login now