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 int
PARAM_INDEX_AMPLITUDE
static int
PARAM_INDEX_FREQUENCY
static int
PARAM_INDEX_PHASE
static java.lang.String
PARAM_NAME_AMPLITUDE
static java.lang.String
PARAM_NAME_FREQUENCY
static java.lang.String
PARAM_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 void
doFit()
performs the fit and stores the fitted function for further usage.cern.accsoft.steering.util.fit.SineFit.SineFunction
getLastFit()
cern.jdve.data.DataSet
getResultDataSet(cern.jdve.utils.DataRange range, int nPoints)
must return aDataSet
for the result of the fit.double
valueOf(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:DataViewerFit
must return aDataSet
for the result of the fit.- Specified by:
getResultDataSet
in 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
DataSet
ready 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
-
-