Skip to content

Commit

Permalink
Modify DATA_START_ROW
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Mar 12, 2024
1 parent fdb51b8 commit 567fa84
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tardis/io/model/readers/stella.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class STELLAModel:
("\s+total mass\s+(\d+\.\d+E[+-]\d+)\s+\d+\.\d+E[+-]\d+", "total_mass"),
]

DATA_START_ROW = 6

DATA_START_ROW = 5
COLUMN_WITH_UNIT_RE = re.compile("(.+)\s+\((.+)\)")


Expand All @@ -46,9 +45,8 @@ def read_stella_model(fname):
for i, line in enumerate(fh):
if i < len(HEADER_RE_STR):
header_re_match = header_re[i].match(line)

metadata[HEADER_RE_STR[i][1]] = header_re_match.group(1)
elif i + 1 == DATA_START_ROW:
elif i == DATA_START_ROW:
if "mass of cell" in line:
column_names_raw = re.split(r"\s{3,}", line.strip())
break
Expand Down

0 comments on commit 567fa84

Please sign in to comment.