Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: add resume thresholds to suspender justification message #1554

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

tacaswell
Copy link
Contributor

Description

Adds more context to the justification emitted by the suspenders.

Motivation and Context

Not including the resume condition lead beamline staff to become concerned we were doing "new math".

How Has This Been Tested?

Covered by existing test cases, however we do no check the contents of stdout, disabling capture and running the tests locally gives

.Suspending....To get prompt hit Ctrl-C twice to pause.
Suspension occurred at 2022-12-08 13:25:32.
Justification for this suspension:
Signal bool_sig = 0 fell below 0.5 and has not yet crossed above 0.5.
Suspender SuspendFloor(Signal(name='bool_sig', value=1, timestamp=1670523933.1577613), sleep=0.2, pre_plan=None, post_plan=None,tripped_message=) reports a return to nominal conditions. Will sleep for 0.2 seconds and then release suspension at 2022-12-08 13:25:33.
0.9057326316833496
.Suspending....To get prompt hit Ctrl-C twice to pause.
Suspension occurred at 2022-12-08 13:25:33.
Justification for this suspension:
Signal bool_sig = 1 went above 0.5 and has not yet crossed below 0.5.
Suspender SuspendCeil(Signal(name='bool_sig', value=0, timestamp=1670523934.2849662), sleep=0.2, pre_plan=None, post_plan=None,tripped_message=) reports a return to nominal conditions. Will sleep for 0.2 seconds and then release suspension at 2022-12-08 13:25:34.
0.9056258201599121

Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clear improvement

@ZLLentz ZLLentz merged commit d2b6bdd into bluesky:master Dec 20, 2022
@mrakitin
Copy link
Member

Indeed, that's very helpful, thanks @tacaswell!

@tacaswell tacaswell deleted the fix/suspender_justification branch December 20, 2022 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants