Skip to content

Commit d1b1740

Browse files
committed
NPI-4460 add baseline for SP3 velocity interpolation. Note this is NOT a test against known correct values.
1 parent 06e49d5 commit d1b1740

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

tests/test_sp3.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,8 @@ def test_sp3_clock_nodata_to_nan(self):
12101210
expected_result = pd.DataFrame({("EST", "CLK"): [np.nan, 123456.789, np.nan, 987654.321]})
12111211
self.assertTrue(sp3_df.equals(expected_result))
12121212

1213+
# Note while this does not test a full dataframe, it does use DF.equals(), so we are not adding baselining.
1214+
12131215
def test_sp3_pos_nodata_to_nan(self):
12141216
"""
12151217
This test data represents four 'rows' of data, each with an X, Y and Z component of the Position vector.
@@ -1241,11 +1243,26 @@ def test_velinterpolation(self):
12411243
is to check if the function runs without errors
12421244
TODO: update that to check actual expected values
12431245
"""
1246+
1247+
# TODO note we do not currntly check for a confirmed correct answer. We just check that the answer has
1248+
# not changed from our baseline.
1249+
objects_to_verify: list = []
1250+
12441251
result = sp3.read_sp3(input_data, pOnly=True, strict_mode=STRICT_OFF)
1252+
objects_to_verify.append(result)
1253+
12451254
r = sp3.getVelSpline(result)
1246-
r2 = sp3.getVelPoly(result, 2)
12471255
self.assertIsNotNone(r)
1256+
objects_to_verify.append(r)
1257+
1258+
r2 = sp3.getVelPoly(result, 2)
12481259
self.assertIsNotNone(r2)
1260+
objects_to_verify.append(r2)
1261+
1262+
# UnitTestBaseliner.mode = "baseline"
1263+
# UnitTestBaseliner.create_baseline(objects_to_verify) # DO NOT commit this line un-commented.
1264+
1265+
self.assertTrue(UnitTestBaseliner.verify(objects_to_verify), "Hash verification should pass")
12491266

12501267
def test_sp3_offline_sat_removal_standalone(self):
12511268
"""
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22c1554ab1b7eebdf60995e9eefd2eb5b7f582061d3f1e7813fb0f6b2b5085f9

0 commit comments

Comments
 (0)