Class SineFit

  • All Implemented Interfaces:
    DataViewerFit

    public class SineFit
    extends java.lang.Object
    implements DataViewerFit
    This is the sine-function used for fitting.
    • 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 a DataSet for the result of the fit.
      double valueOf​(double[] params)  
      • Methods inherited from class java.lang.Object

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

      • SineFit

        public SineFit​(java.util.List<cern.jdve.utils.DisplayPoint> displayPoints)
        the default constructor. Initialize the points to where to fit to.
        Parameters:
        displayPoints - the points to fit the sine
    • 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 a DataSet for the result of the fit.
        Specified by:
        getResultDataSet in interface DataViewerFit
        Parameters:
        range - the Range for which to calculate the values for the fitted function
        nPoints - the amount of points to be calculated in the range
        Returns:
        the DataSet ready to display in the Chart
      • 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