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-46276: modified wavelength change and setup laser #164

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

parfa30
Copy link
Contributor

@parfa30 parfa30 commented Sep 12, 2024

Changing the laser wavelength and setup laser functions in mtcalsys so are more usable in a variety of sal scripts.

@parfa30 parfa30 requested a review from tribeiro September 12, 2024 23:45
@parfa30 parfa30 marked this pull request as draft September 13, 2024 15:21
@parfa30 parfa30 marked this pull request as ready for review September 13, 2024 16:52
Copy link
Contributor

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

python/lsst/ts/observatory/control/data/mtcalsys.yaml Outdated Show resolved Hide resolved
python/lsst/ts/observatory/control/maintel/mtcalsys.py Outdated Show resolved Hide resolved
python/lsst/ts/observatory/control/maintel/mtcalsys.py Outdated Show resolved Hide resolved
python/lsst/ts/observatory/control/maintel/mtcalsys.py Outdated Show resolved Hide resolved
python/lsst/ts/observatory/control/maintel/mtcalsys.py Outdated Show resolved Hide resolved
python/lsst/ts/observatory/control/maintel/mtcalsys.py Outdated Show resolved Hide resolved

async def laser_start_propagate(self) -> None:
"""Start the propagation of the Tunable Laser"""
# get laser detailed state
Copy link
Contributor

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

Copy link
Contributor

@edennihy edennihy left a 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),
Copy link
Contributor

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_

Copy link
Contributor

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),
Copy link
Contributor

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_

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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.

@parfa30 parfa30 force-pushed the tickets/DM-46276 branch 2 times, most recently from 90f8ef8 to 0433cf2 Compare October 30, 2024 20:37
@parfa30 parfa30 requested a review from edennihy November 4, 2024 18:26
Copy link
Contributor

@edennihy edennihy left a 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!

@parfa30 parfa30 merged commit 32af74f into develop Nov 6, 2024
5 checks passed
@parfa30 parfa30 deleted the tickets/DM-46276 branch November 6, 2024 17:47
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