Skip to content

Commit

Permalink
NPI-3668 add unit test assertions for extra SP3 header field (stated …
Browse files Browse the repository at this point in the history
…count of SVs in the SP3), and for checking that union of SV_INFO and the orbit accuracy codes within it, work correctly when merging
  • Loading branch information
treefern committed Dec 23, 2024
1 parent 40ce5f3 commit 9e08add
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,16 @@ def test_sp3merge(self):
self.assertEqual(result.attrs["HEADER"].HEAD.AC, "AIES")
self.assertEqual(result.attrs["HEADER"].HEAD.COORD_SYS, None)
self.assertEqual(result.attrs["HEADER"].HEAD.PV_FLAG, "P")
self.assertEqual(
int(result.attrs["HEADER"].HEAD.SV_COUNT_STATED),
34,
"Header stated count of SVs should be 34, matching actual number of SVs",
)
self.assertEqual(result.attrs["HEADER"].SV_INFO.shape[0], 34, "Union of SV lists should have 34 SVs in it")
# Sample first three orbit accuracy codes and ensure that for each SV, the accuracy code value is the
# *worst* seen across all inputs. I.e. lowest common denominator of input files.
self.assertEqual(
all(result.attrs["HEADER"].SV_INFO.values.astype(int)[0:3]),
all([10, 8, 4]),
"Combining SV accuracy codes should give the *worst* value seen for each SV",
)

0 comments on commit 9e08add

Please sign in to comment.