@@ -653,7 +653,7 class AMISR: | |||
|
653 | 653 | self.type = "AMISR" |
|
654 | 654 | |
|
655 | 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 | 657 | self.dstFlag = 0#self.dataIn.dstFlag |
|
658 | 658 | self.errorCount = 0#self.dataIn.errorCount |
|
659 | 659 | self.useLocalTime = True#self.dataIn.useLocalTime |
@@ -679,7 +679,9 class AMISR: | |||
|
679 | 679 | |
|
680 | 680 | #actualizar en la lectura de datos |
|
681 | 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 | 685 | self.nBaud = None#self.dataIn.nBaud |
|
684 | 686 | self.nCode = None#self.dataIn.nCode |
|
685 | 687 | self.code = None#self.dataIn.code |
@@ -3531,13 +3531,16 class AMISRReader(ProcessingUnit): | |||
|
3531 | 3531 | return |
|
3532 | 3532 | |
|
3533 | 3533 | def __selDates(self, amisr_dirname_format): |
|
3534 | year = int(amisr_dirname_format[0:4]) | |
|
3535 |
|
|
|
3536 |
|
|
|
3537 | thisDate = datetime.date(year,month,dom) | |
|
3538 | ||
|
3539 | if (thisDate>=self.startDate and thisDate <= self.endDate): | |
|
3540 | return amisr_dirname_format | |
|
3534 | try: | |
|
3535 | year = int(amisr_dirname_format[0:4]) | |
|
3536 | month = int(amisr_dirname_format[4:6]) | |
|
3537 | dom = int(amisr_dirname_format[6:8]) | |
|
3538 | thisDate = datetime.date(year,month,dom) | |
|
3539 | ||
|
3540 | if (thisDate>=self.startDate and thisDate <= self.endDate): | |
|
3541 | return amisr_dirname_format | |
|
3542 | except: | |
|
3543 | return None | |
|
3541 | 3544 | |
|
3542 | 3545 | def __findDataForDates(self): |
|
3543 | 3546 | |
@@ -3547,7 +3550,9 class AMISRReader(ProcessingUnit): | |||
|
3547 | 3550 | return None |
|
3548 | 3551 | |
|
3549 | 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 | 3556 | dirnameList = [self.__selDates(x) for x in dirnameList] |
|
3552 | 3557 | dirnameList = filter(lambda x:x!=None,dirnameList) |
|
3553 | 3558 | if len(dirnameList)>0: |
@@ -3879,6 +3884,8 class AMISRReader(ProcessingUnit): | |||
|
3879 | 3884 | def setObjProperties(self): |
|
3880 | 3885 | self.dataOut.heightList = self.rangeFromFile/1000.0 #km |
|
3881 | 3886 | self.dataOut.nProfiles = self.radacHeaderObj.npulses |
|
3887 | self.dataOut.nRecords = self.radacHeaderObj.nrecords | |
|
3888 | self.dataOut.nBeams = self.radacHeaderObj.nbeams | |
|
3882 | 3889 | self.dataOut.ippSeconds = self.ippSeconds_fromfile |
|
3883 | 3890 | self.dataOut.timeInterval = self.dataOut.ippSeconds * self.dataOut.nCohInt |
|
3884 | 3891 | self.dataOut.frequency = self.frequency_h5file |
@@ -2081,6 +2081,24 class AMISRProc(ProcessingUnit): | |||
|
2081 | 2081 | def init(self): |
|
2082 | 2082 | if self.dataIn.type == 'AMISR': |
|
2083 | 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 | 2103 | class BeamSelector(Operation): |
|
2086 | 2104 | profileIndex = None |
General Comments 0
You need to be logged in to leave comments.
Login now