From df79aa16de736f06458d84047c70f9ed358c499e Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Thu, 25 Jan 2024 16:13:57 -0800 Subject: [PATCH 1/2] Revert "Add startTime to the nextVisit schema" This reverts commit 3e72e784b92ab95a8a5400d08d73c74243ece535. --- src/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.py b/src/main.py index a28e2f7..c1ae7ef 100644 --- a/src/main.py +++ b/src/main.py @@ -29,7 +29,6 @@ class NextVisitModel: groupId: str coordinateSystem: int position: typing.List[int] - startTime: float rotationSystem: int cameraAngle: float filters: str @@ -265,7 +264,6 @@ async def main() -> None: "coordinateSystem" ], position=next_visit_message_initial["message"]["position"], - startTime=next_visit_message_initial["message"]["startTime"], rotationSystem=next_visit_message_initial["message"][ "rotationSystem" ], From a39a2729bcb93f824c507b92952cc7e7b8729cd0 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Thu, 25 Jan 2024 15:45:02 -0800 Subject: [PATCH 2/2] Ignore nextVisit messages with no instrument. Such messages are created by summit scripts that don't take observations (e.g., a standalone telescope slew command), and they confuse Prompt Processing (which assumes that having the wrong instrument is a serious error). --- src/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.py b/src/main.py index c1ae7ef..01184a5 100644 --- a/src/main.py +++ b/src/main.py @@ -253,6 +253,11 @@ async def main() -> None: logging.info(f"message deserialized {next_visit_message_initial}") + if not next_visit_message_initial["message"]["instrument"]: + logging.info("Message does not have an instrument. Assuming " + "it's not an observation.") + continue + next_visit_message_updated = NextVisitModel( salIndex=next_visit_message_initial["message"]["salIndex"], scriptSalIndex=next_visit_message_initial["message"][