This content has been marked as final.
Show 7 replies


2. Re: 2D Gauss fitting
796254 Sep 16, 2003 2:56 PM (in response to 796254)Sorry, I thought I'd answered this one somewhere else.
Check out "Numerical Recipes" by Bill Press et. al. It's got a lot of info on curve fitting.
What did a Google search bring you?  MOD

3. Re: 2D Gauss fitting
843853 Sep 17, 2003 8:33 AM (in response to 796254)Didn't find anything apropriate in the Numerical Recepies...
And in the google search only software sites show up... No 2D Gauss Fitting algorithm ! Is there any source in C, Java or MatLab out there ?
Felix 
4. Re: 2D Gauss fitting
843853 Sep 18, 2003 11:47 PM (in response to 843853)What about finding the means and standard deviations of the xs
and ys, and the correlation between them? Then the Gaussian is
given by the simple formula
if I remember rightly (but I would check it :)f(x, y) = exp( ((xxbar)/sx)^2 + 2*r*((xxbar)/sx)*((yybar)/sy) + ((yybar)/sy)^2 ) /((2*pi*sx*sy)*sqrt(1r^2))
If your matrix consists of frequencies, use weighted averages
etc. E.g. xbar = sum over rows (x * sum over columns (f[i,j]))),
sx = sqrt(sum over rows ((xxbar)^2 * sum over columns (f[i,j]))).
I assume the data is frequencies, but you don't say. 
5. Re: 2D Gauss fitting
843853 Sep 20, 2003 11:13 PM (in response to 843853)If your matrix consists of frequencies, use weighted
Sorry, I meant f[i, j] to be scaled so that there sum is 1.
averages
etc. E.g. xbar = sum over rows (x * sum over columns
(f[i,j]))),
sx = sqrt(sum over rows ((xxbar)^2 * sum over columns
(f[i,j]))).
I assume the data is frequencies, but you don't say.
Otherwise divide the averages by the sum of f[i, j]. 
6. Re: 2D Gauss fitting
843853 Nov 23, 2009 3:42 AM (in response to 843853)jhepwork http://jwork.org/jhepwork/ has an example
of how to fit 2D Gaussian using the chi2 minimisation 
7. Re: 2D Gauss fitting
791266 Nov 23, 2009 7:48 AM (in response to 843853)Sergei175 wrote:
Don't resurrect old threads. I'm locking this thread.
jhepwork http://jwork.org/jhepwork/ has an example
of how to fit 2D Gaussian using the chi2 minimisation
Kaj