Hi Matt, Thanks a lot for the help.
I can run the example in the code perfectly but I'm running into some nan's when I try it on my data. I think this may because of the way I'm defining the x and y grids. If the x and y data, run from $xmin to $xmax and $ymin to $ymax and I want to grid that onto an $n x $n grid, should I be defining $xgrid and $ygrid as follows: $xgrid=$xmin + xvals($n,$n)*$delta_x $ygrid=$ymin + yvals($n,$n)*$delta_y where $delta_x = ($xmax-$xmin)/$n and $delta_y = ($ymax-$ymin)/$n? Thanks again, Steve Matthew Kenworthy wrote: > Hi Steve, > > I've attached my implementation of minimum curve fitting, munged from > the IDL routine of the same name. I've usually saved it as > min_curve_surf.pdl and then used PDL::AutoLoader to pull it in, but > you can just add the file to the end of your PDL script if it's a one > off use. > > Read the comments and examples at the top of the file to get an idea of usage. > > This takes x,y,z points, and a set of x,y points you want to > interpolate to, and returns the interpolated z points. > > One word of warning: It's pretty slow, but it does seem to work well > and it gives pleasing interpolated surfaces. > > Let me know how you get on with it! > > Cheers, > > Matt > > On Thu, Apr 30, 2009 at 7:34 AM, Steve Longmore > <[email protected]> wrote: > >> Hi, >> >> I'm trying to grid an irregularly sampled data set onto a linear 2D grid >> but am struggling to find a function to do this. I was hoping someone >> could point me to a simple way of doing this. >> > > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
