##// END OF EJS Templates
lectura de apuntes desde archivo
joabAM -
r1368:2344000131a5
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -51,7 +51,7 class AMISRReader(ProcessingUnit):
51 self.flagIsNewFile = 0
51 self.flagIsNewFile = 0
52 self.filename = ''
52 self.filename = ''
53 self.amisrFilePointer = None
53 self.amisrFilePointer = None
54
54 self.realBeamCode = []
55
55
56 #self.dataset = None
56 #self.dataset = None
57
57
@@ -133,7 +133,13 class AMISRReader(ProcessingUnit):
133 def readAMISRHeader(self,fp):
133 def readAMISRHeader(self,fp):
134 header = 'Raw11/Data/RadacHeader'
134 header = 'Raw11/Data/RadacHeader'
135 self.beamCodeByPulse = fp.get(header+'/BeamCode') # LIST OF BEAMS PER PROFILE, TO BE USED ON REARRANGE
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 #self.code = fp.get(header+'/Code') # NOT USE FOR THIS
143 #self.code = fp.get(header+'/Code') # NOT USE FOR THIS
138 self.frameCount = fp.get(header+'/FrameCount')# NOT USE FOR THIS
144 self.frameCount = fp.get(header+'/FrameCount')# NOT USE FOR THIS
139 self.modeGroup = fp.get(header+'/ModeGroup')# NOT USE FOR THIS
145 self.modeGroup = fp.get(header+'/ModeGroup')# NOT USE FOR THIS
@@ -151,7 +157,7 class AMISRReader(ProcessingUnit):
151
157
152 self.nprofiles = self.pulseCount.shape[1] #nprofile
158 self.nprofiles = self.pulseCount.shape[1] #nprofile
153 self.nsa = self.nsamplesPulse[0,0] #ngates
159 self.nsa = self.nsamplesPulse[0,0] #ngates
154 self.nchannels = self.beamCode.shape[1]
160 self.nchannels = len(self.beamCode)
155 self.ippSeconds = (self.radacTime[0][1] -self.radacTime[0][0]) #Ipp in seconds
161 self.ippSeconds = (self.radacTime[0][1] -self.radacTime[0][0]) #Ipp in seconds
156 #self.__waitForNewFile = self.nblocks # wait depending on the number of blocks since each block is 1 sec
162 #self.__waitForNewFile = self.nblocks # wait depending on the number of blocks since each block is 1 sec
157 self.__waitForNewFile = self.nblocks * self.nprofiles * self.ippSeconds # wait until new file is created
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 for thisChannel in range(nchan):
459 for thisChannel in range(nchan):
454 new_block[:,thisChannel,:,:] = self.dataset[:,numpy.where(channels==self.beamCode[0][thisChannel])[0],:]
460 new_block[:,thisChannel,:,:] = self.dataset[:,numpy.where(channels==self.beamCode[thisChannel])[0],:]
455
461
456
462
457 new_block = numpy.transpose(new_block, (1,0,2,3))
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