Package cnuphys.splot.fit
Class LineFit
java.lang.Object
com.nr.model.Fitab
cnuphys.splot.fit.LineFit
- All Implemented Interfaces:
IValueGetter
-
Field Summary
Fields inherited from class com.nr.model.Fitab
a, b, chi2, q, sig, siga, sigb, sigdat, x, y
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LineFit
Create a Error function Fit and perform the fit. This is for data with y errors only. If there are x errors too, use LinearExyFit.- Parameters:
fit
- the fit data- Throws:
IllegalArgumentException
-
-
Method Details
-
getSlope
public double getSlope()Get the slope of the fit- Returns:
- the slope of the fit
-
getIntercept
public double getIntercept()Get the intercept of the fit- Returns:
- the intercept of the fit
-
getSlopeSigma
public double getSlopeSigma()Get the error estimate in the slope- Returns:
- the error estimate in the slope
-
getInterceptSigma
public double getInterceptSigma()Get the intercept estimate- Returns:
- the intercept estimate
-
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 interfaceIValueGetter
-