title: Data fit to Multivariate Gaussian Curve
body: <p>I have an image of a proton beam hitting a scintillator sheet. This image was filtered to a grey-scale 8-bit bmp file. I can use python/matlab to basically get a large list of data points, where each point consist of an <code>(x,y)</code> position and a <code>(z)</code> magnitude.</p>
  
  <p>Beam spot </p>
  
  <p><a href="https://i.stack.imgur.com/JyxDQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JyxDQ.jpg" alt="enter image description here"></a></p>
  
  <p>Zoomed in surface plot
  <a href="https://i.stack.imgur.com/rpYXW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rpYXW.jpg" alt="enter image description here"></a></p>
  
  <p>I want to model my <code>z</code> data with Gaussians, and then find the "Full Width at Half Max" of the curve. How can I fit multivariate Gaussians to my data? Is there such a package of Matlab/Python or any other way, code etc.?</p>