From 1172252d30eb185fee33b1e2346f5a449eed100d Mon Sep 17 00:00:00 2001
From: Niklas Reinhardt <janniklas.reinhardt@aei.mpg.de>
Date: Tue, 25 Jan 2022 13:30:46 +0100
Subject: [PATCH] Correct neglection of TPS in tps_proper_time_deviations

---
 lisainstrument/instrument.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisainstrument/instrument.py b/lisainstrument/instrument.py
index b23a56e..76e5c23 100644
--- a/lisainstrument/instrument.py
+++ b/lisainstrument/instrument.py
@@ -553,7 +553,12 @@ class Instrument:
             logger.debug("Interpolating proper pseudo-range derivatives")
             self.d_pprs = ForEachMOSA(lambda mosa: d_pprs(mosa)(self.physics_t))
             logger.debug("Interpolating proper time deviation from TCB")
-            self.tps_proper_time_deviations = ForEachSC(lambda sc: tps_proper_time_deviations(sc)(self.telemetry_t))
+            if self.orbit_dataset =='tcb/ltt':
+                self.tps_proper_time_deviations = ForEachSC(0)
+            elif self.orbit_dataset == 'tps/ppr':
+                self.tps_proper_time_deviations = ForEachSC(lambda sc: tps_proper_time_deviations(sc)(self.telemetry_t))
+            else:
+                raise ValueError(f"invalid orbit dataset '{self.orbit_dataset}'")
         except ValueError as error:
             logger.error("Missing orbit information at \n%s", self.physics_t)
             raise ValueError("missing orbit information, use longer orbit file or adjust sampling") from error
-- 
GitLab