Last active
February 19, 2019 05:16
-
-
Save chiahaoliu/cde72d3bdc8e0118b426d29289894a77 to your computer and use it in GitHub Desktop.
configure area det by Msg
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.plan_stubs as bps | |
from xpdacq.beamtime import _check_mini_expo | |
def configure_area_det_expo(expo): | |
area_det = xpd_configuration['area_det'] | |
# compute number of frames | |
acq_time = area_det.cam.acquire_time.get() | |
_check_mini_expo(exposure, acq_time) | |
num_frame = np.ceil(exposure / acq_time) | |
computed_exposure = num_frame * acq_time | |
yield from bps.mv(area_det.images_per_set, num_frame) | |
# print exposure time | |
print("INFO: requested exposure time = {} - > computed exposure time" | |
"= {}".format(exposure, computed_exposure)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment