@@ -29,12 +29,12 class matoffReader(ProcessingUnit): | |||||
29 | def __setHeader(self, datastuff): |
|
29 | def __setHeader(self, datastuff): | |
30 |
|
30 | |||
31 | self.dataOut.pairsList=[(0,1)] |
|
31 | self.dataOut.pairsList=[(0,1)] | |
32 |
self.dataOut.channelList = range( |
|
32 | self.dataOut.channelList = range(np.array(datastuff.get('power')).shape[1]) | |
33 |
self.dataOut.nProfiles = |
|
33 | self.dataOut.nProfiles = len(np.array(datastuff.get('vel')).flatten()) #this! | |
34 |
self.dataOut.nIncohInt = |
|
34 | self.dataOut.nIncohInt = 20 | |
35 | self.dataOut.nCohInt = 1 #this! |
|
35 | self.dataOut.nCohInt = 1 #this! | |
36 | self.dataOut.ippSeconds = 0.004 #this! |
|
36 | self.dataOut.ippSeconds = 0.004 #this! | |
37 | self.dataOut.nFFTPoints = 25 |
|
37 | self.dataOut.nFFTPoints = len(np.array(datastuff.get('vel')).flatten()) | |
38 | self.dataOut.timeZone = 0 |
|
38 | self.dataOut.timeZone = 0 | |
39 | self.dataOut.heightList = np.array(datastuff.get('hts')).flatten() |
|
39 | self.dataOut.heightList = np.array(datastuff.get('hts')).flatten() | |
40 |
|
40 | |||
@@ -118,6 +118,14 class matoffReader(ProcessingUnit): | |||||
118 | print "No directories found" |
|
118 | print "No directories found" | |
119 | return [] |
|
119 | return [] | |
120 |
|
120 | |||
|
121 | #if self.online: | |||
|
122 | # dirList= [dirList[-1]] | |||
|
123 | ||||
|
124 | if self.online: | |||
|
125 | currentdate = datetime.datetime.utcnow().date() | |||
|
126 | strsplit1=currentdate.strftime('%Y.%m.%d') | |||
|
127 | dirList = fnmatch.filter(dirList,strsplit1+'*') | |||
|
128 | ||||
121 | for thisDir in dirList: |
|
129 | for thisDir in dirList: | |
122 | if not os.path.isdir(os.path.join(path, thisDir)): |
|
130 | if not os.path.isdir(os.path.join(path, thisDir)): | |
123 | continue |
|
131 | continue | |
@@ -160,7 +168,7 class matoffReader(ProcessingUnit): | |||||
160 |
|
168 | |||
161 | return fileListFiltered |
|
169 | return fileListFiltered | |
162 |
|
170 | |||
163 |
def __getNextOnlineFile(self, seconds = |
|
171 | def __getNextOnlineFile(self, seconds = 40): | |
164 |
|
172 | |||
165 | filename = self.__getNextOfflineFile() |
|
173 | filename = self.__getNextOfflineFile() | |
166 |
|
174 | |||
@@ -181,7 +189,7 class matoffReader(ProcessingUnit): | |||||
181 | break |
|
189 | break | |
182 |
|
190 | |||
183 | print "Waiting %d seconds ..." %seconds |
|
191 | print "Waiting %d seconds ..." %seconds | |
184 |
time.sleep( |
|
192 | time.sleep(40) | |
185 |
|
193 | |||
186 | if not (len(filelist) > ncurrentfiles): |
|
194 | if not (len(filelist) > ncurrentfiles): | |
187 | return None |
|
195 | return None |
General Comments 0
You need to be logged in to leave comments.
Login now