Class CurveFitScanRunner

java.lang.Object
gda.factory.FindableBase
uk.ac.gda.server.exafs.scan.preparers.CurveFitScanRunner
All Implemented Interfaces:
Findable

public class CurveFitScanRunner extends FindableBase
Class to run a step scan using, perform a peak fit and then move the scannable to the peak energy. Data is from the scan is cached using a DataPointCache object, to avoid needing to read from hdf file.
  • Scan range used is relative to a centre position (centrePosition+relativeStart to centrePosition+relativeEnd).
  • Detectors used during scan are set the detectorArgs list. Typically a detector object followed by a collection time.
  • Curve fit is done using a Gaussian profile (using the CurveFitting class).
    • Constructor Details

      • CurveFitScanRunner

        public CurveFitScanRunner()
    • Method Details

      • runAndMove

        public void runAndMove(double centrePosition) throws Exception
        Run a scan at centrePosition using runScan(double), find the peak value using fitData(), then move the scannable to the peak position
        Parameters:
        centrePosition -
        Throws:
        Exception
      • runScan

        public void runScan(double centrePosition) throws Exception
        Run scan :
      • range is from centreEnergy+relativeStart to centreEnergy+relateiveEnd using steps of 'stepSize'
      • The detectorArgs list are appended to the step parameters to get the complete scan command
      • Parameters:
        centrePosition -
        Throws:
        Exception
      • fitData

        public Gaussian fitData()
        Perform Gaussian fit to the currently cached data
      • Name of scannableToMove is the name of the x values.
      • fitDataName parameter gives name of the y values to be fitted. If this is not set, then name of the first detector in detectorArgs is used.
      • Returns:
        Gaussian object containing fitted parameters (fitted centre position, FWHM, area)
      • getScannableToMove

        public Scannable getScannableToMove()
      • setScannableToMove

        public void setScannableToMove(Scannable xesEnergyScannable)
      • getDetectorArgs

        public List<Object> getDetectorArgs()
      • setDetectorArgs

        public void setDetectorArgs(List<Object> detectorList)
      • setFitDataName

        public void setFitDataName(String name)
      • getFitDataName

        public String getFitDataName()
      • getRelativeStart

        public double getRelativeStart()
      • setRelativeStart

        public void setRelativeStart(double relativeStart)
      • getRelativeEnd

        public double getRelativeEnd()
      • setRelativeEnd

        public void setRelativeEnd(double relativeEnd)
      • getStepSize

        public double getStepSize()
      • setStepSize

        public void setStepSize(double stepSize)
      • getCurveFitter

        public CurveFitting getCurveFitter()