From 651b37067f65435c2b73fce88872782a66900047 Mon Sep 17 00:00:00 2001 From: Parker Fagrelius Date: Mon, 23 Jun 2025 15:26:42 -0600 Subject: [PATCH] Adding electrometer and fiberspectraphs as optional in the script --- doc/news/DM-51498.feature.rst | 1 + .../maintel/take_whitelight_flats_lsstcam.py | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 doc/news/DM-51498.feature.rst diff --git a/doc/news/DM-51498.feature.rst b/doc/news/DM-51498.feature.rst new file mode 100644 index 00000000..507bde48 --- /dev/null +++ b/doc/news/DM-51498.feature.rst @@ -0,0 +1 @@ +Adding electrometer and fiberspectrographs as options in take_whitelight_flats script. Will overwrite what is in mtcalsys.yaml. diff --git a/python/lsst/ts/externalscripts/maintel/take_whitelight_flats_lsstcam.py b/python/lsst/ts/externalscripts/maintel/take_whitelight_flats_lsstcam.py index 0a3b5431..ed3bc8dc 100644 --- a/python/lsst/ts/externalscripts/maintel/take_whitelight_flats_lsstcam.py +++ b/python/lsst/ts/externalscripts/maintel/take_whitelight_flats_lsstcam.py @@ -74,7 +74,21 @@ def get_schema(cls): type: boolean default: True use_camera: - description: Will you use the camera during these flats + description: Will you use the camera during these flats. + It overrides what is written in the mtcalsys.yaml + configuration. + type: boolean + default: True + use_electrometer: + description: Will you use the electrometer in these tests. + It overrides what is written in the mtcalsys.yaml + configuration. + type: boolean + default: True + use_fiberspectrographs: + description: Will you use the fiber spectrographs (both blue and red) + in these tests. It overrides what is written in the + mtcalsys.yaml configuration. type: boolean default: True @@ -94,6 +108,8 @@ def get_schema(cls): async def configure(self, config) -> None: self.use_camera = config.use_camera + self.use_electrometer = config.use_electrometer + self.use_fiberspectrographs = config.use_fiberspectrographs self.config_tcs = config.config_tcs """Handle creating the camera object and waiting remote to start.""" @@ -109,7 +125,7 @@ async def configure(self, config) -> None: elif self.config_tcs: self.log.debug("MTCS already defined, skipping.") - if self.lsstcam is None: + if self.use_camera and self.lsstcam is None: self.log.debug("Creating Camera.") self.lsstcam = LSSTCam( self.domain, @@ -138,8 +154,10 @@ async def configure(self, config) -> None: self.exposure_metadata["note"] = getattr(config, "note", None) self.exposure_metadata["reason"] = getattr(config, "reason", None) self.exposure_metadata["program"] = getattr(config, "program", None) + self.exposure_metadata["use_camera"] = self.use_camera + self.exposure_metadata["use_electrometer"] = self.use_electrometer + self.exposure_metadata["use_fiberspectrographs"] = self.use_fiberspectrographs - self.use_camera = config.use_camera self.sequence_names = config.sequence_names if self.sequence_names[0] == "daily": self.sequence_names = await self.get_avail_filters()