|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -51,7 +51,7 class AMISRReader(ProcessingUnit): | |||
|
51 | 51 | self.flagIsNewFile = 0 |
|
52 | 52 | self.filename = '' |
|
53 | 53 | self.amisrFilePointer = None |
|
54 | ||
|
54 | self.realBeamCode = [] | |
|
55 | 55 | |
|
56 | 56 | #self.dataset = None |
|
57 | 57 | |
@@ -133,7 +133,13 class AMISRReader(ProcessingUnit): | |||
|
133 | 133 | def readAMISRHeader(self,fp): |
|
134 | 134 | header = 'Raw11/Data/RadacHeader' |
|
135 | 135 | self.beamCodeByPulse = fp.get(header+'/BeamCode') # LIST OF BEAMS PER PROFILE, TO BE USED ON REARRANGE |
|
136 | self.beamCode = fp.get('Raw11/Data/Beamcodes') # NUMBER OF CHANNELS AND IDENTIFY POSITION TO CREATE A FILE WITH THAT INFO | |
|
136 | self.beamcodeFile = fp['Setup/Beamcodefile'][()].decode() | |
|
137 | self.trueBeams = self.beamcodeFile.split("\n") | |
|
138 | self.trueBeams.pop()#remove last | |
|
139 | [self.realBeamCode.append(x) for x in self.trueBeams if x not in self.realBeamCode] | |
|
140 | self.beamCode = [int(x, 16) for x in self.realBeamCode] | |
|
141 | ||
|
142 | #self.beamCode = fp.get('Raw11/Data/Beamcodes') # NUMBER OF CHANNELS AND IDENTIFY POSITION TO CREATE A FILE WITH THAT INFO | |
|
137 | 143 | #self.code = fp.get(header+'/Code') # NOT USE FOR THIS |
|
138 | 144 | self.frameCount = fp.get(header+'/FrameCount')# NOT USE FOR THIS |
|
139 | 145 | self.modeGroup = fp.get(header+'/ModeGroup')# NOT USE FOR THIS |
@@ -151,7 +157,7 class AMISRReader(ProcessingUnit): | |||
|
151 | 157 | |
|
152 | 158 | self.nprofiles = self.pulseCount.shape[1] #nprofile |
|
153 | 159 | self.nsa = self.nsamplesPulse[0,0] #ngates |
|
154 |
self.nchannels = self.beamCode |
|
|
160 | self.nchannels = len(self.beamCode) | |
|
155 | 161 | self.ippSeconds = (self.radacTime[0][1] -self.radacTime[0][0]) #Ipp in seconds |
|
156 | 162 | #self.__waitForNewFile = self.nblocks # wait depending on the number of blocks since each block is 1 sec |
|
157 | 163 | self.__waitForNewFile = self.nblocks * self.nprofiles * self.ippSeconds # wait until new file is created |
@@ -451,7 +457,7 class AMISRReader(ProcessingUnit): | |||
|
451 | 457 | ############################################ |
|
452 | 458 | |
|
453 | 459 | for thisChannel in range(nchan): |
|
454 |
new_block[:,thisChannel,:,:] = self.dataset[:,numpy.where(channels==self.beamCode[ |
|
|
460 | new_block[:,thisChannel,:,:] = self.dataset[:,numpy.where(channels==self.beamCode[thisChannel])[0],:] | |
|
455 | 461 | |
|
456 | 462 | |
|
457 | 463 | new_block = numpy.transpose(new_block, (1,0,2,3)) |
General Comments 0
You need to be logged in to leave comments.
Login now