code: def gaussian(self, x, p):
          
          y = (1.0 / (p[1] * np.sqrt(2 * np.pi)) *
               np.exp(-(x - p[0]) ** 2 / (2 * p[1] ** 2))) * p[2]
          return y
docs: Gaussian fitting function in 1D.  Makes a sine function with
          amplitude determined by maxv.  See calc_fwhm().
  
          p[0]==mean, p[1]==sdev, p[2]=maxv