Skip to content

Commit

Permalink
Fixes #11
Browse files Browse the repository at this point in the history
The last column of the dat file was not being read in due to incorrect parsing of ;END DEFN on the last line.
  • Loading branch information
leonfoks committed Oct 17, 2023
1 parent cad84bc commit b63477a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gspy/src/utilities/aseg_gdf_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ def parse_dfn_file(self, dfn_file_name):
dfn_md = {}
for line in lines[1:]:
if "END DEFN" in line:
break
line = line.replace(";END DEFN", "")

info = line.split(";")[-1]
tmp = info.split(":")

if len(tmp) == 1:
break

standard_name, format = tmp[:2]

if ' ' in standard_name:
Expand Down

0 comments on commit b63477a

Please sign in to comment.