From c0a53e6038bb1b54634b6efac579d162be88fed7 Mon Sep 17 00:00:00 2001
From: Marko Mecina <marko.mecina@univie.ac.at>
Date: Thu, 13 Oct 2022 13:20:21 +0200
Subject: [PATCH] accept text formatted arguments for DP items in TCs

---
 Ccs/ccs_function_lib.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Ccs/ccs_function_lib.py b/Ccs/ccs_function_lib.py
index c93967b..ae0e2f9 100644
--- a/Ccs/ccs_function_lib.py
+++ b/Ccs/ccs_function_lib.py
@@ -1989,10 +1989,18 @@ def tc_param_alias(param, val, no_check=False):
         else:
             # subtract offset from PID to be compatible with IASW (CHEOPS only)
             if param in ['DPP70004', 'DPP70043']:
-                val -= pid_offset
+                try:
+                    val -= pid_offset
+                except TypeError:
+                    val = DP_ITEMS_TO_IDS[val]
+                    val -= pid_offset
     else:
         if param in ['DPP70004', 'DPP70043']:
-            val -= pid_offset
+            try:
+                val -= pid_offset
+            except TypeError:
+                val = DP_ITEMS_TO_IDS[val]
+                val -= pid_offset
 
     if paf is not None:
 
-- 
GitLab