

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.jscience.physics.nuclear.kinematics.math.analysis.spanc.CalibrationFit
public class CalibrationFit
Abstraction class for performing fits of channel versus rho data.
Constructor Summary  

CalibrationFit()
Creates new CalibrationFit object. 
Method Summary  

double 
calculateFit(int index)
Returns the QBrho value from the fit for the specified input peak. 
double 
getChannel0()
Returns the (unweighted) mean of the input peak centroids, which is used as the offset of the channel axis for the purposes of the fit. 
UncertainNumber 
getCoefficient(int i)
Returns the i'th order coefficient of the calibration fit and its uncertainty. 
double 
getCovariance(int i,
int j)
Gets a covariance matrix element. 
int 
getDataSize()
Returns the number of input peaks fitted to. 
int 
getDOF()
Returns the number of degrees of freedom in the fit, which is the number of input peaks minus the fit order minus 1. 
double 
getNormalizedResidual(int index)
Returns the normalized residual for an input peak, which is the residual divided by its error bar. 
int 
getOrder()
Gets the polynomial order of the calibration fit. 
double 
getPvalue()
Gives the probability that the calibration actually describes the input data. 
double 
getReducedChiSq()
Returns the calculated chisquare statistic divided by the degrees of freedom. 
double 
getResidual(int index)
Returns the residual for an input peak. 
UncertainNumber 
getRho(UncertainNumber channel)
Returns a rho value for a specified channel and uncertainty. 
boolean 
hasFit()
Returns true if input data have been received, a
fit order was set, and it was possible to do a fit with at least one
degree of freedom. 
boolean 
setOrder(int n)
Sets the fit order of the polynomial calibration, which causes the fit to be recalculated. 
java.lang.String 
toString()
Gives more or less complete information about the input data and calibration curve. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Constructor Detail 

public CalibrationFit()
Method Detail 

public boolean setOrder(int n) throws MathException
n
 order of the polynomial used to fit Ch. vs. QBrho
MathException
 if fit failspublic double getNormalizedResidual(int index)
index
 which input peak to get residual for
public boolean hasFit()
true
if input data have been received, a
fit order was set, and it was possible to do a fit with at least one
degree of freedom.
public UncertainNumber getCoefficient(int i)
i
 which order of coefficient to retrieve
public double getCovariance(int i, int j)
i
 row indexj
 column index
public int getOrder()
public double getResidual(int index)
index
 which input peak to get residual for
public int getDataSize()
public double calculateFit(int index)
index
 which input peak
public int getDOF()
public double getReducedChiSq()
public double getChannel0()
public UncertainNumber getRho(UncertainNumber channel) throws StatisticsException, MathException
channel
 centroid and uncertainty of a peak
StatisticsException
 if the calculation fails
MathException
 if the calculation failspublic double getPvalue()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 