Class FittingUtils

java.lang.Object
org.dawnsci.plotting.tools.fitting.FittingUtils

public class FittingUtils extends Object
  • Constructor Details

    • FittingUtils

      public FittingUtils()
  • Method Details

    • getInitialPeaks

      public static Add getInitialPeaks(org.eclipse.january.dataset.Dataset xDataSet, org.eclipse.january.dataset.Dataset yDataSet, Integer nPeaks, Class<? extends IPeak> peakClass)
    • getSeededPeakFit

      public static Add getSeededPeakFit(List<IdentifiedPeak> foundPeaks, org.eclipse.january.dataset.Dataset xDataSet, org.eclipse.january.dataset.Dataset yDataSet, Class<? extends IPeak> peakClass)
      A variate that takes a already fittin set of found peaks Number of peaks fitted based on the found peaks size
      Parameters:
      foundPeaks -
      xDataSet -
      yDataSet -
      peakClass -
      Returns:
    • getFittedPeaks

      public static FittedFunctions getFittedPeaks(FittedPeaksInfo info) throws Exception
      This method runs a fit on data passed in. It reads preferences to determine which algorithm etc. the user prefers. It can take a while to run. Callers of these utils should protect the call by running it from a Job. This method is UI thread safe and may be called in any thread. The x and y data may have been sliced if the user has completed a selection choice which limits the peak fit range. The RegionBounds returns are not computed in y. Instead the peak fitter provides the y values as zero. So XAXIS regions should be created, then Y data is not required. The method also computes x,y abstract data set pairs which are plot fragments for the function plotted over the peak region. These can be plotted to show the user the fitted function, which they may wish to adjust.
      Returns:
      Throws:
      Exception
    • getQ

      public static javax.vecmath.Vector3d getQ(FittedPeaksInfo info, FittedFunction p)
    • getIdentifiedPeaks

      public static List<IdentifiedPeak> getIdentifiedPeaks(FittedFunctions fittedPeaks, org.eclipse.january.dataset.Dataset x, org.eclipse.core.runtime.IProgressMonitor monitor) throws Exception
      Throws:
      Exception
    • getPeaksRequired

      public static int getPeaksRequired()
    • getSmoothing

      public static int getSmoothing()
      TODO
      Returns:
    • getOptimizer

      public static IOptimizer getOptimizer()
    • getPeakClass

      public static Class<? extends IPeak> getPeakClass()
    • getPolynomialOrderRequired

      public static int getPolynomialOrderRequired()
    • getFittedPolynomial

      public static FittedFunctions getFittedPolynomial(FittedPeaksInfo info) throws Exception
      Throws:
      Exception