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-47667: Improve BaseCamera start/end take data operation to improve efficiency. #170

Merged
merged 2 commits into from
Jan 10, 2025
Merged
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-47667.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed unit tests for LatissIntraExtraFocalData to work with new take_image command procedure.
17 changes: 10 additions & 7 deletions tests/auxtel/test_latiss_intra_extra_focal_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,6 @@ async def cmd_take_images_callback(self, data):
logger.debug(
f"Exposing for {one_exp_time} seconds for each exposure, total exposures is {data.numImages}"
)
await asyncio.sleep(one_exp_time * data.numImages)
self.nimages += 1
logger.debug("Scheduling finish_take_images before returning from take_images")
self.end_image_tasks.append(asyncio.create_task(self.finish_take_images()))

async def finish_take_images(self):
await asyncio.sleep(0.5)
# Allow an override of image numbers incase the test datasets are
# non-sequential
if not self.img_cnt_override_list:
Expand All @@ -255,6 +248,16 @@ async def finish_take_images(self):
image_name = f"AT_O_{self.date}_{(imgNum):06d}"

logger.debug(f"Mock camera returning imageName={image_name}")
await self.atcamera.evt_startIntegration.set_write(imageName=image_name)
await asyncio.sleep(one_exp_time * data.numImages)
self.nimages += 1
logger.debug("Scheduling finish_take_images before returning from take_images")
self.end_image_tasks.append(
asyncio.create_task(self.finish_take_images(image_name=image_name))
)

async def finish_take_images(self, image_name):
await asyncio.sleep(0.5)
await self.atcamera.evt_endReadout.set_write(imageName=image_name)
await asyncio.sleep(0.5)
await self.atheaderservice.evt_largeFileObjectAvailable.write()
Expand Down
Loading