Skip to content

Commit

Permalink
add support for GE P-file rev 29.1 & 30.0 (#117)
Browse files Browse the repository at this point in the history
* Update ge_hdr_fields.py

added support for rev 29,30

* Update ge_read_pfile.py

added rev29.1, 30.0
  • Loading branch information
hfxcarl authored Nov 7, 2023
1 parent 933008e commit d176e14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec2nii/GE/ge_hdr_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ def get_pfile_hdr_fields(version):
plist.append(('pad_xx', ct.c_char * 51))
plist.append(('rhi_image_uid', ct.c_char * 32))

elif version_major in (26, 27, 28):
elif version_major in (26, 27, 28, 29, 30):
plist.append(('rhr_rh_rdbm_rev', ct.c_float))
plist.append(('rhr_rdb_hdr_off_data', ct.c_int))
plist.append(('pad_xx', ct.c_char * 84))
Expand Down
6 changes: 4 additions & 2 deletions spec2nii/GE/ge_read_pfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def is_ge_file(self):
157276, # v24 empirical
213684, # 26.002
219828, # 27.000
228020 # 28.003
228020 # 28.003,29.1,30.0
):
return True
else:
Expand Down Expand Up @@ -318,7 +318,9 @@ def _version(self, filelike):
25.001, 25.002, 25.003, 25.004,
26.000, 26.001, 26.002,
27.000, 27.001,
28.000, 28.002, 28.003
28.000, 28.002, 28.003,
29.1,
30.0
]

# Note that caution is needed for float comparisons, given the
Expand Down

0 comments on commit d176e14

Please sign in to comment.