Created
November 28, 2017 02:53
-
-
Save chiahaoliu/1a0d08d6a7adc76b18c0a6e2c37db539 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def configure_pe1c(exp): | |
try: | |
from bluesky.plans import abs_set | |
except ImportError: | |
from bluesky.plan_stubs import abs_set | |
acq_time = pe1c.cam.acquire_time.get() | |
num_frame = np.ceil(exp/acq_time) | |
computed_exp = num_frame * acq_time | |
yield from abs_set(pe1c.images_per_set, num_frame, wait=True) | |
print("INFO: requested exposure time = {} - > computed exposure time" | |
"= {}".format(exp, computed_exp)) | |
expo_time = 17 | |
RE(configure_pe1c(expo_time)) | |
assert int(expo_time/pe1c.cam.acquire_time.get()) == pe1c.images_per_set.get() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment