FindPeak performs a peak scan, reports a fit, and can optionally re-zero a scanned motor. The data from a peak scan can be re-fit using the refit command. The uncertainties reported for fit parameters do not account for any systematic fit errors. These uncertainties are solely based on the variances expected from fitting the given function to Poisson-distributed data points. For efficiency, you can provide a range, step-size, and count as positional arguments to perform a centered scan around the current position. Otherwise, you must use the keyword arguments to specify your scan.
Let's take the following command as an example,
This FindPeak command will scan sampleTheta around the center position 2 with a range of 10 for 10 points. At each point, the command will count until the areaDetector's region of interest exceeeds 2000, but will fit the monitor counts to a quadratic function. When finished, the command will automatically move to the fitted position and correct sampleTheta's zero.
The above command will scan a with a range of 5 and step size of 1 around the current position of sampleAngle, counting for 1 second at each point.
NOTE: If you need to do a peak scan while against multiple motors simultaneously, use findPeakMulti.
See the Appendix for positional and keyword argument and flag usage.