Skip to content

Commit

Permalink
remove take_cwfs method
Browse files Browse the repository at this point in the history
  • Loading branch information
gmegh committed Oct 18, 2024
1 parent 0e6dd1a commit 46379dc
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions python/lsst/ts/standardscripts/maintel/take_aos_sequence_comcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,15 @@ async def take_aos_sequence(self) -> None:
self.current_z_position = self.dz

self.log.info("Taking in-focus image")
intra_visit_id = await self.take_cwfs_image("INTRA")
intra_visit_id = await self.camera.take_cwfs(
exptime=self.exposure_time,
n=1,
group_id=supplemented_group_id,
filter=self.filter,
reason="INTRA" + ("" if self.reason is None else f"_{self.reason}"),
program=self.program,
note=self.note,
)

if self.mode == Mode.TRIPLET or self.mode == Mode.EXTRA:
self.log.debug("Moving to extra-focal position")
Expand Down Expand Up @@ -313,29 +321,6 @@ async def take_aos_sequence(self) -> None:
except Exception:
self.log.exception("Executing OCPS task failed. Ignoring.")

async def take_cwfs_image(self, reason_suffix: str) -> int:
"""Helper method to handle image acquisition for cwfs images.
Parameters
----------
reason_suffix : `str`
Suffix to add to the reason (e.g., INTRA, EXTRA).
Returns
-------
visit_id : `int`
Visit ID of the image.
"""
return await self.camera.take_cwfs(
exptime=self.exposure_time,
n=1,
group_id=self.supplemented_group_id,
filter=self.filter,
reason=reason_suffix + ("" if self.reason is None else f"_{self.reason}"),
program=self.program,
note=self.note,
)

async def run_block(self) -> None:
"""Execute script operations."""
await self.assert_feasibility()
Expand Down

0 comments on commit 46379dc

Please sign in to comment.