##// END OF EJS Templates
fix floats slices
Juan C. Valdez -
r881:bbc54d7ac773
parent child
Show More
@@ -645,7 +645,7 class ParamWriter(Operation):
645 645 dsDict['variable'] = self.dataList[i]
646 646 #--------------------- Conditionals ------------------------
647 647 #There is no data
648 if dataAux == None:
648 if dataAux is None:
649 649 return 0
650 650
651 651 #Not array, just a number
@@ -898,7 +898,7 class ParamWriter(Operation):
898 898 for j in range(dsInfo['dsNumber']):
899 899 dsInfo = dsList[i]
900 900 tableName = dsInfo['dsName']
901 shape = dsInfo['shape']
901 shape = int(dsInfo['shape'])
902 902
903 903 if dsInfo['nDim'] == 3:
904 904 ds0 = grp0.create_dataset(tableName, (shape[0],shape[1],1) , data = numpy.zeros((shape[0],shape[1],1)), maxshape = (None,shape[1],None), chunks=True)
@@ -160,18 +160,18 class SpectralMoments(Operation):
160 160
161 161 def __calculateMoments(self, oldspec, oldfreq, n0, nicoh = None, graph = None, smooth = None, type1 = None, fwindow = None, snrth = None, dc = None, aliasing = None, oldfd = None, wwauto = None):
162 162
163 if (nicoh == None): nicoh = 1
164 if (graph == None): graph = 0
165 if (smooth == None): smooth = 0
163 if (nicoh is None): nicoh = 1
164 if (graph is None): graph = 0
165 if (smooth is None): smooth = 0
166 166 elif (self.smooth < 3): smooth = 0
167 167
168 if (type1 == None): type1 = 0
169 if (fwindow == None): fwindow = numpy.zeros(oldfreq.size) + 1
170 if (snrth == None): snrth = -3
171 if (dc == None): dc = 0
172 if (aliasing == None): aliasing = 0
173 if (oldfd == None): oldfd = 0
174 if (wwauto == None): wwauto = 0
168 if (type1 is None): type1 = 0
169 if (fwindow is None): fwindow = numpy.zeros(oldfreq.size) + 1
170 if (snrth is None): snrth = -3
171 if (dc is None): dc = 0
172 if (aliasing is None): aliasing = 0
173 if (oldfd is None): oldfd = 0
174 if (wwauto is None): wwauto = 0
175 175
176 176 if (n0 < 1.e-20): n0 = 1.e-20
177 177
@@ -471,7 +471,7 class SpectralFitting(Operation):
471 471 error1 = p0*numpy.nan
472 472
473 473 #Save
474 if self.dataOut.data_param == None:
474 if self.dataOut.data_param is None:
475 475 self.dataOut.data_param = numpy.zeros((nGroups, p0.size, nHeights))*numpy.nan
476 476 self.dataOut.data_error = numpy.zeros((nGroups, p0.size + 1, nHeights))*numpy.nan
477 477
@@ -1117,7 +1117,7 class WindProfiler(Operation):
1117 1117
1118 1118 self.__isConfig = True
1119 1119
1120 if self.__buffer == None:
1120 if self.__buffer is None:
1121 1121 self.__buffer = dataOut.data_param
1122 1122 self.__firstdata = copy.copy(dataOut)
1123 1123
@@ -1155,7 +1155,7 class WindProfiler(Operation):
1155 1155 else: mode = 'SA'
1156 1156
1157 1157 #Borrar luego esto
1158 if dataOut.groupList == None:
1158 if dataOut.groupList is None:
1159 1159 dataOut.groupList = [(0,1),(0,2),(1,2)]
1160 1160 groupList = dataOut.groupList
1161 1161 C = 3e8
@@ -1177,7 +1177,7 class WindProfiler(Operation):
1177 1177
1178 1178 self.__isConfig = True
1179 1179
1180 if self.__buffer == None:
1180 if self.__buffer is None:
1181 1181 self.__buffer = dataOut.data_param
1182 1182 self.__firstdata = copy.copy(dataOut)
1183 1183
@@ -1535,7 +1535,7 class SMDetection(Operation):
1535 1535
1536 1536
1537 1537 #Getting Pairslist
1538 if channelPositions == None:
1538 if channelPositions is None:
1539 1539 # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T
1540 1540 channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella
1541 1541 meteorOps = SMOperations()
@@ -1666,7 +1666,7 class SMDetection(Operation):
1666 1666 # arrayFinal = arrayParameters.reshape((1,arrayParameters.shape[0],arrayParameters.shape[1]))
1667 1667 dataOut.data_param = arrayParameters
1668 1668
1669 if arrayParameters == None:
1669 if arrayParameters is None:
1670 1670 dataOut.flagNoData = True
1671 1671 else:
1672 1672 dataOut.flagNoData = True
@@ -1860,7 +1860,7 class SMDetection(Operation):
1860 1860
1861 1861 if (indDNthresh.size > 0):
1862 1862 indEnd = indDNthresh[0] - 1
1863 indInit = indUPthresh[j]
1863 indInit = indUPthresh[j] if isinstance(indUPthresh[j], (int, float)) else indUPthresh[j][0] ##CHECK!!!!
1864 1864
1865 1865 meteor = powerAux[indInit:indEnd + 1]
1866 1866 indPeak = meteor.argmax() + indInit
@@ -1927,7 +1927,7 class SMDetection(Operation):
1927 1927 timeLag = 45*10**-3
1928 1928 else:
1929 1929 timeLag = 15*10**-3
1930 lag = numpy.ceil(timeLag/timeInterval)
1930 lag = int(numpy.ceil(timeLag/timeInterval))
1931 1931
1932 1932 for i in range(len(listMeteors)):
1933 1933
@@ -1935,10 +1935,10 class SMDetection(Operation):
1935 1935 meteorAux = numpy.zeros(16)
1936 1936
1937 1937 #Loading meteor Data (mHeight, mStart, mPeak, mEnd)
1938 mHeight = listMeteors[i][0]
1939 mStart = listMeteors[i][1]
1940 mPeak = listMeteors[i][2]
1941 mEnd = listMeteors[i][3]
1938 mHeight = int(listMeteors[i][0])
1939 mStart = int(listMeteors[i][1])
1940 mPeak = int(listMeteors[i][2])
1941 mEnd = int(listMeteors[i][3])
1942 1942
1943 1943 #get the volt data between the start and end times of the meteor
1944 1944 meteorVolts = volts[:,mStart:mEnd+1,mHeight]
@@ -2202,7 +2202,7 class CorrectSMPhases(Operation):
2202 2202 arrayParameters[:,8:12] = numpy.angle(numpy.exp(1j*(arrayParameters[:,8:12] + phaseOffsets)))
2203 2203
2204 2204 meteorOps = SMOperations()
2205 if channelPositions == None:
2205 if channelPositions is None:
2206 2206 # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T
2207 2207 channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella
2208 2208
@@ -2365,7 +2365,7 class SMPhaseCalibration(Operation):
2365 2365
2366 2366 self.__isConfig = True
2367 2367
2368 if self.__buffer == None:
2368 if self.__buffer is None:
2369 2369 self.__buffer = dataOut.data_param.copy()
2370 2370
2371 2371 else:
@@ -2385,7 +2385,7 class SMPhaseCalibration(Operation):
2385 2385 h = (hmin, hmax)
2386 2386 pairs = ((0,1),(2,3))
2387 2387
2388 if channelPositions == None:
2388 if channelPositions is None:
2389 2389 # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T
2390 2390 channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella
2391 2391 meteorOps = SMOperations()
General Comments 0
You need to be logged in to leave comments. Login now