-
Notifications
You must be signed in to change notification settings - Fork 2
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
Component for motors moving halfs of JF4M detector #224
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #224 +/- ##
==========================================
- Coverage 71.09% 70.70% -0.39%
==========================================
Files 23 23
Lines 2726 2748 +22
==========================================
+ Hits 1938 1943 +5
- Misses 788 805 +17 ☔ View full report in Codecov by Sentry. |
if src in dc.control_sources and position_key in dc[src].keys(): | ||
if ( | ||
src in dc.control_sources and | ||
position_key in dc[src].keys(inc_timestamps=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
position_key in dc[src].keys(inc_timestamps=False) | |
position_key in dc[src] |
This should work, and can be faster than loading the list of keys.
I assume you've tested this manually? It would be good to add some automated tests for it, like you did for the AGIPD 1M quadrant motors. Other than that, I think this all looks fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from needing some basic tests, LGTM!
raise ValueError("Motors are not found") | ||
elif len(all_motors) > 1: | ||
raise ValueError( | ||
"Many detector found: {', '.join(det_motors.keys())}. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Many detector found: {', '.join(det_motors.keys())}. " | |
"Many detector found: {', '.join(det_motors.keys())}.\n" |
Nitpicking, it might be nicer formatting to print the 'please specify' message on a new line.
%subj%
@JamesWrigley @takluyver