Implement Abstract diffractometer - #1531
Conversation
beteva
left a comment
There was a problem hiding this comment.
Well, that was quick. 😃
If you want to use the AbstractDiffractometer, you need to move all the centring methods to a LNLSSampleView, which inherits from SampleView
| self.current_motor_positions = {} | ||
| self.current_phase = DiffractometerPhase.UNKNOWN | ||
|
|
||
| def manual_centring(self): |
There was a problem hiding this comment.
All the centring methods (manual and automatic) can be found in SampleView.py, where it would be more appropriate place for this one. Maybe you can overload the start_manual_centring. This is what the sample_view adapter will execute.
|
Could you, as well, correct the linting errors. You can run |
93f4064 to
5fde37c
Compare
| "kappa_phi": 0, | ||
| } | ||
| self.current_phase = DiffractometerPhase.UNKNOWN | ||
| self.set_is_ready(True) |
There was a problem hiding this comment.
| self.set_is_ready(True) | |
| self.update_state(self.STATES.READY) |
set_is_ready is a deprecated method.
There was a problem hiding this comment.
Implementing your own centring procedures is nice. One problem, though, you are not emitting the signals, needed to accept or save the centring point on the GUI. For this you simply need to evoke self.centring_done() and self.accept_centring().
Without the signals, The GUI and the queue would not be informed that centring is executed or finished.
| return | ||
|
|
||
| def is_ready(self) -> bool: | ||
| def wait_status_ready(self, timeout=None): |
|
There still seems to be some pending suggestions/ideas are we ready to merge this or would you like to have a closer look, @RafaelLyra8 ? |
| def get_centred_point_from_coord(self, x, y, return_by_names=None): # noqa: ARG002 | ||
| return {"omega": 0, "phiy": 0, "phiz": 0, "sampx": 0, "sampy": 0} |
There was a problem hiding this comment.
This is a bit strange. Does it mean that you only add it to overload the SampleView one?
beteva
left a comment
There was a problem hiding this comment.
Well done.
Only few doubts about the 0 positions of get_centred_point_from_coord, but OK if this is what you need..
|
The branch is still WIP. If you are done, you can rebase and merge it. |
3b4f9da to
207ff71
Compare
207ff71 to
6f4798c
Compare
6f4798c to
6b34632
Compare
No description provided.