##// END OF EJS Templates
Optimizacion en el metodo de seleccion de alturas
Miguel Valdez -
r242:27479dac0eb3
parent child
Show More
@@ -292,20 +292,20 class VoltageProc(ProcessingUnit):
292
292
293 minIndex = 0
293 minIndex = 0
294 maxIndex = 0
294 maxIndex = 0
295 data = self.dataOut.heightList
295 heights = self.dataOut.heightList
296
296
297 for i,val in enumerate(data):
297 inda = numpy.where(heights >= minHei)
298 if val < minHei:
298 indb = numpy.where(heights <= maxHei)
299 continue
300 else:
301 minIndex = i;
302 break
303
299
304 for i,val in enumerate(data):
300 try:
305 if val <= maxHei:
301 minIndex = inda[0][0]
306 maxIndex = i;
302 except:
307 else:
303 minIndex = 0
308 break
304
305 try:
306 maxIndex = indb[0][-1]
307 except:
308 maxIndex = len(heights)
309
309
310 self.selectHeightsByIndex(minIndex, maxIndex)
310 self.selectHeightsByIndex(minIndex, maxIndex)
311
311
General Comments 0
You need to be logged in to leave comments. Login now