@@ -102,6 +102,7 class ParametersProc(ProcessingUnit): | |||||
102 |
|
102 | |||
103 | if self.dataIn.type == "Parameters": |
|
103 | if self.dataIn.type == "Parameters": | |
104 | self.dataOut.copy(self.dataIn) |
|
104 | self.dataOut.copy(self.dataIn) | |
|
105 | self.dataOut.utctimeInit = self.dataIn.utctime | |||
105 | self.dataOut.flagNoData = False |
|
106 | self.dataOut.flagNoData = False | |
106 |
|
107 | |||
107 | return True |
|
108 | return True | |
@@ -809,7 +810,7 class WindProfiler(Operation): | |||||
809 | self.__dataReady = True |
|
810 | self.__dataReady = True | |
810 | return |
|
811 | return | |
811 |
|
812 | |||
812 | def techniqueMeteors(self, arrayMeteor, meteorThresh, heightMin, heightMax): |
|
813 | def techniqueMeteors(self, arrayMeteor, meteorThresh, heightMin, heightMax, binkm=2): | |
813 | ''' |
|
814 | ''' | |
814 | Function that implements winds estimation technique with detected meteors. |
|
815 | Function that implements winds estimation technique with detected meteors. | |
815 |
|
816 | |||
@@ -821,7 +822,7 class WindProfiler(Operation): | |||||
821 | ''' |
|
822 | ''' | |
822 | # print arrayMeteor.shape |
|
823 | # print arrayMeteor.shape | |
823 | #Settings |
|
824 | #Settings | |
824 |
nInt = (heightMax - heightMin)/ |
|
825 | nInt = (heightMax - heightMin)/binkm | |
825 | # print nInt |
|
826 | # print nInt | |
826 | nInt = int(nInt) |
|
827 | nInt = int(nInt) | |
827 | # print nInt |
|
828 | # print nInt | |
@@ -1100,6 +1101,11 class WindProfiler(Operation): | |||||
1100 | if kwargs.has_key('hmax'): |
|
1101 | if kwargs.has_key('hmax'): | |
1101 | hmax = kwargs['hmax'] |
|
1102 | hmax = kwargs['hmax'] | |
1102 | else: hmax = 110 |
|
1103 | else: hmax = 110 | |
|
1104 | ||||
|
1105 | if kwargs.has_key('BinKm'): | |||
|
1106 | binkm = kwargs['BinKm'] | |||
|
1107 | else: | |||
|
1108 | binkm = 2 | |||
1103 |
|
1109 | |||
1104 | dataOut.outputInterval = nHours*3600 |
|
1110 | dataOut.outputInterval = nHours*3600 | |
1105 |
|
1111 | |||
@@ -1125,7 +1131,7 class WindProfiler(Operation): | |||||
1125 |
|
1131 | |||
1126 | self.__initime += dataOut.outputInterval #to erase time offset |
|
1132 | self.__initime += dataOut.outputInterval #to erase time offset | |
1127 |
|
1133 | |||
1128 | dataOut.data_output, dataOut.heightList = self.techniqueMeteors(self.__buffer, meteorThresh, hmin, hmax) |
|
1134 | dataOut.data_output, dataOut.heightList = self.techniqueMeteors(self.__buffer, meteorThresh, hmin, hmax, binkm) | |
1129 | dataOut.flagNoData = False |
|
1135 | dataOut.flagNoData = False | |
1130 | self.__buffer = None |
|
1136 | self.__buffer = None | |
1131 |
|
1137 | |||
@@ -1909,15 +1915,15 class SMDetection(Operation): | |||||
1909 | indSides = pairsarray[:,1] |
|
1915 | indSides = pairsarray[:,1] | |
1910 |
|
1916 | |||
1911 | pairslist1 = list(pairslist) |
|
1917 | pairslist1 = list(pairslist) | |
1912 |
pairslist1.append((0, |
|
1918 | pairslist1.append((0,4)) | |
1913 |
pairslist1.append((3 |
|
1919 | pairslist1.append((1,3)) | |
1914 |
|
1920 | |||
1915 | listMeteors1 = [] |
|
1921 | listMeteors1 = [] | |
1916 | listPowerSeries = [] |
|
1922 | listPowerSeries = [] | |
1917 | listVoltageSeries = [] |
|
1923 | listVoltageSeries = [] | |
1918 | #volts has the war data |
|
1924 | #volts has the war data | |
1919 |
|
1925 | |||
1920 | if frequency == 30e6: |
|
1926 | if frequency == 30.175e6: | |
1921 | timeLag = 45*10**-3 |
|
1927 | timeLag = 45*10**-3 | |
1922 | else: |
|
1928 | else: | |
1923 | timeLag = 15*10**-3 |
|
1929 | timeLag = 15*10**-3 | |
@@ -2021,7 +2027,7 class SMDetection(Operation): | |||||
2021 |
|
2027 | |||
2022 | threshError = 10 |
|
2028 | threshError = 10 | |
2023 | #Depending if it is 30 or 50 MHz |
|
2029 | #Depending if it is 30 or 50 MHz | |
2024 | if frequency == 30e6: |
|
2030 | if frequency == 30.175e6: | |
2025 | timeLag = 45*10**-3 |
|
2031 | timeLag = 45*10**-3 | |
2026 | else: |
|
2032 | else: | |
2027 | timeLag = 15*10**-3 |
|
2033 | timeLag = 15*10**-3 | |
@@ -2081,14 +2087,14 class SMDetection(Operation): | |||||
2081 | def __getRadialVelocity(self, listMeteors, listVolts, radialStdThresh, pairslist, timeInterval): |
|
2087 | def __getRadialVelocity(self, listMeteors, listVolts, radialStdThresh, pairslist, timeInterval): | |
2082 |
|
2088 | |||
2083 | pairslist1 = list(pairslist) |
|
2089 | pairslist1 = list(pairslist) | |
2084 |
pairslist1.append((0, |
|
2090 | pairslist1.append((0,4)) | |
2085 |
pairslist1.append((3 |
|
2091 | pairslist1.append((1,3)) | |
2086 | numPairs = len(pairslist1) |
|
2092 | numPairs = len(pairslist1) | |
2087 | #Time Lag |
|
2093 | #Time Lag | |
2088 | timeLag = 45*10**-3 |
|
2094 | timeLag = 45*10**-3 | |
2089 | c = 3e8 |
|
2095 | c = 3e8 | |
2090 | lag = numpy.ceil(timeLag/timeInterval) |
|
2096 | lag = numpy.ceil(timeLag/timeInterval) | |
2091 | freq = 30e6 |
|
2097 | freq = 30.175e6 | |
2092 |
|
2098 | |||
2093 | listMeteors1 = [] |
|
2099 | listMeteors1 = [] | |
2094 |
|
2100 | |||
@@ -2109,7 +2115,7 class SMDetection(Operation): | |||||
2109 | #Method 2 |
|
2115 | #Method 2 | |
2110 | slopes = numpy.zeros(numPairs) |
|
2116 | slopes = numpy.zeros(numPairs) | |
2111 | time = numpy.array([-2,-1,1,2])*timeInterval |
|
2117 | time = numpy.array([-2,-1,1,2])*timeInterval | |
2112 |
angAllCCF = numpy.angle(allCCFs[:,[0, |
|
2118 | angAllCCF = numpy.angle(allCCFs[:,[0,4,2,3],0]) | |
2113 |
|
2119 | |||
2114 | #Correct phases |
|
2120 | #Correct phases | |
2115 | derPhaseCCF = angAllCCF[:,1:] - angAllCCF[:,0:-1] |
|
2121 | derPhaseCCF = angAllCCF[:,1:] - angAllCCF[:,0:-1] | |
@@ -2384,7 +2390,7 class SMPhaseCalibration(Operation): | |||||
2384 | 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 | |
2385 | meteorOps = SMOperations() |
|
2391 | meteorOps = SMOperations() | |
2386 | pairslist0, distances = meteorOps.getPhasePairs(channelPositions) |
|
2392 | pairslist0, distances = meteorOps.getPhasePairs(channelPositions) | |
2387 |
|
2393 | |||
2388 | # distances1 = [-distances[0]*lamb, distances[1]*lamb, -distances[2]*lamb, distances[3]*lamb] |
|
2394 | # distances1 = [-distances[0]*lamb, distances[1]*lamb, -distances[2]*lamb, distances[3]*lamb] | |
2389 |
|
2395 | |||
2390 | meteorsArray = self.__buffer |
|
2396 | meteorsArray = self.__buffer | |
@@ -2403,6 +2409,7 class SMPhaseCalibration(Operation): | |||||
2403 | phasesOff = phasesOff.reshape((1,phasesOff.size)) |
|
2409 | phasesOff = phasesOff.reshape((1,phasesOff.size)) | |
2404 | dataOut.data_output = -phasesOff |
|
2410 | dataOut.data_output = -phasesOff | |
2405 | dataOut.flagNoData = False |
|
2411 | dataOut.flagNoData = False | |
|
2412 | dataOut.channelList = pairslist0 | |||
2406 | self.__buffer = None |
|
2413 | self.__buffer = None | |
2407 |
|
2414 | |||
2408 |
|
2415 |
General Comments 0
You need to be logged in to leave comments.
Login now