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-47780: Use supplemented_group_id in close loop script #247

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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 doc/news/DM-47780.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use supplemented_group_id ``maintel/base_close_loop.py``.
21 changes: 13 additions & 8 deletions python/lsst/ts/standardscripts/maintel/base_close_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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])
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
Loading