Skip to content

Commit 0048c9c

Browse files
committed
legacy format: support magic 12
1 parent b184026 commit 0048c9c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/stagpy/stagyyparsers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def _legacy_header(
396396
sfield = True
397397

398398
magic %= 100
399-
if magic < 9 or magic > 11:
399+
if magic < 9 or magic > 12:
400400
raise ParsingError(filepath, f"{magic=:d} not supported")
401401

402402
header_info = _HeaderInfo(magic, nval, sfield, readbin, {})
@@ -433,6 +433,14 @@ def _legacy_header(
433433

434434
header["ti_ad"] = readbin("f") # magic >= 3
435435
header["erupta_total"] = readbin("f") # magic >= 5
436+
if magic >= 12:
437+
header["erupta_ttg"] = readbin("f")
438+
header["intruda"] = readbin("f", 2)
439+
header["ttg_mass"] = readbin("f", 3)
440+
else:
441+
header["erupta_ttg"] = 0.0
442+
header["intruda"] = np.zeros(2)
443+
header["ttg_mass"] = np.zeros(3)
436444
header["bot_temp"] = readbin("f") # magic >= 6
437445
header["core_temp"] = readbin("f") if magic >= 10 else 1
438446
header["ocean_mass"] = readbin("f") if magic >= 11 else 0.0

0 commit comments

Comments
 (0)