@@ -631,12 +631,13 class AMISRReader(ProcessingUnit): | |||
|
631 | 631 | print '' |
|
632 | 632 | |
|
633 | 633 | def setObjProperties(self): |
|
634 | ||
|
634 | 635 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km |
|
635 | 636 | self.dataOut.nProfiles = self.radacHeaderObj.npulses |
|
636 | 637 | self.dataOut.nRecords = self.radacHeaderObj.nrecords |
|
637 | 638 | self.dataOut.nBeams = self.radacHeaderObj.nbeams |
|
638 | 639 | self.dataOut.ippSeconds = self.ippSeconds_fromfile |
|
639 | self.dataOut.timeInterval = self.dataOut.ippSeconds * self.dataOut.nCohInt | |
|
640 | # self.dataOut.timeInterval = self.dataOut.ippSeconds * self.dataOut.nCohInt | |
|
640 | 641 | self.dataOut.frequency = self.frequency_h5file |
|
641 | 642 | self.dataOut.npulseByFrame = self.npulseByFrame |
|
642 | 643 | self.dataOut.nBaud = None |
@@ -344,7 +344,7 class JRODataIO: | |||
|
344 | 344 | |
|
345 | 345 | blocksize = None |
|
346 | 346 | |
|
347 |
get |
|
|
347 | getByBlock = False | |
|
348 | 348 | |
|
349 | 349 | def __init__(self): |
|
350 | 350 | |
@@ -994,7 +994,8 class JRODataReader(JRODataIO): | |||
|
994 | 994 | self.delay = delay |
|
995 | 995 | ext = ext.lower() |
|
996 | 996 | self.ext = ext |
|
997 |
self.get |
|
|
997 | self.getByBlock = getblock | |
|
998 | ||
|
998 | 999 | if not(self.setNextFile()): |
|
999 | 1000 | if (startDate!=None) and (endDate!=None): |
|
1000 | 1001 | print "No files in range: %s - %s" %(datetime.datetime.combine(startDate,startTime).ctime(), datetime.datetime.combine(endDate,endTime).ctime()) |
@@ -338,7 +338,7 class FitsReader(ProcessingUnit): | |||
|
338 | 338 | self.dataBlocksPerFile = headerObj.header['NBLOCK'] |
|
339 | 339 | self.timeZone = headerObj.header['TIMEZONE'] |
|
340 | 340 | |
|
341 | self.timeInterval = self.ippSeconds * self.nCohInt * self.nIncohInt | |
|
341 | # self.timeInterval = self.ippSeconds * self.nCohInt * self.nIncohInt | |
|
342 | 342 | |
|
343 | 343 | if 'COMMENT' in headerObj.header.keys(): |
|
344 | 344 | self.comments = headerObj.header['COMMENT'] |
@@ -302,7 +302,7 class SpectraReader(JRODataReader, ProcessingUnit): | |||
|
302 | 302 | |
|
303 | 303 | # self.dataOut.ippSeconds = self.ippSeconds |
|
304 | 304 | |
|
305 | self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt * self.processingHeaderObj.nIncohInt * self.processingHeaderObj.profilesPerBlock | |
|
305 | # self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt * self.processingHeaderObj.nIncohInt * self.processingHeaderObj.profilesPerBlock | |
|
306 | 306 | |
|
307 | 307 | self.dataOut.dtype = self.dtype |
|
308 | 308 |
@@ -237,7 +237,7 class VoltageReader(JRODataReader, ProcessingUnit): | |||
|
237 | 237 | |
|
238 | 238 | # self.dataOut.ippSeconds = self.ippSeconds |
|
239 | 239 | |
|
240 | self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt | |
|
240 | # self.dataOut.timeInterval = self.radarControllerHeaderObj.ippSeconds * self.processingHeaderObj.nCohInt | |
|
241 | 241 | |
|
242 | 242 | if self.radarControllerHeaderObj.code != None: |
|
243 | 243 | |
@@ -269,15 +269,29 class VoltageReader(JRODataReader, ProcessingUnit): | |||
|
269 | 269 | |
|
270 | 270 | def getData(self): |
|
271 | 271 | """ |
|
272 |
getData obtiene una unidad de datos del buffer de lectura y la copia a |
|
|
273 |
con todos los parametros asociados a este (metadata). cuando no hay datos |
|
|
274 |
lectura es necesario hacer una nueva lectura de los bloques de datos usando |
|
|
272 | getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut | |
|
273 | del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos | |
|
274 | en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando | |
|
275 | "readNextBlock" | |
|
275 | 276 | |
|
276 | Ademas incrementa el contador del buffer en 1. | |
|
277 | Ademas incrementa el contador del buffer "self.profileIndex" en 1. | |
|
277 | 278 | |
|
278 | 279 | Return: |
|
279 | data : retorna un perfil de voltages (alturas * canales) copiados desde el | |
|
280 | buffer. Si no hay mas archivos a leer retorna None. | |
|
280 | ||
|
281 | Si el flag self.getByBlock ha sido seteado el bloque completo es copiado a self.dataOut y el self.profileIndex | |
|
282 | es igual al total de perfiles leidos desde el archivo. | |
|
283 | ||
|
284 | Si self.getByBlock == False: | |
|
285 | ||
|
286 | self.dataOut.data = buffer[:, thisProfile, :] | |
|
287 | ||
|
288 | shape = [nChannels, nHeis] | |
|
289 | ||
|
290 | Si self.getByBlock == True: | |
|
291 | ||
|
292 | self.dataOut.data = buffer[:, :, :] | |
|
293 | ||
|
294 | shape = [nChannels, nProfiles, nHeis] | |
|
281 | 295 | |
|
282 | 296 | Variables afectadas: |
|
283 | 297 | self.dataOut |
@@ -309,10 +323,12 class VoltageReader(JRODataReader, ProcessingUnit): | |||
|
309 | 323 | self.dataOut.flagNoData = True |
|
310 | 324 | return 0 |
|
311 | 325 | |
|
312 |
if self.get |
|
|
326 | if self.getByBlock: | |
|
327 | self.dataOut.flagDataAsBlock = True | |
|
313 | 328 | self.dataOut.data = self.datablock |
|
314 | 329 | self.profileIndex = self.processingHeaderObj.profilesPerBlock |
|
315 | 330 | else: |
|
331 | self.dataOut.flagDataAsBlock = False | |
|
316 | 332 | self.dataOut.data = self.datablock[:,self.profileIndex,:] |
|
317 | 333 | self.profileIndex += 1 |
|
318 | 334 |
General Comments 0
You need to be logged in to leave comments.
Login now