[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: POLYWARP question.*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 14 Jun 1999 11:30:15 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <37652DDC.B1049555@fajnm1.am.ub.es>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:15184

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 --------------------------------------------------------------------------

**References**:**POLYWARP question.***From:*Octavi Fors

- Prev by Date:
**POLYWARP question.** - Next by Date:
**MPFIT improvements (speed)** - Prev by thread:
**POLYWARP question.** - Next by thread:
**MPFIT improvements (speed)** - Index(es):