Skip to content

Commit

Permalink
Xspress3 controller disables deadtime correction during prepare().
Browse files Browse the repository at this point in the history
  • Loading branch information
canismarko committed Dec 20, 2024
1 parent f3842c9 commit e29d1cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/haven/devices/detectors/xspress.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ async def prepare(self, trigger_info: TriggerInfo):
self._drv.num_images.set(trigger_info.total_number_of_triggers),
self._drv.image_mode.set(adcore.ImageMode.MULTIPLE),
self._drv.trigger_mode.set(XspressTriggerMode.INTERNAL),
# Hardware deadtime correciton is not reliable
# https://github.com/epics-modules/xspress3/issues/57
self._drv.deadtime_correction.set(False),
)

async def wait_for_idle(self):
Expand Down
13 changes: 13 additions & 0 deletions src/haven/tests/test_xspress.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ async def test_descriptor(detector):
assert await detector.writer._dataset_describer.np_datatype() == "<f8"


async def test_deadtime_correction(detector):
"""Deadtime correction in hardware is not reliable and should be
disabled.
https://github.com/epics-modules/xspress3/issues/57
"""
set_mock_value(detector.drv.deadtime_correction, True)
trigger_info = TriggerInfo(number_of_triggers=1)
await detector.prepare(trigger_info)
assert not await detector.drv.deadtime_correction.get_value()


# -----------------------------------------------------------------------------
# :author: Mark Wolfman
# :email: [email protected]
Expand Down

0 comments on commit e29d1cd

Please sign in to comment.