diff --git a/doc/news/DM-47780.bugfix.rst b/doc/news/DM-47780.bugfix.rst new file mode 100644 index 00000000..883b8058 --- /dev/null +++ b/doc/news/DM-47780.bugfix.rst @@ -0,0 +1 @@ +Use supplemented_group_id ``maintel/base_close_loop.py``. \ No newline at end of file diff --git a/python/lsst/ts/standardscripts/maintel/base_close_loop.py b/python/lsst/ts/standardscripts/maintel/base_close_loop.py index 62712c96..19beb84d 100644 --- a/python/lsst/ts/standardscripts/maintel/base_close_loop.py +++ b/python/lsst/ts/standardscripts/maintel/base_close_loop.py @@ -326,6 +326,7 @@ def set_metadata(self, metadata: salobj.type_hints.BaseMsgType) -> None: async def take_intra_extra_focal_images( self, + supplemented_group_id: str, ) -> typing.Tuple[typing.Any, typing.Any]: """Take intra and extra focal images. @@ -347,7 +348,7 @@ async def take_intra_extra_focal_images( intra_image = await self.camera.take_cwfs( exptime=self.exposure_time, n=1, - group_id=self.group_id, + group_id=supplemented_group_id, filter=self.filter, reason="INTRA" + ("" if self.reason is None else f"_{self.reason}"), program=self.program, @@ -368,7 +369,7 @@ async def take_intra_extra_focal_images( extra_image = await self.camera.take_cwfs( exptime=self.exposure_time, n=1, - group_id=self.group_id, + group_id=supplemented_group_id, filter=self.filter, reason="EXTRA" + ("" if self.reason is None else f"_{self.reason}"), program=self.program, @@ -395,11 +396,13 @@ async def wait_for_images_in_oods(self): except asyncio.TimeoutError: self.log.warning("Timeout waiting for images in OODS.") - async def handle_fam_mode(self) -> None: + async def handle_fam_mode(self, supplemented_group_id: str) -> None: """Handle Full Array Mode.""" # Take intra and extra focal images - intra_image, extra_image = await self.take_intra_extra_focal_images() + intra_image, extra_image = await self.take_intra_extra_focal_images( + supplemented_group_id + ) # Set intra and extra visit id intra_visit_id = int(intra_image[0]) @@ -408,7 +411,7 @@ async def handle_fam_mode(self) -> None: take_infocus_image_task = asyncio.create_task( self.camera.take_acq( self.exposure_time, - group_id=self.group_id, + group_id=supplemented_group_id, reason="INFOCUS" + ("" if self.reason is None else f"_{self.reason}"), program=self.program, filter=self.filter, @@ -426,13 +429,13 @@ async def handle_fam_mode(self) -> None: ) await take_infocus_image_task - async def handle_cwfs_mode(self) -> None: + async def handle_cwfs_mode(self, supplemented_group_id: str) -> None: """Handle CWFS mode.""" # Take in-focus image image = await self.camera.take_acq( self.exposure_time, - group_id=self.group_id, + group_id=supplemented_group_id, reason="INFOCUS" + ("" if self.reason is None else f"_{self.reason}"), program=self.program, filter=self.filter, @@ -539,7 +542,9 @@ async def arun(self, checkpoint: bool = False) -> None: ) # Run the operational mode handler function. - await self.operation_model_handlers[self.mode]() + await self.operation_model_handlers[self.mode]( + self.next_supplemented_group_id() + ) # Retrieve the rotation angle after taking data. end_rotation_angle = await self.mtcs.rem.mtrotator.tel_rotation.next(