Created
March 17, 2018 18:09
-
-
Save chiahaoliu/a07afa2bb0d3ec0ac5af17c5ab542783 to your computer and use it in GitHub Desktop.
1D line scan on area detector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bluesky.plans as bp | |
import bluesky.preprocessors as bpp | |
from bluesky.callbacks import LiveTable | |
from xpdacq.beamtime import _configure_area_det | |
# configure to 5s | |
_configure_area_det(5) | |
# move ``ss_stg2_x`` motor from -1mm to +1mm in 5 steps, relative to current position (it will move back after scan) | |
# Note: ``diff_x`` is the diffractometer in x direction | |
# ``ss_stg2_x`` is the sample stage (on goniometer) | |
myplan = bp.rel_scan([pe1c, ss_stg2_x], ss_stg2_x, -1, 1, 5) | |
myplan = bpp.subs_wrapper(myplan, LiveTable([ss_stg2_x])) | |
# run xrun with sample 5 and plan just created | |
xrun(5, myplan) | |
# Note: we need to create ``myplan`` again if we want to run the same plan later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment