##// END OF EJS Templates
Bug fixes in meteor module
Julio Valdez -
r811:233aee521375
parent child
Show More
@@ -370,7 +370,7 class ParametersProc(ProcessingUnit):
370 noise_timeStep = 4, noise_multiple = 4,
370 noise_timeStep = 4, noise_multiple = 4,
371 multDet_timeLimit = 1, multDet_rangeLimit = 3,
371 multDet_timeLimit = 1, multDet_rangeLimit = 3,
372 phaseThresh = 20, SNRThresh = 8,
372 phaseThresh = 20, SNRThresh = 8,
373 hmin = 70, hmax=110, azimuth = 0) :
373 hmin = 50, hmax=150, azimuth = 0) :
374
374
375 '''
375 '''
376 Function DetectMeteors()
376 Function DetectMeteors()
@@ -429,9 +429,10 class ParametersProc(ProcessingUnit):
429
429
430 Data Storage:
430 Data Storage:
431 Meteors for Wind Estimation (8):
431 Meteors for Wind Estimation (8):
432 Day Hour | Range Height
432 Utc Time | Range Height
433 Azimuth Zenith errorCosDir
433 Azimuth Zenith errorCosDir
434 VelRad errorVelRad
434 VelRad errorVelRad
435 Phase0 Phase1 Phase2 Phase3
435 TypeError
436 TypeError
436
437
437 '''
438 '''
@@ -443,6 +444,9 class ParametersProc(ProcessingUnit):
443
444
444 heiRang = self.dataOut.getHeiRange()
445 heiRang = self.dataOut.getHeiRange()
445 #Pairs List
446 #Pairs List
447 '''
448 Cambiar este pairslist
449 '''
446 pairslist = []
450 pairslist = []
447 nChannel = self.dataOut.nChannels
451 nChannel = self.dataOut.nChannels
448 for i in range(nChannel):
452 for i in range(nChannel):
@@ -568,7 +572,7 class ParametersProc(ProcessingUnit):
568
572
569 return
573 return
570
574
571 def correctMeteorPhases(self):
575 def CorrectMeteorPhases(self, phaseOffsets, hmin = 50, hmax = 150, azimuth = 45):
572
576
573 arrayParameters = self.dataOut.data_param
577 arrayParameters = self.dataOut.data_param
574 pairsList = []
578 pairsList = []
@@ -576,10 +580,14 class ParametersProc(ProcessingUnit):
576 pairy = (1,2)
580 pairy = (1,2)
577 pairsList.append(pairx)
581 pairsList.append(pairx)
578 pairsList.append(pairy)
582 pairsList.append(pairy)
583 jph = numpy.zeros(4)
584
585 phaseOffsets = numpy.array(phaseOffsets)*numpy.pi/180
586 arrayParameters[:,8:12] = numpy.unwrap(arrayParameters[:,8:12] + phaseOffsets)
579
587
580 meteorOps = MeteorOperations()
588 meteorOps = MeteorOperations()
581 jph = numpy.array([0,0,0,0])
582 h = (hmin,hmax)
589 h = (hmin,hmax)
590
583 arrayParameters = meteorOps.getMeteorParams(arrayParameters, azimuth, h, pairsList, jph)
591 arrayParameters = meteorOps.getMeteorParams(arrayParameters, azimuth, h, pairsList, jph)
584 self.dataOut.data_param = arrayParameters
592 self.dataOut.data_param = arrayParameters
585 return
593 return
@@ -1067,7 +1075,7 class ParametersProc(ProcessingUnit):
1067
1075
1068 #New arrays
1076 #New arrays
1069 arrayMeteors = numpy.array(listMeteors)
1077 arrayMeteors = numpy.array(listMeteors)
1070 arrayParameters = numpy.zeros((len(listMeteors), 14))
1078 arrayParameters = numpy.zeros((len(listMeteors), 13))
1071
1079
1072 #Date inclusion
1080 #Date inclusion
1073 # date = re.findall(r'\((.*?)\)', date)
1081 # date = re.findall(r'\((.*?)\)', date)
@@ -2049,6 +2057,7 class MeteorOperations():
2049 AOAthresh = numpy.pi/8
2057 AOAthresh = numpy.pi/8
2050 error = arrayParameters[:,-1]
2058 error = arrayParameters[:,-1]
2051 phases = -arrayParameters[:,8:12] + jph
2059 phases = -arrayParameters[:,8:12] + jph
2060 # phases = numpy.unwrap(phases)
2052 arrayParameters[:,3:6], arrayParameters[:,-1] = self.__getAOA(phases, pairsList, error, AOAthresh, azimuth)
2061 arrayParameters[:,3:6], arrayParameters[:,-1] = self.__getAOA(phases, pairsList, error, AOAthresh, azimuth)
2053
2062
2054 #Calculate Heights (Error N 13 and 14)
2063 #Calculate Heights (Error N 13 and 14)
@@ -2077,6 +2086,8 class MeteorOperations():
2077 zenithAngle = arrayAOA[:,1]
2086 zenithAngle = arrayAOA[:,1]
2078
2087
2079 #Setting Error
2088 #Setting Error
2089 indError = numpy.where(numpy.logical_or(error == 3, error == 4))[0]
2090 error[indError] = 0
2080 #Number 3: AOA not fesible
2091 #Number 3: AOA not fesible
2081 indInvalid = numpy.where(numpy.logical_and((numpy.logical_or(numpy.isnan(zenithAngle), numpy.isnan(azimuthAngle))),error == 0))[0]
2092 indInvalid = numpy.where(numpy.logical_and((numpy.logical_or(numpy.isnan(zenithAngle), numpy.isnan(azimuthAngle))),error == 0))[0]
2082 error[indInvalid] = 3
2093 error[indInvalid] = 3
@@ -2160,7 +2171,8 class MeteorOperations():
2160 #Setting Error
2171 #Setting Error
2161 #Number 13: Height unresolvable echo: not valid height within 70 to 110 km
2172 #Number 13: Height unresolvable echo: not valid height within 70 to 110 km
2162 #Number 14: Height ambiguous echo: more than one possible height within 70 to 110 km
2173 #Number 14: Height ambiguous echo: more than one possible height within 70 to 110 km
2163
2174 indError = numpy.where(numpy.logical_or(error == 13, error == 14))[0]
2175 error[indError] = 0
2164 indInvalid2 = numpy.where(numpy.logical_and(h_bool > 1, error == 0))[0]
2176 indInvalid2 = numpy.where(numpy.logical_and(h_bool > 1, error == 0))[0]
2165 error[indInvalid2] = 14
2177 error[indInvalid2] = 14
2166 indInvalid1 = numpy.where(numpy.logical_and(h_bool == 0, error == 0))[0]
2178 indInvalid1 = numpy.where(numpy.logical_and(h_bool == 0, error == 0))[0]
General Comments 0
You need to be logged in to leave comments. Login now