Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

4. FindPeak command

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.

Created June 18, 2019, Updated July 18, 2019