From ab43f1e8ce4fe5a1d1ca3dec3711f7f4a96df22a Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Fri, 6 Sep 2024 12:44:58 -0700 Subject: [PATCH 1/6] adding optical configuration to xml --- .../interface_changes/DM-46165.tunablelaser.rst | 1 + python/lsst/ts/xml/enums/TunableLaser.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 doc/news/interface_changes/DM-46165.tunablelaser.rst diff --git a/doc/news/interface_changes/DM-46165.tunablelaser.rst b/doc/news/interface_changes/DM-46165.tunablelaser.rst new file mode 100644 index 000000000..4de668399 --- /dev/null +++ b/doc/news/interface_changes/DM-46165.tunablelaser.rst @@ -0,0 +1 @@ +Adding in Optical Configuration enum for TunableLaser diff --git a/python/lsst/ts/xml/enums/TunableLaser.py b/python/lsst/ts/xml/enums/TunableLaser.py index 1e843614c..48fceaca0 100644 --- a/python/lsst/ts/xml/enums/TunableLaser.py +++ b/python/lsst/ts/xml/enums/TunableLaser.py @@ -28,6 +28,21 @@ class LaserDetailedState(enum.IntEnum): PROPAGATING_CONTINUOUS_MODE = 3 PROPAGATING_BURST_MODE = 4 +class OpticalConfiguration(enum.StrEnum): + """Configuration of the optical output""" + + SCU = "SCU" + """Pass the beam straight-through the SCU.""" + F1_SCU = "F1 SCU" + """Direct the beam through the F1 after passing through the SCU.""" + F2_SCU = "F2 SCU" + """Direct the beam through the F2 after passing through the SCU.""" + NO_SCU = "No SCU" + """Pass the beam straight-through.""" + F1_NO_SCU = "F1 No SCU" + """Pass the beam to F1 output.""" + F2_NO_SCU = "F2 No SCU" + """Pass the beam to F2 output.""" class LaserErrorCode(enum.IntEnum): """Laser error codes""" From 7c7213512bd86dfe82f092686a8942693d277e20 Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Fri, 6 Sep 2024 12:49:19 -0700 Subject: [PATCH 2/6] add to all --- python/lsst/ts/xml/enums/TunableLaser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/ts/xml/enums/TunableLaser.py b/python/lsst/ts/xml/enums/TunableLaser.py index 48fceaca0..41e0d809d 100644 --- a/python/lsst/ts/xml/enums/TunableLaser.py +++ b/python/lsst/ts/xml/enums/TunableLaser.py @@ -1,4 +1,4 @@ -__all__ = ["LaserDetailedState", "LaserErrorCode"] +__all__ = ["LaserDetailedState", "OpticalConfiguration", "LaserErrorCode"] import enum From 94d7ca9a4d4382432b05e103c2eed327bd388d71 Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Fri, 6 Sep 2024 14:29:03 -0700 Subject: [PATCH 3/6] doc changes --- python/lsst/ts/xml/enums/TunableLaser.py | 26 +++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/python/lsst/ts/xml/enums/TunableLaser.py b/python/lsst/ts/xml/enums/TunableLaser.py index 41e0d809d..46464d13a 100644 --- a/python/lsst/ts/xml/enums/TunableLaser.py +++ b/python/lsst/ts/xml/enums/TunableLaser.py @@ -29,20 +29,32 @@ class LaserDetailedState(enum.IntEnum): PROPAGATING_BURST_MODE = 4 class OpticalConfiguration(enum.StrEnum): - """Configuration of the optical output""" + """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" - """Pass the beam straight-through the SCU.""" F1_SCU = "F1 SCU" - """Direct the beam through the F1 after passing through the SCU.""" F2_SCU = "F2 SCU" - """Direct the beam through the F2 after passing through the SCU.""" NO_SCU = "No SCU" - """Pass the beam straight-through.""" F1_NO_SCU = "F1 No SCU" - """Pass the beam to F1 output.""" F2_NO_SCU = "F2 No SCU" - """Pass the beam to F2 output.""" class LaserErrorCode(enum.IntEnum): """Laser error codes""" From c457e0af1f83b194e31d54022a7199949ffd8a63 Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Fri, 6 Sep 2024 14:40:57 -0700 Subject: [PATCH 4/6] added new enum; --- .../sal_interfaces/TunableLaser/TunableLaser_Events.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml index 835a1b4db..e7123d6de 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml @@ -7,6 +7,14 @@ LaserErrorCode_ASCII_ERROR = 7301, LaserErrorCode_GENERAL_ERROR = 7302, LaserErrorCode_TIMEOUT_ERROR = 7303, LaserErrorCode_HW_CPU_ERROR = 7304 + + +OpticalConfiguration_SCU, +OpticalConfiguration_F1_SCU, +OpticalConfiguration_F2_SCU, +OpticalConfiguration_NO_SCU, +OpticalConfiguration_F1_NO_SCU, +OpticalConfiguration_F2_NO_SCU TunableLaser From c4379b0e642b7482f9e68b80737816717f7e0b6c Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Fri, 6 Sep 2024 15:41:24 -0700 Subject: [PATCH 5/6] black --- python/lsst/ts/xml/enums/TunableLaser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/lsst/ts/xml/enums/TunableLaser.py b/python/lsst/ts/xml/enums/TunableLaser.py index 46464d13a..a828b7d0e 100644 --- a/python/lsst/ts/xml/enums/TunableLaser.py +++ b/python/lsst/ts/xml/enums/TunableLaser.py @@ -28,6 +28,7 @@ class LaserDetailedState(enum.IntEnum): PROPAGATING_CONTINUOUS_MODE = 3 PROPAGATING_BURST_MODE = 4 + class OpticalConfiguration(enum.StrEnum): """Configuration of the optical output @@ -56,6 +57,7 @@ class OpticalConfiguration(enum.StrEnum): F1_NO_SCU = "F1 No SCU" F2_NO_SCU = "F2 No SCU" + class LaserErrorCode(enum.IntEnum): """Laser error codes""" From d5f0874e035f685589f296b0278d8333cfcb529e Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Thu, 12 Sep 2024 12:18:53 -0700 Subject: [PATCH 6/6] more info in descriptions --- .../sal_interfaces/TunableLaser/TunableLaser_Commands.xml | 4 ++-- .../data/sal_interfaces/TunableLaser/TunableLaser_Events.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Commands.xml b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Commands.xml index 5380d171a..41949236d 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Commands.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Commands.xml @@ -31,10 +31,10 @@ TunableLaser TunableLaser_command_setOpticalConfiguration - Set the optical configuration. + Set the optical configuration; an OpticalConfiguration enum. configuration - Optical alignment configuration to be set. + Optical alignment configuration to be set; an OpticalConfiguration enum. string 1 unitless diff --git a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml index e7123d6de..def73df2d 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/TunableLaser/TunableLaser_Events.xml @@ -48,10 +48,10 @@ OpticalConfiguration_F2_NO_SCU TunableLaser TunableLaser_logevent_opticalConfiguration - The optical configuration. + The optical configuration; an OpticalConfiguration enum. configuration - The new optical alignment configuration. + The optical alignment configuration; a OpticalConfiguration enum. string 1 unitless