-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-49346: Add a park projector function #193
base: develop
Are you sure you want to change the base?
Conversation
7d45af9
to
357cea4
Compare
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.
Looks mostly good! I only have a small concern about the use of get
in prepare for flat. You can get into a situation where the event loop has not had a chance to read telemetry or, if telemetry is not being published, you might get outdated information. Since you are reading a telemetry, I suggest you change it to next
with flush=True
.
Also, please, make sure you split the difference updates you are doing in different news fragments.
doc/news/DM-49346.feature.rst
Outdated
@@ -0,0 +1 @@ | |||
Added a function to park the LED Projector. Also added homing to the setup_calsys and turned off LEDs in the prepare_for_flat |
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.
Looks like you are adding more than one feature. Please, consider splitting them in different news fragments file.
self.linearstage_led_focus_index = 2 | ||
self.linearstage_laser_focus_index = 3 | ||
self.linearstage_select_index = 4 | ||
self.fiberspectrograph_blue_index = 101 |
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.
I don't think this change was documented in the news fragment.
timeout=self.long_timeout, | ||
) | ||
# Confirm that Projector selection is at the LED location | ||
vertical_pos = self.linearstage_projector_select.tel_position.get() |
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.
it is a bit dangerous to use get
.. Since this is telemetry, I would suggest you use next
with flush=True and a timeout.
vertical_pos = await self.linearstage_projector_select.tel_position.next(flush=True, timeout=self.long_timeout)
f75536b
to
87326ff
Compare
Also added homing into setup_calsys and LEDs OFF in prepare_for_flat. As I continue to write SALScripts, I'm finding several things that were missing/incorrect.