Skip to content

Commit

Permalink
Merge pull request #160 from lsst-ts/tickets/DM-46167
Browse files Browse the repository at this point in the history
DM-46167: added optical configuration to enums
  • Loading branch information
parfa30 authored Sep 12, 2024
2 parents 9e9ab43 + 2bf42ea commit 8024275
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
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"

0 comments on commit 8024275

Please sign in to comment.