org.das2.qds.util.LinFit

Linear Fit routine. This will allow errors on the Y values, and will report chi squared. Borrowed from pamguard, https://sourceforge.net/projects/pamguard/.

LinFit( QDataSet x, QDataSet y )

do fit with uniform weights or weight=0 where fill is found.

LinFit( QDataSet x, QDataSet y, QDataSet sig )

do fit with weights. X and Y must not contain fill where sig>0.


getA

getA( ) → double

return the result A, the intercept, of the fit y = A + B * x

Returns:

the result A of the fit y = A + B * x

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getB

getB( ) → double

return the result B, the slope, of the fit y = A + B * x

Returns:

the result B of the fit y = A + B * x

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getChi2

getChi2( ) → double

return the Chi-Squared result from the fit.

Returns:

the Chi-Squared result from the fit.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getIntercept

getIntercept( ) → Datum

return the intercept (A of linear fit equation) as a datum with units of y.

Returns:

a Datum

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getQ

getQ( ) → double

Returns:

double

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSiga

getSiga( ) → double

Returns:

double

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSigb

getSigb( ) → double

Returns:

double

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSlope

getSlope( ) → Datum

return the slope (B of linear fit equation) as a datum with units of Yunits/Xunits. Note the current version of the library is unable to do many unit calculations.

Returns:

the slope as a Datum with units.

[search for examples] [view on GitHub] [view on old javadoc] [view source]