Skip to content

Commit 1337180

Browse files
committed
Decoder verbose + remove footer check (unused) + parquet
1 parent ebd31ac commit 1337180

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Telemetry-Main/scripts/fsdaq_decoder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
data_left = len(data[pos:])
4949
len_of_frame = sum([x[1] for x in colTypes])
5050
chunks = np.floor(data_left / len_of_frame)
51-
misc_bytes = (data_left % len_of_frame) - 8
51+
misc_bytes = (data_left % len_of_frame) #Used to be -8 for footer but ignoring footer
5252
print(f"chunks left: {chunks}")
5353
print(f"misc bytes left: {misc_bytes}")
5454
frames = []
@@ -79,5 +79,6 @@
7979
frames.append(pl.DataFrame(frame_pieces))
8080
df = pl.concat(frames, how="vertical")
8181
# print(df)
82-
print(f"Stuff Left: {ascii(data[pos:])}")
83-
df.write_csv(args.output_file)
82+
if v:
83+
print(f"Stuff Left: {ascii(data[pos:])}")
84+
df.write_parquet(args.output_file)

0 commit comments

Comments
 (0)