Class ImageFitter

java.lang.Object
uk.ac.diamond.scisoft.diffraction.powder.ImageFitter

public class ImageFitter extends Object
Direct conversion of I12 Matlab fit_image8.m

Used to find the beam centre from the ellipse major axis length and centre co-ordinates (equations 14 and 16 in J Appl Cryst (2013) 46 1249)

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double[]
    fit(org.eclipse.january.dataset.Dataset major, org.eclipse.january.dataset.Dataset x, org.eclipse.january.dataset.Dataset y, double[] line, double pixel)
    Uses a NelderMeadSimplex with bounds on the beam centre position.

    Methods inherited from class java.lang.Object

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

    • ImageFitter

      public ImageFitter()
  • Method Details

    • fit

      public static double[] fit(org.eclipse.january.dataset.Dataset major, org.eclipse.january.dataset.Dataset x, org.eclipse.january.dataset.Dataset y, double[] line, double pixel)
      Uses a NelderMeadSimplex with bounds on the beam centre position. Best initial parameters are calculated fitting a range of x-centre values.

      Returns a double array containing the x and y positions, the x used to calculate y using the equation fitted earlier

      Parameters:
      major -
      x -
      y -
      line -
      pixel -
      Returns:
      mc