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