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

Home » Public Forums » archive » Re: Fitting an ellipsoid with MPFITEXPR
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: Fitting an ellipsoid with MPFITEXPR [message #74264] Mon, 10 January 2011 04:54
johan[1] is currently offline  johan[1]
Messages: 11
Registered: December 2010
Junior Member
On Jan 9, 1:27 am, "Phillip M. Bitzer" <phillipbit...@gmail.com>
wrote:
> Ronn Kling has a routine that may be of some help. See:
>
> http://www.kilvarock.com/cool-stuff.htm

On Jan 9, 1:27 am, "Phillip M. Bitzer" <phillipbit...@gmail.com>
wrote:
> Ronn Kling has a routine that may be of some help. See:
>
> http://www.kilvarock.com/cool-stuff.htm

Thanks for both replies. I used the routines from Ronn Kling for some
time but I do have a problem with it. The values for both the size of
the axis and the angles do not seems to be right but if I use the
calculated second moment values, P, together with k=2 as follow:

theta: 0deg -> 360deg
psi: -90deg -> 90deg
u = [sin(theta)*cos(psi), cos(theta)*cos(psi), sin(psi)]
r = k/sqrt((u # invert(P) # u))

I was able to get the right size and shape of the ellispsoid but still
needed the angles.

The routine mpfitellipse.pro is unfortunately only for 2-D. I did try
to extend it to 3D. Again, the size of the axes are incorrect in my
implementation but in this case the angles are correct!

When I created a "combined" routine by calculating the second moments
and using the angles from the 3D implementation of mpfitellipse.pro I
am able to get the desired result.

This will work for me but I feel uncomfortable with the fact that I do
not get all the correct parameters from either Ron Kling's
krEllipsoidFit or the 3D implementation of mpfitellipse, feeling
something must be wrong and my implementation will not stand the test
of time!
Re: Fitting an ellipsoid with MPFITEXPR [message #74266 is a reply to message #74264] Sat, 08 January 2011 17:27 Go to previous message
phillipbitzer is currently offline  phillipbitzer
Messages: 6
Registered: November 2007
Junior Member
Ronn Kling has a routine that may be of some help. See:

http://www.kilvarock.com/cool-stuff.htm
Re: Fitting an ellipsoid with MPFITEXPR [message #74273 is a reply to message #74266] Fri, 07 January 2011 16:19 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 7, 9:53 pm, johan <j...@skvera.co.uk> wrote:
> I need to fit an ellipsoid to data acquired.

What about

http://www.physics.wisc.edu/~craigm/idl/down/mpfitellipse.pr o

?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Read large ascii file quickly
Next Topic: Re: FINDFILE problems IDL 8 LINUX

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

Current Time: Wed Oct 08 19:18:42 PDT 2025

Total time taken to generate the page: 0.00481 seconds