From 9a9fd4d493b870cedfd4016f6d20b6d15a737430 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Bayle <j2b.bayle@gmail.com>
Date: Tue, 18 Oct 2022 16:54:37 +0100
Subject: [PATCH] Rename `orbits_t0` to `orbit_t0` for consistency

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

diff --git a/lisainstrument/instrument.py b/lisainstrument/instrument.py
index 250fcb7..3a09981 100755
--- a/lisainstrument/instrument.py
+++ b/lisainstrument/instrument.py
@@ -534,7 +534,7 @@ class Instrument:
                 # Switch between various fplan file standards
                 if version in SpecifierSet('== 1.1.*', True):
                     logger.debug("Interpolating locking beatnote frequencies with piecewise linear functions")
-                    times = self.orbits_t0 + np.arange(fplanf.attrs['size']) * fplanf.attrs['dt']
+                    times = self.orbit_t0 + np.arange(fplanf.attrs['size']) * fplanf.attrs['dt']
                     interpolate = lambda x: InterpolatedUnivariateSpline(times, x, k=1, ext='raise')(self.physics_t)
                     lock_beatnotes = {}
                     # Go through all MOSAs and pick locking beatnotes
@@ -571,7 +571,7 @@ class Instrument:
         if orbits == 'static':
             logger.info("Using default set of static proper pseudo-ranges")
             self.orbit_file = None
-            self.orbits_t0 = self.t0
+            self.orbit_t0 = self.t0
             self.pprs = ForEachMOSA({
                 # Default PPRs based on first samples of Keplerian orbits (v2.0.dev)
                 '12': 8.33242295, '23': 8.30282196, '31': 8.33242298,
@@ -600,7 +600,7 @@ class Instrument:
         else:
             logger.info("Using user-provided proper pseudo-ranges and derivatives")
             self.orbit_file = None
-            self.orbits_t0 = self.t0
+            self.orbit_t0 = self.t0
             self.pprs = ForEachMOSA(orbits)
             self.d_pprs = self.pprs.transformed(lambda _, x:
                 0 if np.isscalar(x) else np.gradient(x, self.physics_dt)
@@ -645,9 +645,9 @@ class Instrument:
         try:
             logger.debug("Reading orbit's t0")
             if self.orbit_dataset == 'tcb/ltt':
-                self.orbits_t0 = orbitf['tcb']['t'][0]
+                self.orbit_t0 = orbitf['tcb']['t'][0]
             elif self.orbit_dataset == 'tps/ppr':
-                self.orbits_t0 = orbitf['tps']['tau'][0]
+                self.orbit_t0 = orbitf['tps']['tau'][0]
             else:
                 raise ValueError(f"invalid orbit dataset '{self.orbit_dataset}'")
             logger.debug("Interpolating proper pseudo-ranges")
@@ -673,7 +673,7 @@ class Instrument:
         # show a helpful error message if orbit file is too short
         try:
             logger.debug("Reading orbit's t0")
-            self.orbits_t0 = orbitf.attrs['t0']
+            self.orbit_t0 = orbitf.attrs['t0']
             logger.debug("Interpolating proper pseudo-ranges")
             dataset = orbitf['tcb/ltt'] if self.orbit_dataset == 'tcb/ltt' else orbitf['tps/ppr']
             self.pprs = ForEachMOSA(lambda mosa: interpolate(dataset[:, link_index[mosa]], self.physics_t))
@@ -1794,7 +1794,7 @@ class Instrument:
             'sc_jitter_phi_asds', 'sc_jitter_eta_asds',
             'sc_jitter_theta_asds', 'mosa_jitter_phi_asds',
             'dws_asds', 'mosa_angles',
-            'orbit_file', 'orbit_dataset', 'orbits_t0',
+            'orbit_file', 'orbit_dataset', 'orbit_t0',
             'gw_file', 'gw_group',
             'glitch_file',
             'interpolation_order',
-- 
GitLab