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

DM-49346: Add a park projector function #193

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

parfa30
Copy link
Contributor

@parfa30 parfa30 commented Mar 6, 2025

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.

@parfa30 parfa30 requested a review from couger01 March 17, 2025 12:32
Copy link
Member

@tribeiro tribeiro left a 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.

@@ -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
Copy link
Member

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
Copy link
Member

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()
Copy link
Member

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)

@parfa30 parfa30 requested a review from tribeiro March 17, 2025 22:09
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.

2 participants