[GRASS-SVN] r50490 - grass-addons/grass6/raster/r.ipso
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 27 05:19:27 EST 2012
Author: madi
Date: 2012-01-27 02:19:27 -0800 (Fri, 27 Jan 2012)
New Revision: 50490
Modified:
grass-addons/grass6/raster/r.ipso/r.ipso.py
Log:
improved compatibility with windows
Modified: grass-addons/grass6/raster/r.ipso/r.ipso.py
===================================================================
--- grass-addons/grass6/raster/r.ipso/r.ipso.py 2012-01-27 10:13:41 UTC (rev 50489)
+++ grass-addons/grass6/raster/r.ipso/r.ipso.py 2012-01-27 10:19:27 UTC (rev 50490)
@@ -50,6 +50,8 @@
import sys
import os
+import matplotlib #required by windows
+matplotlib.use('wx') #required by windows
import matplotlib.pyplot as plt
import grass.script as grass
import numpy as np
@@ -117,7 +119,7 @@
def findint(kl,f):
Xf = np.abs(kl-f); Xf = np.where(Xf==Xf.min())
- z1 , z2 , f1 , f2 = kl[float(Xf[0])][0] , kl[float(Xf[0]-1)][0] , kl[float(Xf[0])][1] , kl[float(Xf[0]-1)][1]
+ z1 , z2 , f1 , f2 = kl[float(Xf[0])][0] , kl[float(Xf[0]-1)][0] , kl[float(Xf[0])][1] , kl[float(Xf[0]-1)][1]
z = z1 + ((z2 - z1) / (f2 - f1)) * (f - f1)
return z
More information about the grass-commit
mailing list