Package cern.accsoft.steering.util.fit
Class SineFit
- java.lang.Object
-
- cern.accsoft.steering.util.fit.SineFit
-
- All Implemented Interfaces:
DataViewerFit
public class SineFit extends java.lang.Object implements DataViewerFit
This is the sine-function used for fitting.
-
-
Field Summary
Fields Modifier and Type Field Description static intPARAM_INDEX_AMPLITUDEstatic intPARAM_INDEX_FREQUENCYstatic intPARAM_INDEX_PHASEstatic java.lang.StringPARAM_NAME_AMPLITUDEstatic java.lang.StringPARAM_NAME_FREQUENCYstatic java.lang.StringPARAM_NAME_PHASE
-
Constructor Summary
Constructors Constructor Description SineFit(java.util.List<cern.jdve.utils.DisplayPoint> displayPoints)the default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFit()performs the fit and stores the fitted function for further usage.cern.accsoft.steering.util.fit.SineFit.SineFunctiongetLastFit()cern.jdve.data.DataSetgetResultDataSet(cern.jdve.utils.DataRange range, int nPoints)must return aDataSetfor the result of the fit.doublevalueOf(double[] params)
-
-
-
Field Detail
-
PARAM_NAME_AMPLITUDE
public static final java.lang.String PARAM_NAME_AMPLITUDE
- See Also:
- Constant Field Values
-
PARAM_NAME_FREQUENCY
public static final java.lang.String PARAM_NAME_FREQUENCY
- See Also:
- Constant Field Values
-
PARAM_NAME_PHASE
public static final java.lang.String PARAM_NAME_PHASE
- See Also:
- Constant Field Values
-
PARAM_INDEX_AMPLITUDE
public static final int PARAM_INDEX_AMPLITUDE
- See Also:
- Constant Field Values
-
PARAM_INDEX_FREQUENCY
public static final int PARAM_INDEX_FREQUENCY
- See Also:
- Constant Field Values
-
PARAM_INDEX_PHASE
public static final int PARAM_INDEX_PHASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
valueOf
public double valueOf(double[] params)
-
getResultDataSet
public cern.jdve.data.DataSet getResultDataSet(cern.jdve.utils.DataRange range, int nPoints)Description copied from interface:DataViewerFitmust return aDataSetfor the result of the fit.- Specified by:
getResultDataSetin interfaceDataViewerFit- Parameters:
range- the Range for which to calculate the values for the fitted functionnPoints- the amount of points to be calculated in the range- Returns:
- the
DataSetready to display in theChart
-
doFit
public void doFit()
performs the fit and stores the fitted function for further usage.
-
getLastFit
public cern.accsoft.steering.util.fit.SineFit.SineFunction getLastFit()
- Returns:
- the lastFit
-
-