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