Skip to content

Commit

Permalink
Removed Lo DE segmented packet string commas (IMAP-Science-Operations…
Browse files Browse the repository at this point in the history
…-Center#1144)

* removed packet seg commas

* updated unit test
  • Loading branch information
sdhoyt authored Nov 13, 2024
1 parent 812ddc2 commit 8319fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion imap_processing/lo/l0/lo_science.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def combine_segmented_packets(dataset: xr.Dataset) -> xr.Dataset:
# Mark the segment splits with comma to identify padding bits
# when parsing the binary
dataset["events"] = [
",".join(dataset["data"].values[start : end + 1])
"".join(dataset["data"].values[start : end + 1])
for start, end in zip(seg_starts, seg_ends)
]
# drop any group of segmented packets that aren't sequential
Expand Down
4 changes: 2 additions & 2 deletions imap_processing/tests/lo/test_lo_science.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ def test_combine_segmented_packets(segmented_pkts_fake_data):
dataset["events"].values,
np.array(
[
"0000000001,0000000010,0000000100,0000001000",
"0000000001000000001000000001000000001000",
"0000010000",
"0100000000,1000000000",
"01000000001000000000",
]
),
)
Expand Down

0 comments on commit 8319fe5

Please sign in to comment.