-
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-46276: modified wavelength change and setup laser #164
Conversation
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.
Hi Parker, I added a handful of recommended changes and suggestions to start here. @tribeiro actually looked at most of them together to make sure we were in agreement, so we should be pretty close to finished once these changes are in.
One other missing piece is the unit tests for these methods. The nice part about that though is since they are being unit tested here, you will not need to test them again in the scripts when they are used.
|
||
async def laser_start_propagate(self) -> None: | ||
"""Start the propagation of the Tunable Laser""" | ||
# get laser detailed state |
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 think you can remove this comment
55b9b80
to
68589c9
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.
Thanks for the changes, please see my final comments to help improve the docnotes. Otherwise, you can feel free to squash the commits and prepare to merge.
The last thing we need are a few unit tests for these methods. You could follow the examples here for how to setup a set of basic tests for these methods:
Example method ->
async def disable_ccw_following(self) -> None: |
Example Unit Test ->
async def test_disable_ccw_following(self) -> None: |
self.rem.tunablelaser.evt_opticalConfiguration.aget( | ||
timeout=self.long_timeout | ||
), | ||
self.rem.tunableevt_wavelengthChanged.aget(timeout=self.long_timeout), |
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.
Typo here, should be self.rem.tunablelaser.evt_
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.
This comment still needs to be resolved.
timeout=self.long_timeout | ||
), | ||
self.rem.tunableevt_wavelengthChanged.aget(timeout=self.long_timeout), | ||
self.rem.tunableevt_interlockState.aget(timeout=self.long_timeout), |
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.
and here, should be self.rem.tunablelaser.evt_
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.
Still needs to be resolved.
doc/news/DM-46276.feature.2.rst
Outdated
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.
The features index from zero, so this file should actually be named feature.1.rst
doc/news/DM-46276.feature.rst
Outdated
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.
Could you be a bit more specific in a few bullet points about the changes here? We could for example list the new methods and a quick description of they did. Here is an example of how to format this in the rst file https://github.com/lsst-ts/ts_observatory_control/blob/develop/doc/news/DM-46458.feature.rst
Add feature to allow ``ATCalSys`` to skip monochromator configuration.
- In ``atcalsys_schema.yaml``, add default values for wavelength, entrace_slit and exit_slit.
Add option to set monochromator_grating to None to skip monchromator configuration and set None as default value.
- In ``atcalsys.py``, add feature to skip configuring monochromator if monchromator_grating is None.
- In ``atcalsys.yaml``, update monochromator configuration values for ptc curves to skip monchromator configuration.
Which then displays like this:
Add feature to allow ATCalSys
to skip monochromator configuration.
- In
atcalsys_schema.yaml
, add default values for wavelength, entrace_slit and exit_slit.
Add option to set monochromator_grating to None to skip monchromator configuration and set None as default value. - In
atcalsys.py
, add feature to skip configuring monochromator if monchromator_grating is None. - In
atcalsys.yaml
, update monochromator configuration values for ptc curves to skip monchromator configuration.
90f8ef8
to
0433cf2
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 good, thanks for all the changes!
ae3f5d9
to
6b4d40f
Compare
6b4d40f
to
fa31359
Compare
Changing the laser wavelength and setup laser functions in mtcalsys so are more usable in a variety of sal scripts.