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-46167: added optical configuration to enums #160

Merged
merged 5 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:

- name: Install
run: |
$CONDA/bin/conda config --set solver classic
$CONDA/bin/conda install -c lsstts -c conda-forge pre-commit ts-pre-commit-config python=3.11 -y
$CONDA/bin/conda install -c conda-forge pre-commit -y
$CONDA/bin/generate_pre_commit_conf --skip-pre-commit-install
Expand Down
1 change: 1 addition & 0 deletions doc/news/DM-46167.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Temporary addition of Tunable Laser Optical Configuration into enum while xml prepared for deployment
39 changes: 38 additions & 1 deletion python/lsst/ts/observatory/control/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
#
# You should have received a copy of the GNU General Public License

__all__ = ["RotType", "InstrumentFocus", "ClosedLoopMode", "DOFName", "CalibrationType"]
__all__ = [
"RotType",
"InstrumentFocus",
"ClosedLoopMode",
"DOFName",
"CalibrationType",
"LaserOpticalConfiguration",
]

import enum

Expand Down Expand Up @@ -151,3 +158,33 @@ class CalibrationType(enum.IntEnum):

WhiteLight = 1
Mono = 2


# TODO: (DM-46168) Revert workaround for TunableLaser XML changes
class LaserOpticalConfiguration(enum.StrEnum):
"""Configuration of the optical output

Attributes
----------

SCU: `str`
Pass the beam straight-through the SCU.
F1_SCU: `str`
Direct the beam through the F1 after passing through the SCU.
F2_SCU: `str`
Direct the beam through the F2 after passing through the SCU.
NO_SCU: `str`
Pass the beam straight-through.
F1_NO_SCU: `str`
Pass the beam to F1 output.
F2_NO_SCU: `str`
Pass the beam to F2 output.

"""

SCU = "SCU"
F1_SCU = "F1 SCU"
F2_SCU = "F2 SCU"
NO_SCU = "No SCU"
F1_NO_SCU = "F1 No SCU"
F2_NO_SCU = "F2 No SCU"
Loading