General Scans

hxrsnd.plans.scans.linear_scan(motor, start, stop, num, use_diag=True, return_to_start=True, md=None, *args, **kwargs)[source]

Linear scan of a motor without a detector.

Performs a linear scan using the inputted motor, optionally using the diagnostics, and optionally moving the motor back to the original start position. This scan is different from the regular scan because it does not take a detector, and simply scans the motor.

Parameters:
motorobject

any 'setable' object (motor, temp controller, etc.)

startfloat

starting position of motor

stopfloat

ending position of motor

numint

number of steps

use_diagbool, optional

Include the diagnostic motors in the scan.

mddict, optional

metadata

hxrsnd.plans.scans.centroid_scan(detector, motor, start, stop, steps, average=None, detector_fields=['stats2_centroid_x', 'stats2_centroid_y'], motor_fields=None, system=None, system_fields=None, filters=None, return_to_start=True, *args, **kwargs)[source]

Performs a scan and returns the centroids of the inputted detector.

The returned centroids can be absolute or relative to the initial value. The values are returned in a pandas DataFrame where the indices are the target motor positions.

Parameters:
detectorBeamDetector

Detector from which to take the value measurements

motorMotor

Main motor to perform the scan

startfloat

Starting position of motor

stopfloat

Ending position of motor

stepsint

Number of steps to take

averageint, optional

Number of averages to take for each measurement

detector_fieldsiterable, optional

Fields of the detector to add to the returned dataframe

motor_fieldsiterable, optional

Fields of the motor to add to the returned dataframe

systemlist, optional

Extra devices to include in the datastream as we measure the average

system_fieldslist, optional

Fields of the extra devices to add to the returned dataframe

filtersdict, optional

Key, callable pairs of event keys and single input functions that evaluate to True or False. For more infromation see apply_filters()

return_to_startbool, optional

Move the scan motor back to its initial position after the scan

Returns:
dfpd.DataFrame

DataFrame containing the detector, motor, and system fields at every step of the scan.