From 096f9300f07db6e69a0a57b2d28a304249bf343d Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Thu, 4 Jan 2024 10:37:17 +0100 Subject: [PATCH] TMSS-2877: added more generic method get_sap_pointings --- SAS/TMSS/backend/services/scheduling/lib/constraints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SAS/TMSS/backend/services/scheduling/lib/constraints.py b/SAS/TMSS/backend/services/scheduling/lib/constraints.py index 9632d84f235..4b85778380d 100644 --- a/SAS/TMSS/backend/services/scheduling/lib/constraints.py +++ b/SAS/TMSS/backend/services/scheduling/lib/constraints.py @@ -944,6 +944,10 @@ def get_calibrator_sap_pointings(observation_task: models.TaskBlueprint) -> []: return [ Pointing(**observation_task.specifications_doc['calibrator']['pointing']) ] return [] +def get_sap_pointings(observation_task: models.TaskBlueprint) -> []: + ''' get a list of all calibrator or target pointings depending on the type of observation''' + return get_calibrator_sap_pointings(observation_task) + get_target_sap_pointings(observation_task) + def get_transit_offset_reference_pointing(observation_task: Union[models.TaskBlueprint, models.TaskDraft]) -> []: ''' return the sky constraints reference pointing if given, else None''' constraints = observation_task.scheduling_unit.scheduling_constraints_doc -- GitLab