@@ -37,7 +37,7 class CorrelationProc(ProcessingUnit): | |||
|
37 | 37 | self.dataOut.utctime = self.firstdatatime |
|
38 | 38 | self.dataOut.flagDecodeData = self.dataIn.flagDecodeData #asumo q la data esta decodificada |
|
39 | 39 | self.dataOut.flagDeflipData = self.dataIn.flagDeflipData #asumo q la data esta sin flip |
|
40 |
|
|
|
40 | self.dataOut.nCohInt = self.dataIn.nCohInt | |
|
41 | 41 | # self.dataOut.nIncohInt = 1 |
|
42 | 42 | self.dataOut.ippSeconds = self.dataIn.ippSeconds |
|
43 | 43 | # self.dataOut.windowOfFilter = self.dataIn.windowOfFilter |
@@ -60,7 +60,7 class ParametersProc(ProcessingUnit): | |||
|
60 | 60 | self.dataOut.heightList = self.dataIn.getHeiRange() |
|
61 | 61 | self.dataOut.frequency = self.dataIn.frequency |
|
62 | 62 | |
|
63 |
def run(self, nSeconds = |
|
|
63 | def run(self, nSeconds = 100, nProfiles = None): | |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | |
@@ -71,16 +71,20 class ParametersProc(ProcessingUnit): | |||
|
71 | 71 | |
|
72 | 72 | if self.dataIn.type == "Voltage": |
|
73 | 73 | self.dataOut.flagNoData = True |
|
74 | if nSeconds != None: | |
|
74 | ||
|
75 | ||
|
76 | if self.buffer == None: | |
|
75 | 77 | self.nSeconds = nSeconds |
|
76 | 78 | self.nProfiles= int(numpy.floor(nSeconds/(self.dataIn.ippSeconds*self.dataIn.nCohInt))) |
|
79 | ||
|
80 | self.buffer = numpy.zeros((self.dataIn.nChannels, | |
|
81 | self.nProfiles, | |
|
82 | self.dataIn.nHeights), | |
|
83 | dtype='complex') | |
|
77 | 84 | |
|
78 |
if self. |
|
|
79 | self.buffer = numpy.zeros((self.dataIn.nChannels, | |
|
80 | self.nProfiles, | |
|
81 | self.dataIn.nHeights), | |
|
82 | dtype='complex') | |
|
83 | ||
|
85 | if self.profIndex == 7990: | |
|
86 | a = 1 | |
|
87 | ||
|
84 | 88 | self.buffer[:,self.profIndex,:] = self.dataIn.data.copy() |
|
85 | 89 | self.profIndex += 1 |
|
86 | 90 | |
@@ -131,7 +135,7 class ParametersProc(ProcessingUnit): | |||
|
131 | 135 | self.__updateObjFromInput() |
|
132 | 136 | self.firstdatatime = None |
|
133 | 137 | self.dataOut.utctimeInit = self.dataIn.utctime |
|
134 |
self.dataOut. |
|
|
138 | self.dataOut.paramInterval = self.dataIn.timeInterval | |
|
135 | 139 | |
|
136 | 140 | #------------------- Get Moments ---------------------------------- |
|
137 | 141 | def GetMoments(self, channelList = None): |
@@ -174,7 +178,7 class ParametersProc(ProcessingUnit): | |||
|
174 | 178 | elif (self.smooth < 3): smooth = 0 |
|
175 | 179 | |
|
176 | 180 | if (type1 == None): type1 = 0 |
|
177 |
if (fwindow |
|
|
181 | if (fwindow == None): fwindow = numpy.zeros(oldfreq.size) + 1 | |
|
178 | 182 | if (snrth == None): snrth = -3 |
|
179 | 183 | if (dc == None): dc = 0 |
|
180 | 184 | if (aliasing == None): aliasing = 0 |
@@ -559,7 +563,10 class ParametersProc(ProcessingUnit): | |||
|
559 | 563 | #***************************+ PASS DATA TO NEXT STEP ********************** |
|
560 | 564 | arrayFinal = arrayParameters.reshape((1,arrayParameters.shape[0],arrayParameters.shape[1])) |
|
561 | 565 | self.dataOut.data_param = arrayFinal |
|
562 | ||
|
566 | ||
|
567 | if arrayFinal == None: | |
|
568 | self.dataOut.flagNoData = True | |
|
569 | ||
|
563 | 570 | return |
|
564 | 571 | |
|
565 | 572 | def __getHardwarePhaseDiff(self, voltage0, pairslist, newheis, n): |
@@ -1051,6 +1058,10 class ParametersProc(ProcessingUnit): | |||
|
1051 | 1058 | date = re.findall(r'\((.*?)\)', date) |
|
1052 | 1059 | date = date[0].split(',') |
|
1053 | 1060 | date = map(int, date) |
|
1061 | ||
|
1062 | if len(date)<6: | |
|
1063 | date.append(0) | |
|
1064 | ||
|
1054 | 1065 | date = [date[0]*10000 + date[1]*100 + date[2], date[3]*10000 + date[4]*100 + date[5]] |
|
1055 | 1066 | arrayDate = numpy.tile(date, (len(listMeteors), 1)) |
|
1056 | 1067 | |
@@ -1280,7 +1291,7 class ParametersProc(ProcessingUnit): | |||
|
1280 | 1291 | error1 = p0*numpy.nan |
|
1281 | 1292 | |
|
1282 | 1293 | #Save |
|
1283 |
if self.dataOut.data_param |
|
|
1294 | if self.dataOut.data_param == None: | |
|
1284 | 1295 | self.dataOut.data_param = numpy.zeros((nGroups, p0.size, nHeights))*numpy.nan |
|
1285 | 1296 | self.dataOut.data_error = numpy.zeros((nGroups, p0.size + 1, nHeights))*numpy.nan |
|
1286 | 1297 | |
@@ -1580,9 +1591,12 class WindProfiler(Operation): | |||
|
1580 | 1591 | |
|
1581 | 1592 | Parameters affected: Winds |
|
1582 | 1593 | ''' |
|
1583 | print arrayMeteor.shape | |
|
1594 | # print arrayMeteor.shape | |
|
1584 | 1595 | #Settings |
|
1585 | 1596 | nInt = (heightMax - heightMin)/2 |
|
1597 | # print nInt | |
|
1598 | nInt = int(nInt) | |
|
1599 | # print nInt | |
|
1586 | 1600 | winds = numpy.zeros((2,nInt))*numpy.nan |
|
1587 | 1601 | |
|
1588 | 1602 | #Filter errors |
@@ -1633,8 +1647,8 class WindProfiler(Operation): | |||
|
1633 | 1647 | def run(self, dataOut, technique, **kwargs): |
|
1634 | 1648 | |
|
1635 | 1649 | param = dataOut.data_param |
|
1636 |
|
|
|
1637 |
|
|
|
1650 | if dataOut.abscissaList != None: | |
|
1651 | absc = dataOut.abscissaList[:-1] | |
|
1638 | 1652 | noise = dataOut.noise |
|
1639 | 1653 | heightList = dataOut.heightList |
|
1640 | 1654 | SNR = dataOut.data_SNR |
@@ -1726,7 +1740,7 class WindProfiler(Operation): | |||
|
1726 | 1740 | |
|
1727 | 1741 | self.__isConfig = True |
|
1728 | 1742 | |
|
1729 |
if self.__buffer |
|
|
1743 | if self.__buffer == None: | |
|
1730 | 1744 | self.__buffer = dataOut.data_param |
|
1731 | 1745 | self.__firstdata = copy.copy(dataOut) |
|
1732 | 1746 | |
@@ -1837,7 +1851,7 class PhaseCalibration(Operation): | |||
|
1837 | 1851 | |
|
1838 | 1852 | def __getGammas(self, pairs, k, d, phases): |
|
1839 | 1853 | gammas = numpy.zeros(2) |
|
1840 |
|
|
|
1854 | ||
|
1841 | 1855 | for i in range(len(pairs)): |
|
1842 | 1856 | |
|
1843 | 1857 | pairi = pairs[i] |
@@ -1859,7 +1873,7 class PhaseCalibration(Operation): | |||
|
1859 | 1873 | phasesX = phaseHisto[1][:-1] |
|
1860 | 1874 | width = phasesX[1] - phasesX[0] |
|
1861 | 1875 | phasesX += width/2 |
|
1862 | ||
|
1876 | ||
|
1863 | 1877 | #Gaussian aproximation |
|
1864 | 1878 | bpeak = meteorsY.argmax() |
|
1865 | 1879 | peak = meteorsY.max() |
@@ -1878,8 +1892,7 class PhaseCalibration(Operation): | |||
|
1878 | 1892 | |
|
1879 | 1893 | #Gammas |
|
1880 | 1894 | gammas[i] = coeff[0][1] |
|
1881 | # gammas[i] = bpeak | |
|
1882 | ||
|
1895 | ||
|
1883 | 1896 | return gammas |
|
1884 | 1897 | |
|
1885 | 1898 | def __residualFunction(self, coeffs, y, t): |
@@ -1897,7 +1910,7 class PhaseCalibration(Operation): | |||
|
1897 | 1910 | pairy = pairsList[1] |
|
1898 | 1911 | center_xangle = 0 |
|
1899 | 1912 | center_yangle = 0 |
|
1900 |
range_angle = numpy.array([ |
|
|
1913 | range_angle = numpy.array([10*numpy.pi,numpy.pi,numpy.pi/2,numpy.pi/4]) | |
|
1901 | 1914 | ntimes = len(range_angle) |
|
1902 | 1915 | |
|
1903 | 1916 | nstepsx = 20.0 |
@@ -1963,7 +1976,7 class PhaseCalibration(Operation): | |||
|
1963 | 1976 | |
|
1964 | 1977 | self.__isConfig = True |
|
1965 | 1978 | |
|
1966 |
if self.__buffer |
|
|
1979 | if self.__buffer == None: | |
|
1967 | 1980 | self.__buffer = dataOut.data_param.copy() |
|
1968 | 1981 | |
|
1969 | 1982 | else: |
@@ -2138,7 +2151,4 class MeteorOperations(): | |||
|
2138 | 2151 | indInvalid1 = numpy.where(numpy.logical_and(h_bool == 0, error == 0))[0] |
|
2139 | 2152 | error[indInvalid1] = 13 |
|
2140 | 2153 | |
|
2141 |
return heights, error |
|
|
2142 | ||
|
2143 | ||
|
2144 | No newline at end of file | |
|
2154 | return heights, error No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now