[SciPy-User] fitting a 2D rotated gauss

Robert Robert robertrobert93@yahoo....
Tue Mar 8 03:10:48 CST 2011


Hello all,
I was looking at the scipy cookbook and found a code for fitting 2D gauss. The 
code I found in the cookbook was for a not rotated 2D gauss. It points to 
another code which could be found through the following link
http://code.google.com/p/agpy/source/browse/trunk/agpy/gaussfitter.py
This code found at the link, says to be able to fit a rotated 2D Gauss. What I 
don't understand of the code found at the given link is that when it calculates 
the guess parameters for the 2D rotated gauss it always returns 0.0 degrees. How 
is this possible. I tried out the code myself, generated a rotated gauss and 
then let the function moments() in the code calculate the guess parameters. I 
don't seem to get the correct sigma x , sigma y and the rotation back. The 
rotation seems to be 0.0, as I expected, looking at the code. I was wondering if 
this is an error in the code or that the guess rotation is always zero ??
I hope someone can please help me out with this question.
regards,
pim



      


More information about the SciPy-User mailing list