DiamondLightSource/dodal

Create preprocessor helper function to insert a plan before 'open_run' and after 'close_run' messages

Open

#1,103 建立於 2025年3月11日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Python (12 fork)auto 404
good first issue

倉庫指標

Star
 (4 star)
PR 合併指標
 (PR 指標待抓取)

描述

As of https://github.com/DiamondLightSource/dodal/pull/1099 and https://github.com/DiamondLightSource/mx-bluesky/pull/872, we have made bluesky preprocessors which insert plans before an 'open_run', and after a 'close_run' message is seen in the RunEngine. Both of these preprocessors follow a similar pattern, and in the future more of these are likely to be created. We should create a helper function which looks something like def do_on_run(on_run_open, on_run_close = None, run_key=None) to save duplicating the logic for this part. We should also discuss with Bluesky developers as to whether this would be a useful thing to put in Bluesky instead

Acceptance Criteria

  • Discussion with Bluesky to see if this is a feature they want
  • A function which looks like def do_on_run(on_run_open, on_run_close = None, run_key=None) is added to Bluesky or dodal, depending on the above
  • The undulator preprocessor (in dodal) and the xbpm preprocessor (in mx-bluesky) are updated to use this helper function

貢獻者指南