Skip to content

Commit 1097a2c

Browse files
committed
Add software trigger, return values for setters
1 parent d66e588 commit 1097a2c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/aslm/model/devices/APIs/hamamatsu/HamamatsuAPI.py

+10
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,16 @@ def get_frames(self):
11061106
def get_camera_handler(self):
11071107
return self.__hdcam
11081108

1109+
def fire_software_trigger(self):
1110+
trigger_source = self.get_property_value('trigger_source')
1111+
if trigger_source == 3.0:
1112+
# fire trigger to camera
1113+
err = dcamcap_firetrigger(self.__hdcam, 0)
1114+
if err < 0:
1115+
print('an error happened when sending trigger to the camera', err)
1116+
else:
1117+
print(f"Camera is in mode {trigger_source}, not software mode (3).")
1118+
11091119

11101120
if __name__ == '__main__':
11111121
print('start testing Hamamatsu API!')

src/aslm/model/devices/camera/camera_hamamatsu.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def set_exposure_time(self, exposure_time):
258258
259259
"""
260260
exposure_time = exposure_time / 1000
261-
self.camera_controller.set_property_value("exposure_time", exposure_time)
261+
return self.camera_controller.set_property_value("exposure_time", exposure_time)
262262

263263
def set_line_interval(self, line_interval_time):
264264
r"""Set HamamatsuOrca line interval.
@@ -268,7 +268,7 @@ def set_line_interval(self, line_interval_time):
268268
line_interval_time : float
269269
Line interval duration.
270270
"""
271-
self.camera_controller.set_property_value("internal_line_interval", line_interval_time)
271+
return self.camera_controller.set_property_value("internal_line_interval", line_interval_time)
272272

273273
def set_binning(self, binning_string):
274274
r"""Set HamamatsuOrca binning mode.

0 commit comments

Comments
 (0)