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