Class GaussianFit

java.lang.Object
com.nr.model.Fitmrq
cnuphys.splot.fit.GaussianFit
All Implemented Interfaces:
IValueGetter

public class GaussianFit extends com.nr.model.Fitmrq implements IValueGetter
For fitting a sum of Gaussians to a curve (DataColumn)
Author:
heddle
  • Constructor Details

  • Method Details

    • initialGuess

      public static double[] initialGuess(Fit fit)
      A method to generate an initial guess
      Parameters:
      xx - the x data
      yy - the y data
      numGauss - the number of gaussians
      Returns:
    • secondaryInitialGuess

      public static double[] secondaryInitialGuess(Fit fit)
      A method to generate an initial guess
      Parameters:
      xx - the x data
      yy - the y data
      numGauss - the number of gaussians
      Returns:
    • getFitParameters

      public double[] getFitParameters()
      Get the fit parameters
      Returns:
      the fit parameters
    • getCovarianceMatrix

      public double[][] getCovarianceMatrix()
      Get the covariance matrix
      Returns:
      the covariance matrix
    • getChiSquare

      public double getChiSquare()
      Get the chi square of the fit
      Returns:
      the chi square
    • value

      public double value(double x)
      Specified by:
      value in interface IValueGetter