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

Home » Public Forums » archive » Re: POLYWARP question.
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
Re: POLYWARP question. [message #15784] Mon, 14 June 1999 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Octavi Fors <octavi@fajnm1.am.ub.es> writes:
>
> Hi everybody,
>
> this is regarding POLYWARP function, in particular DEGREE argument. As
> far as I
> understood by the Online Help, POLYWARP accepts the following polynomial
> models
> depending on the value of DEGREE:
>
> ... details omitted ...
>
> This is fine, but poor in flexibility: what happens if I want to
> consider a model like this, which acounts for 1st. degree crossed XY
> terms and 2nd. degree in X and Y?
>
> Xi = kx00 + kx01 Xo + kx10 Yo + kx11 XoYo + kx02Xo2+ kx20Yo2
> Yi = ky00 + ky01 Xo + ky10 Yo + ky11 XoYo + ky02Xo2+ ky20Yo2
>
>
> Does anybody know any implementation/patch of POLYWARP which permits
> more freedom in considering
> coeficients to obtain?

You may be asking for too much. I think routines such as POLYWARP
implement a simple matrix inversion (Kramer's rule?) to determine the
polynomial coefficients, and thus you are stuck with all coefficients.
The polynomial you are interested in fitting is degree two, with a
bunch of terms "missing", ie coefficients are to be forced to zero.

Since the source code is available in POLYWARP.PRO, you may be able to
modify this to your needs. I can't help you there.

I recommend however that you may be able to solve your problem more
straightforwardly by a curve fitting procedure where you explicitly
write out the polynomial you are interested in fitting. Your options
are:

CURVEFIT - simple, fast - IDL distribution
LMFIT - simple, slow - IDL distribution
MPFITFUN - robust, medium speed -
http://cow.physics.wisc.edu/~craigm/idl/idl.html (get MPFIT and MPFITFUN)

Best of luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MPFIT improvements (speed)
Next Topic: Re: Set Precision???????????

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

Current Time: Wed Oct 08 19:05:15 PDT 2025

Total time taken to generate the page: 0.00512 seconds