Skip to content

Commit

Permalink
MNT: Skip missing value lines from CelesTrak files
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Dec 2, 2024
1 parent 0156cee commit 860c583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymsis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def _load_f107_ap_data() -> dict[str, npt.NDArray]:
if "PRM" in line:
# We don't want the monthly predicted values
continue
if ",,,,,,,," in line:
# We don't want lines with missing values
continue
fout.write(line.encode("utf-8"))
fout.seek(0)
arr = np.loadtxt(
Expand Down
1 change: 1 addition & 0 deletions tests/f107_ap_test_data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,5 @@ DATE,BSRN,ND,KP1,KP2,KP3,KP4,KP5,KP6,KP7,KP8,KP_SUM,AP1,AP2,AP3,AP4,AP5,AP6,AP7,
2000-12-29,2285,19,10,33,17,10,3,10,13,20,117,4,18,6,4,2,4,5,7,6,0.3,1,151,999,175.5,OBS,173.7,174.3,168.4,170.4
2000-12-30,2285,20,13,7,7,10,10,7,0,10,63,5,3,3,4,4,3,0,4,3,0.1,0,152,182.1,176.1,INT,173.5,174.8,168.2,170.9
2000-12-31,2285,21,13,0,3,10,7,0,0,3,37,5,0,2,4,3,0,0,2,2,0.0,0,119,169.5,163.9,PRD,173.3,175.0,168.1,171.0
2001-01-01,2285,21,,,,,,,,,,,,,,,,,,,,,0,169.5,163.9,OBS,173.3,175.0,168.1,171.0
2040-12-01,2825,21,,,,,,,,,,,,,,,,,,,,,0,69.7,67.73,PRM,68.5,68.3,66.8,67.7

0 comments on commit 860c583

Please sign in to comment.