Skip to content

Commit

Permalink
Merge pull request #255 from lsst-ts/tickets/DM-47890
Browse files Browse the repository at this point in the history
Tickets/dm 47890: Support Summit Observing Weeks 49-50 of 2024
  • Loading branch information
edennihy authored Dec 17, 2024
2 parents a6e6525 + 1e33e35 commit ab8b5db
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/news/DM-47890.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In `auxtel/daytime_checkout/slew_and_take_image_checkout.py`, fix how TCS readiness is configured.
1 change: 1 addition & 0 deletions doc/news/DM-47890.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In `maintel/m1m3/enable_m1m3_slew_controller_flags.py`, update `run_block`` method to use new `m1m3_in_engineering_mode`` context manager to enter/exit engineering mode when setting slew controller settings.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, index=1, add_remotes: bool = True):
# published to the efd.
self.atcs = ATCS(domain=self.domain, intended_usage=atcs_usage, log=self.log)

tcs_ready_to_take_data = self.atcs if add_remotes else None
tcs_ready_to_take_data = self.atcs.ready_to_take_data if add_remotes else None
self.latiss = LATISS(
domain=self.domain,
intended_usage=latiss_usage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ async def configure(self, config):

async def run_block(self):

for flag, enable in zip(self.config.slew_flags, self.config.enable):
self.log.info(f"Setting m1m3 slew flag {flag.name} to {enable}.")
await self.mtcs.set_m1m3_slew_controller_settings(flag, enable)
async with self.mtcs.m1m3_in_engineering_mode():
for flag, enable in zip(self.config.slew_flags, self.config.enable):
self.log.info(f"Setting m1m3 slew flag {flag.name} to {enable}.")
await self.mtcs.set_m1m3_slew_controller_settings(flag, enable)
7 changes: 7 additions & 0 deletions tests/test_maintel_m1m3_enable_m1m3_controller_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ async def basic_make_script(self, index):
self.script.mtcs = unittest.mock.AsyncMock()
self.script.mtcs.start_task = utils.make_done_future()
self.script.mtcs.set_m1m3_slew_controller_settings = unittest.mock.AsyncMock()
self.script.mtcs.configure_mock(
m1m3_in_engineering_mode=self.mock_m1m3_in_engineering_mode
)

return (self.script,)

@contextlib.asynccontextmanager
async def mock_m1m3_in_engineering_mode(self):
yield

@contextlib.asynccontextmanager
async def make_dry_script(self):
async with self.make_script():
Expand Down

0 comments on commit ab8b5db

Please sign in to comment.