Skip to content

Commit

Permalink
Merge pull request #34 from vshekar/fix-detector-arm-issues
Browse files Browse the repository at this point in the history
Fixes for detector arming due to DCU updates
  • Loading branch information
JunAishima authored May 4, 2023
2 parents e376f15 + 8e61881 commit 24db1be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions mxtools/flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def configure_detector(self, **kwargs):
data_directory_name = kwargs["data_directory_name"]
self.detector.file.external_name.put(file_prefix)
self.detector.file.write_path_template = data_directory_name
self.detector.file.file_write_images_per_file.put(500)

def configure_vector(self, *args, **kwargs):
angle_start = kwargs["angle_start"]
Expand Down Expand Up @@ -263,6 +262,8 @@ def detector_arm(self, **kwargs):

self.detector.cam.acquire_time.put(exposure_per_image)
self.detector.cam.acquire_period.put(exposure_per_image)
# Trigger mode set before num_images due to updates in Eiger REST API
self.detector.cam.trigger_mode.put(eiger.EXTERNAL_SERIES)
self.detector.cam.num_images.put(num_images)
self.detector.cam.num_triggers.put(1)
self.detector.cam.file_path.put(data_directory_name)
Expand All @@ -277,7 +278,8 @@ def detector_arm(self, **kwargs):
self.detector.cam.omega_start.put(start)
self.detector.cam.wavelength.put(wavelength)
self.detector.cam.det_distance.put(det_distance_m)
self.detector.cam.trigger_mode.put(eiger.EXTERNAL_SERIES)

self.detector.file.file_write_images_per_file.put(500)

def armed_callback(value, old_value, **kwargs):
if old_value == 0 and value == 1:
Expand Down
3 changes: 2 additions & 1 deletion mxtools/raster_flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def detector_arm(self, **kwargs):

self.detector.cam.acquire_time.put(exposure_per_image)
self.detector.cam.acquire_period.put(exposure_per_image)
# Setting trigger mode before num_triggers due to change in Eiger REST API change
self.detector.cam.trigger_mode.put(eiger.EXTERNAL_ENABLE)
self.detector.cam.num_triggers.put(total_num_images)
self.detector.cam.file_path.put(data_directory_name)
self.detector.cam.fw_name_pattern.put(f"{file_prefix_minus_directory}_$id")
Expand All @@ -143,7 +145,6 @@ def detector_arm(self, **kwargs):
self.detector.cam.omega_start.put(start)
self.detector.cam.wavelength.put(wavelength)
self.detector.cam.det_distance.put(det_distance_m)
self.detector.cam.trigger_mode.put(eiger.EXTERNAL_ENABLE)

self.detector.file.file_write_images_per_file.put(num_images_per_file)

Expand Down

0 comments on commit 24db1be

Please sign in to comment.