jasext.hist.fitter
Class LeastSquaresFit
- java.lang.Object
-
- java.util.Observable
-
- jas2.hist.Fitter
-
- jasext.hist.fitter.LeastSquaresFit
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable, java.util.Observer
public class LeastSquaresFit extends Fitter
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jas2.hist.Fitter
FAILED, FIT, FITTING, NOTREADYTOFIT, OUTAHERE, READYTOFIT
-
-
Constructor Summary
Constructors Constructor and Description LeastSquaresFit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidfit(Fittable1DFunction func, double[] x, double[] y, double[] sigmaY)This algorithm based on CURFIT program from "Data Reduction and Error Analysis for the Physical Sciences" by Philip R Bevington, Page 237.doublegetChiSquared()double[]getParameterSigmas()-
Methods inherited from class jas2.hist.Fitter
fit, getData, getFunction, getState, run, setData, setFunction, start, stop, update
-
-
-
-
Method Detail
-
fit
public void fit(Fittable1DFunction func, double[] x, double[] y, double[] sigmaY) throws FitFailed
This algorithm based on CURFIT program from "Data Reduction and Error Analysis for the Physical Sciences" by Philip R Bevington, Page 237. It performs a least squared fit using the Marquardt algorithm.- Parameters:
func- The function to be fitx- The x values of the points to be fity- The y values of the points to be fitsigmaY- The errors (assumed symmetric) on the y values- Throws:
FitFailed- if the fit was not successful
-
getChiSquared
public double getChiSquared()
- Specified by:
getChiSquaredin classFitter
-
getParameterSigmas
public double[] getParameterSigmas()
- Specified by:
getParameterSigmasin classFitter
-
-
DataMelt 3.0 © DataMelt by jWork.ORG