@@ -64,6 +64,10 class ProcessingUnit(object): | |||||
64 |
|
64 | |||
65 | self.args = args |
|
65 | self.args = args | |
66 | self.kwargs = kwargs |
|
66 | self.kwargs = kwargs | |
|
67 | ||||
|
68 | if not hasattr(self, 'name'): | |||
|
69 | self.name = self.__class__.__name__ | |||
|
70 | ||||
67 | checkKwargs(self.run, kwargs) |
|
71 | checkKwargs(self.run, kwargs) | |
68 |
|
72 | |||
69 | def getAllowedArgs(self): |
|
73 | def getAllowedArgs(self): | |
@@ -309,6 +313,8 class Operation(object): | |||||
309 | self.__buffer = None |
|
313 | self.__buffer = None | |
310 | self.isConfig = False |
|
314 | self.isConfig = False | |
311 | self.kwargs = kwargs |
|
315 | self.kwargs = kwargs | |
|
316 | if not hasattr(self, 'name'): | |||
|
317 | self.name = self.__class__.__name__ | |||
312 | checkKwargs(self.run, kwargs) |
|
318 | checkKwargs(self.run, kwargs) | |
313 |
|
319 | |||
314 | def getAllowedArgs(self): |
|
320 | def getAllowedArgs(self): |
@@ -1408,18 +1408,18 class SpectralMoments(Operation): | |||||
1408 | def __calculateMoments(self, oldspec, oldfreq, n0, |
|
1408 | def __calculateMoments(self, oldspec, oldfreq, n0, | |
1409 | nicoh = None, graph = None, smooth = None, type1 = None, fwindow = None, snrth = None, dc = None, aliasing = None, oldfd = None, wwauto = None): |
|
1409 | nicoh = None, graph = None, smooth = None, type1 = None, fwindow = None, snrth = None, dc = None, aliasing = None, oldfd = None, wwauto = None): | |
1410 |
|
1410 | |||
1411 |
if (nicoh |
|
1411 | if (nicoh is None): nicoh = 1 | |
1412 |
if (graph |
|
1412 | if (graph is None): graph = 0 | |
1413 |
if (smooth |
|
1413 | if (smooth is None): smooth = 0 | |
1414 | elif (self.smooth < 3): smooth = 0 |
|
1414 | elif (self.smooth < 3): smooth = 0 | |
1415 |
|
1415 | |||
1416 |
if (type1 |
|
1416 | if (type1 is None): type1 = 0 | |
1417 |
if (fwindow |
|
1417 | if (fwindow is None): fwindow = numpy.zeros(oldfreq.size) + 1 | |
1418 |
if (snrth |
|
1418 | if (snrth is None): snrth = -3 | |
1419 |
if (dc |
|
1419 | if (dc is None): dc = 0 | |
1420 |
if (aliasing |
|
1420 | if (aliasing is None): aliasing = 0 | |
1421 |
if (oldfd |
|
1421 | if (oldfd is None): oldfd = 0 | |
1422 |
if (wwauto |
|
1422 | if (wwauto is None): wwauto = 0 | |
1423 |
|
1423 | |||
1424 | if (n0 < 1.e-20): n0 = 1.e-20 |
|
1424 | if (n0 < 1.e-20): n0 = 1.e-20 | |
1425 |
|
1425 | |||
@@ -1719,7 +1719,7 class SpectralFitting(Operation): | |||||
1719 | error1 = p0*numpy.nan |
|
1719 | error1 = p0*numpy.nan | |
1720 |
|
1720 | |||
1721 | #Save |
|
1721 | #Save | |
1722 |
if self.dataOut.data_param |
|
1722 | if self.dataOut.data_param is None: | |
1723 | self.dataOut.data_param = numpy.zeros((nGroups, p0.size, nHeights))*numpy.nan |
|
1723 | self.dataOut.data_param = numpy.zeros((nGroups, p0.size, nHeights))*numpy.nan | |
1724 | self.dataOut.data_error = numpy.zeros((nGroups, p0.size + 1, nHeights))*numpy.nan |
|
1724 | self.dataOut.data_error = numpy.zeros((nGroups, p0.size + 1, nHeights))*numpy.nan | |
1725 |
|
1725 | |||
@@ -2382,7 +2382,7 class WindProfiler(Operation): | |||||
2382 |
|
2382 | |||
2383 | self.__isConfig = True |
|
2383 | self.__isConfig = True | |
2384 |
|
2384 | |||
2385 |
if self.__buffer |
|
2385 | if self.__buffer is None: | |
2386 | self.__buffer = dataOut.data_param |
|
2386 | self.__buffer = dataOut.data_param | |
2387 | self.__firstdata = copy.copy(dataOut) |
|
2387 | self.__firstdata = copy.copy(dataOut) | |
2388 |
|
2388 | |||
@@ -2424,7 +2424,7 class WindProfiler(Operation): | |||||
2424 | else: mode = 'SA' |
|
2424 | else: mode = 'SA' | |
2425 |
|
2425 | |||
2426 | #Borrar luego esto |
|
2426 | #Borrar luego esto | |
2427 |
if dataOut.groupList |
|
2427 | if dataOut.groupList is None: | |
2428 | dataOut.groupList = [(0,1),(0,2),(1,2)] |
|
2428 | dataOut.groupList = [(0,1),(0,2),(1,2)] | |
2429 | groupList = dataOut.groupList |
|
2429 | groupList = dataOut.groupList | |
2430 | C = 3e8 |
|
2430 | C = 3e8 | |
@@ -2446,7 +2446,7 class WindProfiler(Operation): | |||||
2446 |
|
2446 | |||
2447 | self.__isConfig = True |
|
2447 | self.__isConfig = True | |
2448 |
|
2448 | |||
2449 |
if self.__buffer |
|
2449 | if self.__buffer is None: | |
2450 | self.__buffer = dataOut.data_param |
|
2450 | self.__buffer = dataOut.data_param | |
2451 | self.__firstdata = copy.copy(dataOut) |
|
2451 | self.__firstdata = copy.copy(dataOut) | |
2452 |
|
2452 | |||
@@ -2808,7 +2808,7 class SMDetection(Operation): | |||||
2808 |
|
2808 | |||
2809 |
|
2809 | |||
2810 | #Getting Pairslist |
|
2810 | #Getting Pairslist | |
2811 |
if channelPositions |
|
2811 | if channelPositions is None: | |
2812 | # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T |
|
2812 | # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T | |
2813 | channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella |
|
2813 | channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella | |
2814 | meteorOps = SMOperations() |
|
2814 | meteorOps = SMOperations() | |
@@ -2939,7 +2939,7 class SMDetection(Operation): | |||||
2939 | # arrayFinal = arrayParameters.reshape((1,arrayParameters.shape[0],arrayParameters.shape[1])) |
|
2939 | # arrayFinal = arrayParameters.reshape((1,arrayParameters.shape[0],arrayParameters.shape[1])) | |
2940 | dataOut.data_param = arrayParameters |
|
2940 | dataOut.data_param = arrayParameters | |
2941 |
|
2941 | |||
2942 |
if arrayParameters |
|
2942 | if arrayParameters is None: | |
2943 | dataOut.flagNoData = True |
|
2943 | dataOut.flagNoData = True | |
2944 | else: |
|
2944 | else: | |
2945 | dataOut.flagNoData = True |
|
2945 | dataOut.flagNoData = True | |
@@ -3475,7 +3475,7 class CorrectSMPhases(Operation): | |||||
3475 | arrayParameters[:,8:12] = numpy.angle(numpy.exp(1j*(arrayParameters[:,8:12] + phaseOffsets))) |
|
3475 | arrayParameters[:,8:12] = numpy.angle(numpy.exp(1j*(arrayParameters[:,8:12] + phaseOffsets))) | |
3476 |
|
3476 | |||
3477 | meteorOps = SMOperations() |
|
3477 | meteorOps = SMOperations() | |
3478 |
if channelPositions |
|
3478 | if channelPositions is None: | |
3479 | # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T |
|
3479 | # channelPositions = [(2.5,0), (0,2.5), (0,0), (0,4.5), (-2,0)] #T | |
3480 | channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella |
|
3480 | channelPositions = [(4.5,2), (2,4.5), (2,2), (2,0), (0,2)] #Estrella | |
3481 |
|
3481 | |||
@@ -3652,7 +3652,7 class SMPhaseCalibration(Operation): | |||||
3652 |
|
3652 | |||
3653 | self.__isConfig = True |
|
3653 | self.__isConfig = True | |
3654 |
|
3654 | |||
3655 |
if self.__buffer |
|
3655 | if self.__buffer is None: | |
3656 | self.__buffer = dataOut.data_param.copy() |
|
3656 | self.__buffer = dataOut.data_param.copy() | |
3657 |
|
3657 | |||
3658 | else: |
|
3658 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now