Class CurveFitScanRunner
java.lang.Object
gda.factory.FindableBase
uk.ac.gda.server.exafs.scan.preparers.CurveFitScanRunner
- All Implemented Interfaces:
Findable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfitData()Perform Gaussian fit to the currently cached data Name of scannableToMove is the name of the x values.doubledoubledoublevoidrunAndMove(double centrePosition) Run a scan at centrePosition usingrunScan(double), find the peak value usingfitData(), then move the scannable to the peak positionvoidrunScan(double centrePosition) 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 commandvoidsetDetectorArgs(List<Object> detectorList) voidsetFitDataName(String name) voidsetRelativeEnd(double relativeEnd) voidsetRelativeStart(double relativeStart) voidsetScannableToMove(Scannable xesEnergyScannable) voidsetStepSize(double stepSize) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
CurveFitScanRunner
public CurveFitScanRunner()
-
-
Method Details
-
runAndMove
Run a scan at centrePosition usingrunScan(double), find the peak value usingfitData(), then move the scannable to the peak position- Parameters:
centrePosition-- Throws:
Exception
-
runScan
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
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:
Gaussianobject containing fitted parameters (fitted centre position, FWHM, area)
-
getScannableToMove
-
setScannableToMove
-
getDetectorArgs
-
setDetectorArgs
-
setFitDataName
-
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
-