Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with the 3D gaussian function

  1. Oct 18, 2011 #1
    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. jcsd
  3. Oct 18, 2011 #2


    User Avatar
    Science Advisor

    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.
  4. Oct 18, 2011 #3
    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.
  5. Oct 18, 2011 #4


    User Avatar
    Science Advisor

    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:


    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook