# Help with the 3D gaussian function

1. Oct 18, 2011

### PythagoreLove

Hi,
I need help with the gaussian function in 3D. I'm using the form:
z=A*exp( (x-xo)^2/(2σx^2)+(y-yo)^2/(2σy^2))

I know that A is the amplitude and xo,yo are the center coordinate.

I found that formula on http://en.wikipedia.org/wiki/Gaussian_function and they say that σx and σy are the spread of the blob. But if I put σx=σy=1, the function is from -3 to 3... Why is that ?

2. Oct 18, 2011

### phyzguy

They only plotted it from -3 to 3. It extends to +/-infinity in both x and y, but once |x-x0|/sigmax is much larger than 3.0, the value of the function is very close to zero.

3. Oct 18, 2011

### PythagoreLove

But is there a pretty good way to find σx and σy, graphically speaking. I have a gaussian curve and want to find what is the function.

4. Oct 18, 2011

### phyzguy

A good way is to use FWHM(Full Width at Half Maximum). In other words, you measure the width of the curve at half of the peak value. This is then easily converted into sigma using the formula on this page:

http://en.wikipedia.org/wiki/Fwhm

Since you have a 2D Gaussian, you need to measure the FWHM in the x-direction with y=y0 to find sigmax, then do the same in the y-direction with x=x0 to find sigmay.