DiamondLightSource / DiamondLightSource/mx-bluesky

Jungfrau plans sometimes fail to apply and remove pedestal mode

Open
#1,375 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
4
Forks
5
Avg merge
1d 30m
Merged PRs (30d)
2

Description

A couple of issues I ran into running the WIP jungfrau collections. These were running on top of commit https://github.com/DiamondLightSource/mx-bluesky/commit/18d7c87221a2ece9e33187d4f7893da4f5f93875. I can't rule out the IOC being the cause of some of these, and unfortunately don't have IOC logs from this testing.

- Saw a case where when running pedestal collections, the detector wasn't put in pedestal mode. Example log; although it looks like this is setting the mode on 48ms after switching it off, the detector wasn't in the mode when it was actually triggered. [2025-10-16T113313_pedestals_dont_activate.log](https://github.com/user-attachments/files/22966548/2025-10-16T113313_pedestals_dont_activate.log). Reading this, it does look as though it is trying to turn it on...

- Sometimes, the pedestal mode doesn't get turned off when finishing a pedestal collection. [2025-10-16T113438_pedestals_remain_on.log](https://github.com/user-attachments/files/22966536/2025-10-16T113438_pedestals_remain_on.log), [2025-10-16T112734_pedestals_remain_on.log](https://github.com/user-attachments/files/22966663/2025-10-16T112734_pedestals_remain_on.log). Leaving the detector in this special mode probably wouldn't be such an issue, except that I needed to run manual darks as the IOC appeared to be setting short exposures wrong. Probably we don't want to leave it in this state?

With these latter cases, I don't think the detector actually ended up in an idle state; we needed to manually `sls_detector_put rx_stop` afterwards. I didn't get enough diagnostic time to narrow down the causes of this; possibly related to issues where the values aren't set (possibly silently?) if the detector isn't idle when the PV is attempted to be written.

## Acceptance Criteria
- Detector pedestal mode is always activated when running pedestal collections
- Detector is taken out of pedestal mode at the end of pedestal collectios

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.