Skip to content

Commit

Permalink
Handling for GE presscsi and probe-s sequences. (#63)
Browse files Browse the repository at this point in the history
* Tweaks to DICOM error handling and directory input

* Add handling of presscsi and probe-s sequences.

* Update changelog.
  • Loading branch information
wtclarke authored Feb 6, 2023
1 parent c489e7a commit 79d7635
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
This document contains the Spec2nii release history in reverse chronological order.

0.6.3 (Monday 6th February 2023)
--------------------------------
- Added handling for GE presscsi and probe-s sequences.

0.6.2 (Sunday 5th February 2023)
----------------------------------
- Handle HYPER references in SPAR/SDAT pipeline
Expand Down
7 changes: 4 additions & 3 deletions spec2nii/GE/ge_pfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _process_svs_pfile(pfile):
'''
psd = pfile.hdr.rhi_psdname.decode('utf-8').lower()

if psd == 'probe-p':
if psd in ('probe-p', 'probe-s'):
data, meta, dwelltime, fname_suffix = _process_probe_p(pfile)
elif psd in ('oslaser', 'slaser_cni'):
data, meta, dwelltime, fname_suffix = _process_oslaser(pfile)
Expand Down Expand Up @@ -206,9 +206,10 @@ def _process_mrsi_pfile(pfile):
'''
psd = pfile.hdr.rhi_psdname.decode('utf-8').lower()

if psd not in ('probe-p', 'probe-sl', 'slaser_cni'):
known_formats = ('probe-p', 'probe-sl', 'slaser_cni', 'presscsi')
if psd not in known_formats:
raise UnsupportedPulseSequenceError(
f'Unrecognised sequence {psd}, psdname must be "probe-p", "probe-sl", or "slaser_cni".')
f"Unrecognised sequence {psd}, psdname must be in: {','.join(known_formats)}.")

warn('The interpretation of pfile CSI data is poorly tested; rotations or transpositions of the'
' CSI grid could be present. Spec2nii currently lacks a complete set of CSI test data.'
Expand Down
2 changes: 1 addition & 1 deletion spec2nii/GE/ge_read_pfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_mapper(self):

psd = self.hdr.rhi_psdname.decode('utf-8').lower()

if psd == 'probe-p':
if psd in ('probe-p', 'probe-s'):
mapper = PfileMapper
elif psd in ('oslaser', 'slaser_cni'):
mapper = PfileMapperSlaser
Expand Down

0 comments on commit 79d7635

Please sign in to comment.