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