Skip to content

Commit

Permalink
fix: replace . with _ in regex substitution, as naming changed in…
Browse files Browse the repository at this point in the history
… latest `imap-processing` release
  • Loading branch information
mfacchinelli committed Jan 22, 2025
1 parent b406977 commit 0faceff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/imap_mag/imapProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def process(self, file: Path) -> Path:
value = value.raw_value
elif hasattr(value, "decode"):
value = int.from_bytes(value, byteorder="big")
dataDict[apid][key].append(value)
dataDict[apid][
re.sub(r"^mag_hsk_[a-zA-Z0-9]+\_", "", key.lower())
].append(value)

# Convert data to xarray datasets.
datasetDict = {}
Expand All @@ -110,7 +112,7 @@ def process(self, file: Path) -> Path:

ds = xr.Dataset(
{
re.sub(r"^mag_hsk_[a-zA-Z0-9]+\.", "", key.lower()): (
key: (
"epoch",
value,
)
Expand Down

0 comments on commit 0faceff

Please sign in to comment.