Re: [Matplotlib-users] speeding-up griddata()

2009-07-27 Thread Denis-B

stack in interpolate_one might be the time hog; I see claims that plain
vector is faster.
StackVectorint, 128 in
http://stackoverflow.com/questions/354442/looking-for-c-stl-like-vector-class-but-using-stack-storage
 
looks nice, but I haven't timed it myself.
cheers
  -- denis
-- 
View this message in context: 
http://www.nabble.com/speeding-up-griddata%28%29-tp24467055p24679147.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] speeding-up griddata()

2009-07-24 Thread Denis-B



Jeff Whitaker wrote:
 
 
 Denis:  I have added an 'interp' keyword to griddata (svn revision 7287) 
 so you can choose the faster linear interpolation with interp='linear'.  
 
 

Thanks Jeff,
   that was quick.  Do you also see linear wy faster than NN, factor 100
?!
(Fwiw, a quick run of the Mac Shark profiler shows lots of time in
NaturalNeighbors::interpolate_one
which uses stdlib stacks heavily -- overkill for tiny stacks.)

Did my last question on Ntri - Ngrid - Npix make any sense at all ?
It would be nice if one could go straight from a triangulation to pixels --
will ask AGG.

cheers
  -- denis


-- 
View this message in context: 
http://www.nabble.com/speeding-up-griddata%28%29-tp24467055p24646383.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] speeding-up griddata()

2009-07-21 Thread Denis-B

Robert C, Robert K, folks,

  messing with the nice delaunay/testfuncs.py to time
linear_interpolate_grid nn_interpolate_grid and nn_interpolate_unstructured
in _delaunay, I see linear ~ 100 times faster than the nn_ s:

# from: trigrid Ntri=1000 Ngrid=100  run: 21 Jul 2009 17:33  mac 10.4.11 ppc

time: 0.027 sec trigrid: build Triangulation 1000
time: 0.0059 sec trigrid 100 linear  corners: 0 1 2 1
time: 0.5 sec trigrid 100 nn_grid  corners: 0 1 2 1
time: 0.49 sec trigrid 100 nn_unstruct  corners: 0 1 2 1

Correct me: if all 3 methods do gridpoint-to-triangle in the same way, 
then the huge diff is in find-neighboring-triangles (6 on average ?), not in
gridpoint-to-triangle ?

This is with the _delaunay.so that comes with the mac 98.5.3 egg,
however that was compiled (-O3 ?)


What to do ?

1) does it matter, how many people care ? (all who believe in telekinesis,
raise my right hand)

2) natgrid ? don't see it in matplotlib.sf.net

3) stick with fast linear, smooth the triangle planes a la 3t^2 - 2t^3  or
fancier smoothing

In any case, add griddata( ... method = linear / nn ... ) so users have
a choice.

Can a real user or two tell us about the flow,
with some rough numbers for Ntri Ngrid Npix --
Ntri = nr original sample points, say 1000
Ngrid 100 x 100
Npix 800 x 600 ?
(Ntri - Ngrid slowly and accurately,
then Ngrid - Npix w fast inaccurate image interpolation ? hmm.)

cheers
  -- denis

-- 
View this message in context: 
http://www.nabble.com/speeding-up-griddata%28%29-tp24467055p24591133.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users