Skip to content

Commit

Permalink
Merge pull request #15 from mskinner5278/nyx_flyer_updates
Browse files Browse the repository at this point in the history
Added armed callback to Flyer
  • Loading branch information
JunAishima authored Apr 1, 2022
2 parents 809134a + da3e6cf commit c7bd6a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mxtools/eiger.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class EigerBaseV26(EigerDetector):
file = Cpt(
EigerSimulatedFilePlugin,
suffix="cam1:",
write_path_template="/GPFS/CENTRAL/xf17id2/jaishima/",
root="/GPFS/CENTRAL/xf17id2",
write_path_template="/nsls2/data/nyx/legacy/",
root="/nsls2/data/nyx/legacy",
)
image = Cpt(ImagePlugin, "image1:")

Expand Down
12 changes: 11 additions & 1 deletion mxtools/flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,20 @@ def detector_arm(self, **kwargs):
self.detector.cam.omega_incr.put(width)
self.detector.cam.omega_start.put(start)
self.detector.cam.wavelength.put(wavelength)
self.detector.cam.det_distance.put(det_distance_m * 1000)
self.detector.cam.det_distance.put(det_distance_m)

start_arm = ttime.time()

def armed_callback(value, old_value, **kwargs):
if old_value == 0 and value == 1:
return True
return False

status = SubscriptionStatus(self.detector.cam.armed, armed_callback, run=False)

self.detector.cam.acquire.put(1)

status.wait()
logger.info(f"arm time = {ttime.time() - start_arm}")

def setup_vector_program(self, num_images, angle_start, angle_end, exposure_period_per_image):
Expand Down

0 comments on commit c7bd6a9

Please sign in to comment.