@@ -631,12 +631,13 class AMISRReader(ProcessingUnit): | |||||
631 | print '' |
|
631 | print '' | |
632 |
|
632 | |||
633 | def setObjProperties(self): |
|
633 | def setObjProperties(self): | |
|
634 | ||||
634 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km |
|
635 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km | |
635 | self.dataOut.nProfiles = self.radacHeaderObj.npulses |
|
636 | self.dataOut.nProfiles = self.radacHeaderObj.npulses | |
636 | self.dataOut.nRecords = self.radacHeaderObj.nrecords |
|
637 | self.dataOut.nRecords = self.radacHeaderObj.nrecords | |
637 | self.dataOut.nBeams = self.radacHeaderObj.nbeams |
|
638 | self.dataOut.nBeams = self.radacHeaderObj.nbeams | |
638 | self.dataOut.ippSeconds = self.ippSeconds_fromfile |
|
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 | self.dataOut.frequency = self.frequency_h5file |
|
641 | self.dataOut.frequency = self.frequency_h5file | |
641 | self.dataOut.npulseByFrame = self.npulseByFrame |
|
642 | self.dataOut.npulseByFrame = self.npulseByFrame | |
642 | self.dataOut.nBaud = None |
|
643 | self.dataOut.nBaud = None |
@@ -344,7 +344,7 class JRODataIO: | |||||
344 |
|
344 | |||
345 | blocksize = None |
|
345 | blocksize = None | |
346 |
|
346 | |||
347 |
get |
|
347 | getByBlock = False | |
348 |
|
348 | |||
349 | def __init__(self): |
|
349 | def __init__(self): | |
350 |
|
350 | |||
@@ -994,7 +994,8 class JRODataReader(JRODataIO): | |||||
994 | self.delay = delay |
|
994 | self.delay = delay | |
995 | ext = ext.lower() |
|
995 | ext = ext.lower() | |
996 | self.ext = ext |
|
996 | self.ext = ext | |
997 |
self.get |
|
997 | self.getByBlock = getblock | |
|
998 | ||||
998 | if not(self.setNextFile()): |
|
999 | if not(self.setNextFile()): | |
999 | if (startDate!=None) and (endDate!=None): |
|
1000 | if (startDate!=None) and (endDate!=None): | |
1000 | print "No files in range: %s - %s" %(datetime.datetime.combine(startDate,startTime).ctime(), datetime.datetime.combine(endDate,endTime).ctime()) |
|
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 | self.dataBlocksPerFile = headerObj.header['NBLOCK'] |
|
338 | self.dataBlocksPerFile = headerObj.header['NBLOCK'] | |
339 | self.timeZone = headerObj.header['TIMEZONE'] |
|
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 | if 'COMMENT' in headerObj.header.keys(): |
|
343 | if 'COMMENT' in headerObj.header.keys(): | |
344 | self.comments = headerObj.header['COMMENT'] |
|
344 | self.comments = headerObj.header['COMMENT'] |
@@ -302,7 +302,7 class SpectraReader(JRODataReader, ProcessingUnit): | |||||
302 |
|
302 | |||
303 | # self.dataOut.ippSeconds = self.ippSeconds |
|
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 | self.dataOut.dtype = self.dtype |
|
307 | self.dataOut.dtype = self.dtype | |
308 |
|
308 |
@@ -237,7 +237,7 class VoltageReader(JRODataReader, ProcessingUnit): | |||||
237 |
|
237 | |||
238 | # self.dataOut.ippSeconds = self.ippSeconds |
|
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 | if self.radarControllerHeaderObj.code != None: |
|
242 | if self.radarControllerHeaderObj.code != None: | |
243 |
|
243 | |||
@@ -269,15 +269,29 class VoltageReader(JRODataReader, ProcessingUnit): | |||||
269 |
|
269 | |||
270 | def getData(self): |
|
270 | def getData(self): | |
271 | """ |
|
271 | """ | |
272 |
getData obtiene una unidad de datos del buffer de lectura y la copia a |
|
272 | getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut | |
273 |
con todos los parametros asociados a este (metadata). cuando no hay datos |
|
273 | del tipo "Voltage" 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 |
|
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 | Return: |
|
279 | Return: | |
279 | data : retorna un perfil de voltages (alturas * canales) copiados desde el |
|
280 | ||
280 | buffer. Si no hay mas archivos a leer retorna None. |
|
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 | Variables afectadas: |
|
296 | Variables afectadas: | |
283 | self.dataOut |
|
297 | self.dataOut | |
@@ -309,10 +323,12 class VoltageReader(JRODataReader, ProcessingUnit): | |||||
309 | self.dataOut.flagNoData = True |
|
323 | self.dataOut.flagNoData = True | |
310 | return 0 |
|
324 | return 0 | |
311 |
|
325 | |||
312 |
if self.get |
|
326 | if self.getByBlock: | |
|
327 | self.dataOut.flagDataAsBlock = True | |||
313 | self.dataOut.data = self.datablock |
|
328 | self.dataOut.data = self.datablock | |
314 | self.profileIndex = self.processingHeaderObj.profilesPerBlock |
|
329 | self.profileIndex = self.processingHeaderObj.profilesPerBlock | |
315 | else: |
|
330 | else: | |
|
331 | self.dataOut.flagDataAsBlock = False | |||
316 | self.dataOut.data = self.datablock[:,self.profileIndex,:] |
|
332 | self.dataOut.data = self.datablock[:,self.profileIndex,:] | |
317 | self.profileIndex += 1 |
|
333 | self.profileIndex += 1 | |
318 |
|
334 |
General Comments 0
You need to be logged in to leave comments.
Login now