comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Surface fit or 3d interpolation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Surface fit or 3d interpolation [message #1409] Mon, 22 November 1993 10:29 Go to next message
paz is currently offline  paz
Messages: 2
Registered: April 1993
Junior Member
Does anyone have a routine for a surface fit or 3d interpolation?
I'm trying to interpolate some pressure data from a wind tunnel test
to correlate with my analytical model.


Thanks,
Peter



paz@mickey.eng.gulfaero.com (This always works)
paz@gulfaero.com (This sometimes works)
paz@voyager.larc.nasa.gov (This works for the moment)
> INTERNET:paz@mickey.eng.gulfaero.com (From compuserve)



"This is a UNIX system. I know this." - Jurassic Park
Re: surface fit [message #3059 is a reply to message #1409] Tue, 08 November 1994 08:12 Go to previous messageGo to next message
buteau is currently offline  buteau
Messages: 9
Registered: September 1992
Junior Member
I don't understand what you mean by :

> One then is not fitting F(X,Y) but F(S). All one needs to do then is to write
> the definition of the function so that it can then determine X(S) and Y(S). A
> simple way to do this is through a common block.
Re: surface fit [message #3150 is a reply to message #3059] Wed, 09 November 1994 05:53 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
buteau@bali.saclay.cea.fr (A.Buteau 62 17) writes:

> I don't understand what you mean by :

>> One then is not fitting F(X,Y) but F(S). All one needs to do then is to
>> write the definition of the function so that it can then determine X(S) and
>> Y(S). A simple way to do this is through a common block.

O.K., here's a simple example. Suppose that one wanted to fit a
two-dimensional gaussian to a set of X-Y points, i.e.

F(X,Y) = A0 + A1*exp(-r^2/(2*sigma^2))

r^2 = (x-X0)^2 + (y-y0)^2

One would then write the function as follows:

FUNCTION GAUSS2, S, A, PDER
COMMON GAUSS2_COM, X_ARRAY, Y_ARRAY
X = X_ARRAY(S)
Y = Y_ARRAY(S)
R2 = (X - A(2))^2 + (Y - A(3))^2
F = A(0) + A1*EXP(-R2/(2.*A(4)^2))
PDER = ... ;Left as an exercise to the reader :^)
RETURN, F
END

Your actual measurement points are a series of X,Y pairs. These are stored as
X_ARRAY, Y_ARRAY in the GAUSS2_COM common block. S is simply an index array
running from 0 to one less than the number of points. If the measured values
at these points are Z, then one can call CURVEFIT as follows

Result = CURVEFIT(S, Z, W, A, SIGMAA, FUNCTION='GAUSS2')

Bill Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: axes on an image(FAQ?)
Next Topic: Re: How to calculate z=f(x,y) with loops

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 01:12:06 PDT 2025

Total time taken to generate the page: 0.80079 seconds