Skip to content

Commit c7bd6a9

Browse files
authored
Merge pull request #15 from mskinner5278/nyx_flyer_updates
Added armed callback to Flyer
2 parents 809134a + da3e6cf commit c7bd6a9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

mxtools/eiger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class EigerBaseV26(EigerDetector):
6868
file = Cpt(
6969
EigerSimulatedFilePlugin,
7070
suffix="cam1:",
71-
write_path_template="/GPFS/CENTRAL/xf17id2/jaishima/",
72-
root="/GPFS/CENTRAL/xf17id2",
71+
write_path_template="/nsls2/data/nyx/legacy/",
72+
root="/nsls2/data/nyx/legacy",
7373
)
7474
image = Cpt(ImagePlugin, "image1:")
7575

mxtools/flyer.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,20 @@ def detector_arm(self, **kwargs):
266266
self.detector.cam.omega_incr.put(width)
267267
self.detector.cam.omega_start.put(start)
268268
self.detector.cam.wavelength.put(wavelength)
269-
self.detector.cam.det_distance.put(det_distance_m * 1000)
269+
self.detector.cam.det_distance.put(det_distance_m)
270270

271271
start_arm = ttime.time()
272+
273+
def armed_callback(value, old_value, **kwargs):
274+
if old_value == 0 and value == 1:
275+
return True
276+
return False
277+
278+
status = SubscriptionStatus(self.detector.cam.armed, armed_callback, run=False)
279+
272280
self.detector.cam.acquire.put(1)
281+
282+
status.wait()
273283
logger.info(f"arm time = {ttime.time() - start_arm}")
274284

275285
def setup_vector_program(self, num_images, angle_start, angle_end, exposure_period_per_image):

0 commit comments

Comments
 (0)