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

Add docs on waiting for signals #671

Open
coretl opened this issue Nov 22, 2024 · 0 comments
Open

Add docs on waiting for signals #671

coretl opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@coretl
Copy link
Collaborator

coretl commented Nov 22, 2024

Include this use case:

I want to use ophyd_async.core.set_and_wait_for_other_value() to write to a setpoint of a temperature controller and wait until the temperature reaches that value. I am worried that because they're both floats and because temperature is analog that they will never EXACTLY equal to each other and this function may not return when I want it to. How should I handle float precision here?
2 replies
Tom Cobb (DLS)
15 minutes ago

In main, you can pass a callable as match_value to the function, so you could pass lambda v: np.isclose(v, 32.567) to that
12m ago

Or you could pass pytest.approx(32.567) to it

Acceptance Criteria

  • Docs tell you how to wait for a signal to be at a value to within a tolerance
@coretl coretl added this to the 1.0 milestone Nov 22, 2024
@coretl coretl added the documentation Improvements or additions to documentation label Nov 22, 2024
@coretl coretl self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant