##// END OF EJS Templates
fix meteors processing bugs
José Chávez -
r992:7a6f35bfb333
parent child
Show More
@@ -380,9 +380,9 class RadarControllerHeader(Header):
380
380
381 try:
381 try:
382 if hasattr(fp, 'read'):
382 if hasattr(fp, 'read'):
383 self.nCode = numpy.fromfile(fp, '<u4', 1)
383 self.nCode = numpy.fromfile(fp, '<u4', 1)[0]
384 self.length += self.nCode.nbytes
384 self.length += self.nCode.nbytes
385 self.nBaud = numpy.fromfile(fp, '<u4', 1)
385 self.nBaud = numpy.fromfile(fp, '<u4', 1)[0]
386 self.length += self.nBaud.nbytes
386 self.length += self.nBaud.nbytes
387 else:
387 else:
388 self.nCode = numpy.fromstring(fp[self.length:], '<u4', 1)[0]
388 self.nCode = numpy.fromstring(fp[self.length:], '<u4', 1)[0]
@@ -391,7 +391,7 class RadarControllerHeader(Header):
391 self.length += self.nBaud.nbytes
391 self.length += self.nBaud.nbytes
392 except Exception, e:
392 except Exception, e:
393 print "RadarControllerHeader: " + str(e)
393 print "RadarControllerHeader: " + str(e)
394 return 0
394 return 0
395 code = numpy.empty([self.nCode,self.nBaud],dtype='i1')
395 code = numpy.empty([self.nCode,self.nBaud],dtype='i1')
396
396
397 for ic in range(self.nCode):
397 for ic in range(self.nCode):
@@ -1060,12 +1060,12 class WindProfiler(Operation):
1060
1060
1061 return velEst
1061 return velEst
1062
1062
1063 def run(self, dataOut, technique, **kwargs):
1063 def run(self, dataOut, technique, nHours=1, hmin=70, hmax=110, **kwargs):
1064
1064
1065 param = dataOut.data_param
1065 param = dataOut.data_param
1066 if dataOut.abscissaList != None:
1066 if dataOut.abscissaList != None:
1067 absc = dataOut.abscissaList[:-1]
1067 absc = dataOut.abscissaList[:-1]
1068 noise = dataOut.noise
1068 # noise = dataOut.noise
1069 heightList = dataOut.heightList
1069 heightList = dataOut.heightList
1070 SNR = dataOut.data_SNR
1070 SNR = dataOut.data_SNR
1071
1071
@@ -2291,7 +2291,7 class SMPhaseCalibration(Operation):
2291 jgammaArray = numpy.hstack((jgamma,jgamma+0.5*numpy.pi,jgamma-0.5*numpy.pi))
2291 jgammaArray = numpy.hstack((jgamma,jgamma+0.5*numpy.pi,jgamma-0.5*numpy.pi))
2292
2292
2293 #Histogram
2293 #Histogram
2294 nBins = 64.0
2294 nBins = 64
2295 rmin = -0.5*numpy.pi
2295 rmin = -0.5*numpy.pi
2296 rmax = 0.5*numpy.pi
2296 rmax = 0.5*numpy.pi
2297 phaseHisto = numpy.histogram(jgammaArray, bins=nBins, range=(rmin,rmax))
2297 phaseHisto = numpy.histogram(jgammaArray, bins=nBins, range=(rmin,rmax))
@@ -2340,8 +2340,8 class SMPhaseCalibration(Operation):
2340 range_angle = numpy.array([10*numpy.pi,numpy.pi,numpy.pi/2,numpy.pi/4])
2340 range_angle = numpy.array([10*numpy.pi,numpy.pi,numpy.pi/2,numpy.pi/4])
2341 ntimes = len(range_angle)
2341 ntimes = len(range_angle)
2342
2342
2343 nstepsx = 20.0
2343 nstepsx = 20
2344 nstepsy = 20.0
2344 nstepsy = 20
2345
2345
2346 for iz in range(ntimes):
2346 for iz in range(ntimes):
2347 min_xangle = -range_angle[iz]/2 + center_xangle
2347 min_xangle = -range_angle[iz]/2 + center_xangle
@@ -2601,8 +2601,8 class SMOperations():
2601
2601
2602 hCorr = hi[ind_h, :]
2602 hCorr = hi[ind_h, :]
2603 ind_hCorr = numpy.where(numpy.logical_and(hi > minHeight, hi < maxHeight))
2603 ind_hCorr = numpy.where(numpy.logical_and(hi > minHeight, hi < maxHeight))
2604
2604
2605 hCorr = hi[ind_hCorr]
2605 hCorr = hi[ind_hCorr][:len(ind_h)]
2606 heights[ind_h] = hCorr
2606 heights[ind_h] = hCorr
2607
2607
2608 #Setting Error
2608 #Setting Error
@@ -634,6 +634,8 class Decoder(Operation):
634
634
635 for i in range(self.__nChannels):
635 for i in range(self.__nChannels):
636 for j in range(self.__nProfiles):
636 for j in range(self.__nProfiles):
637 print self.datadecTime[i,j,:].shape
638 print numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:].shape
637 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
639 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
638
640
639 return self.datadecTime
641 return self.datadecTime
General Comments 0
You need to be logged in to leave comments. Login now