Changeset 18109
- Timestamp:
- 06/04/14 13:44:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/interp/interp.py ¶
r17892 r18109 45 45 # create sub-vectors that just cover the limits of xi and yi 46 46 # TODO x,y not necessarily a grid, so need a better definition of dx,dy (e.g. average element size) 47 dx=x[1]-x[0] 48 dy=y[1]-y[0] 47 dx=500 48 dy=500 49 #dx=x[1]-x[0] 50 #dy=y[1]-y[0] 49 51 xlim=[min(xi)-dx,max(xi)+dx] 50 52 ylim=[min(yi)-dy,max(yi)+dy] … … 76 78 xyinterp=npy.dstack([xi,yi])[0] 77 79 xg,yg=npy.meshgrid(subx,suby) 78 xydata=npy.dstack([ xg.ravel(),yg.ravel()])[0]80 xydata=npy.dstack([subx,suby])[0] 79 81 tree=cKDTree(xydata) 80 82 nearest=tree.query(xyinterp)[1]
Note:
See TracChangeset
for help on using the changeset viewer.