Skip to content

Commit

Permalink
Add l0 parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
liamgreenlee committed Feb 7, 2023
1 parent 8a0f31c commit d40c478
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions hermes_eea/calibration/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@ def calibrate_file(data_filename: Path) -> Path:
file_metadata["instrument"] == hermes_eea.INST_NAME
and file_metadata["level"] == "l0"
):
# data = parse_l0_sci_packets(data_filename)
data = {}
# test opening the file
with open(data_filename, "r") as fp:
pass
data = parse_l0_sci_packets(data_filename)

level1_filename = l0_sci_data_to_cdf(data, data_filename)
output_filename = level1_filename
elif (
Expand Down Expand Up @@ -152,7 +149,7 @@ def parse_l0_sci_packets(data_filename: Path) -> dict:
log.info(f"Parsing packets from file:{data_filename}.")

pkt = ccsdspy.FixedLength.from_file(
os.path.join(hermes_eea._data_directory, "EEA_sci_packet_def.csv")
os.path.join(hermes_eea._data_directory, "hermes_EEA_sci_packet_def.csv")
)
data = pkt.load(data_filename)
return data
Expand Down
Binary file added hermes_eea/data/hermes_EEA_l0_2023038-000000_v0.bin
Binary file not shown.
Binary file removed hermes_eea/data/hermes_EEA_l0_example_v0.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion hermes_eea/data/hermes_EEA_sci_packet_def.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ SHEID, uint, 8
STEP, uint, 8
COUNTER1, uint, 16
COUNTER2, uint, 16
ACCUM, "int(34)", 12
ACCUM, "uint(34)", 12
CKSUM16, uint, 16

0 comments on commit d40c478

Please sign in to comment.