@@ -653,7 +653,7 class AMISR: | |||||
653 | self.type = "AMISR" |
|
653 | self.type = "AMISR" | |
654 |
|
654 | |||
655 | #propiedades para compatibilidad con Voltages |
|
655 | #propiedades para compatibilidad con Voltages | |
656 | self.timeZone = 0#timezone like jroheader, difference in minutes between UTC and localtime |
|
656 | self.timeZone = 300#timezone like jroheader, difference in minutes between UTC and localtime | |
657 | self.dstFlag = 0#self.dataIn.dstFlag |
|
657 | self.dstFlag = 0#self.dataIn.dstFlag | |
658 | self.errorCount = 0#self.dataIn.errorCount |
|
658 | self.errorCount = 0#self.dataIn.errorCount | |
659 | self.useLocalTime = True#self.dataIn.useLocalTime |
|
659 | self.useLocalTime = True#self.dataIn.useLocalTime | |
@@ -679,7 +679,9 class AMISR: | |||||
679 |
|
679 | |||
680 | #actualizar en la lectura de datos |
|
680 | #actualizar en la lectura de datos | |
681 | self.heightList = None#self.dataIn.heightList |
|
681 | self.heightList = None#self.dataIn.heightList | |
682 |
self.nProfiles = None# |
|
682 | self.nProfiles = None#Number of samples or nFFTPoints | |
|
683 | self.nRecords = None | |||
|
684 | self.nBeams = None | |||
683 | self.nBaud = None#self.dataIn.nBaud |
|
685 | self.nBaud = None#self.dataIn.nBaud | |
684 | self.nCode = None#self.dataIn.nCode |
|
686 | self.nCode = None#self.dataIn.nCode | |
685 | self.code = None#self.dataIn.code |
|
687 | self.code = None#self.dataIn.code |
@@ -3531,13 +3531,16 class AMISRReader(ProcessingUnit): | |||||
3531 | return |
|
3531 | return | |
3532 |
|
3532 | |||
3533 | def __selDates(self, amisr_dirname_format): |
|
3533 | def __selDates(self, amisr_dirname_format): | |
3534 | year = int(amisr_dirname_format[0:4]) |
|
3534 | try: | |
3535 |
|
|
3535 | year = int(amisr_dirname_format[0:4]) | |
3536 |
|
|
3536 | month = int(amisr_dirname_format[4:6]) | |
3537 | thisDate = datetime.date(year,month,dom) |
|
3537 | dom = int(amisr_dirname_format[6:8]) | |
3538 |
|
3538 | thisDate = datetime.date(year,month,dom) | ||
3539 | if (thisDate>=self.startDate and thisDate <= self.endDate): |
|
3539 | ||
3540 | return amisr_dirname_format |
|
3540 | if (thisDate>=self.startDate and thisDate <= self.endDate): | |
|
3541 | return amisr_dirname_format | |||
|
3542 | except: | |||
|
3543 | return None | |||
3541 |
|
3544 | |||
3542 | def __findDataForDates(self): |
|
3545 | def __findDataForDates(self): | |
3543 |
|
3546 | |||
@@ -3547,7 +3550,9 class AMISRReader(ProcessingUnit): | |||||
3547 | return None |
|
3550 | return None | |
3548 |
|
3551 | |||
3549 | pat = '\d+.\d+' |
|
3552 | pat = '\d+.\d+' | |
3550 |
dirnameList = [re.search(pat,x) |
|
3553 | dirnameList = [re.search(pat,x) for x in os.listdir(self.path)] | |
|
3554 | dirnameList = filter(lambda x:x!=None,dirnameList) | |||
|
3555 | dirnameList = [x.string for x in dirnameList] | |||
3551 | dirnameList = [self.__selDates(x) for x in dirnameList] |
|
3556 | dirnameList = [self.__selDates(x) for x in dirnameList] | |
3552 | dirnameList = filter(lambda x:x!=None,dirnameList) |
|
3557 | dirnameList = filter(lambda x:x!=None,dirnameList) | |
3553 | if len(dirnameList)>0: |
|
3558 | if len(dirnameList)>0: | |
@@ -3879,6 +3884,8 class AMISRReader(ProcessingUnit): | |||||
3879 | def setObjProperties(self): |
|
3884 | def setObjProperties(self): | |
3880 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km |
|
3885 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km | |
3881 | self.dataOut.nProfiles = self.radacHeaderObj.npulses |
|
3886 | self.dataOut.nProfiles = self.radacHeaderObj.npulses | |
|
3887 | self.dataOut.nRecords = self.radacHeaderObj.nrecords | |||
|
3888 | self.dataOut.nBeams = self.radacHeaderObj.nbeams | |||
3882 | self.dataOut.ippSeconds = self.ippSeconds_fromfile |
|
3889 | self.dataOut.ippSeconds = self.ippSeconds_fromfile | |
3883 | self.dataOut.timeInterval = self.dataOut.ippSeconds * self.dataOut.nCohInt |
|
3890 | self.dataOut.timeInterval = self.dataOut.ippSeconds * self.dataOut.nCohInt | |
3884 | self.dataOut.frequency = self.frequency_h5file |
|
3891 | self.dataOut.frequency = self.frequency_h5file |
@@ -2081,6 +2081,24 class AMISRProc(ProcessingUnit): | |||||
2081 | def init(self): |
|
2081 | def init(self): | |
2082 | if self.dataIn.type == 'AMISR': |
|
2082 | if self.dataIn.type == 'AMISR': | |
2083 | self.dataOut.copy(self.dataIn) |
|
2083 | self.dataOut.copy(self.dataIn) | |
|
2084 | ||||
|
2085 | ||||
|
2086 | class PrintInfo(Operation): | |||
|
2087 | def __init__(self): | |||
|
2088 | pass | |||
|
2089 | ||||
|
2090 | def run(self, dataOut): | |||
|
2091 | ||||
|
2092 | print 'Number of Records by File: %d'%dataOut.nRecords | |||
|
2093 | print 'Number of Pulses: %d'%dataOut.nProfiles | |||
|
2094 | print 'Number of Samples by Pulse: %d'%len(dataOut.heightList) | |||
|
2095 | print 'Ipp Seconds: %f'%dataOut.ippSeconds | |||
|
2096 | print 'Number of Beams: %d'%dataOut.nBeams | |||
|
2097 | print 'BeamCodes:' | |||
|
2098 | beamStrList = ['Beam %d -> Code %d'%(k,v) for k,v in dataOut.beamCodeDict.items()] | |||
|
2099 | for b in beamStrList: | |||
|
2100 | print b | |||
|
2101 | ||||
2084 |
|
2102 | |||
2085 | class BeamSelector(Operation): |
|
2103 | class BeamSelector(Operation): | |
2086 | profileIndex = None |
|
2104 | profileIndex = None |
General Comments 0
You need to be logged in to leave comments.
Login now