From 616c8e053446b42cf7999ed061e4dc70ca721b9d Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 9 Jan 2025 14:49:04 -0700 Subject: [PATCH 1/2] Update LatissIntraExtraFocalData unit test to work with the latest version of the take_images procedure. --- .../test_latiss_intra_extra_focal_data.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/auxtel/test_latiss_intra_extra_focal_data.py b/tests/auxtel/test_latiss_intra_extra_focal_data.py index 3a37ca80d..8a465332b 100644 --- a/tests/auxtel/test_latiss_intra_extra_focal_data.py +++ b/tests/auxtel/test_latiss_intra_extra_focal_data.py @@ -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: @@ -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() From 19580a6dc159062877422ee96e8d4ed4f4c94b03 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 9 Jan 2025 14:50:42 -0700 Subject: [PATCH 2/2] Add news fragment for DM-47667 --- doc/news/DM-47667.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/news/DM-47667.misc.rst diff --git a/doc/news/DM-47667.misc.rst b/doc/news/DM-47667.misc.rst new file mode 100644 index 000000000..521f8a668 --- /dev/null +++ b/doc/news/DM-47667.misc.rst @@ -0,0 +1 @@ +Fixed unit tests for LatissIntraExtraFocalData to work with new take_image command procedure.