title: SciPy - fit a Gaussian envelope
body: <p>I have a numerically calculated light pulse's temporal shape, stored in a NumPy array. I'd like to find the parameters (specifically, the FWHM) of it's Gaussian envelope function, but for that first I have to fit it.<br>
  Is there a built-in SciPy function, or set of functions, for envelope fitting, or I have to write this code myself? (As accuracy is not too important, I'd probably just take the local maxes and fit a Gaussian on them...)</p>
  
  <p>The light pulse looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/nbG8d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nbG8d.png" alt="The light pulse in question"></a></p>