Skip to content

Commit

Permalink
add exception for fieldmap series using the muxarcepi psd
Browse files Browse the repository at this point in the history
  • Loading branch information
lmperry committed Jul 24, 2018
1 parent bf0ca12 commit 593af67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"flywheel": {
"suite": "Stanford CNI"
},
"version": "1.3.0",
"version": "1.3.1",
"custom": {
"docker-image": "stanfordcni/pfile-mr-classifier:1.3.0"
"docker-image": "stanfordcni/pfile-mr-classifier:1.3.1"
},
"config": {
"timezone": {
Expand Down
8 changes: 6 additions & 2 deletions pfile-mr-classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def get_pfile_classification(pfile):
"""
classification = {}
PSD = pfile.psd_name.lower()
SERIES_DESCRIPTION = pfile.series_description.lower()

# If this pfile is from one of the muxarcepi sequences (CNI specific), then
# we use our knowledge of the sequence to classify the file.
if PSD.startswith('muxarcepi'):
Expand All @@ -35,10 +37,11 @@ def get_pfile_classification(pfile):
classification['Measurement'] = ['T2*']
classification['Intent'] = ['Functional']
classification['Features'] = ['Multi-Echo']
elif PSD == 'muxarcepi':
elif PSD == 'muxarcepi' and SERIES_DESCRIPTION.find('fieldmap') == -1:
classification['Measurement'] = ['T2*']
classification['Intent'] = ['Functional']
else:
log.info("Using series description for classification!")
classification = classification_from_label.infer_classification(pfile.series_description)

# If this is multi-band, we add that to the classification.
Expand All @@ -48,7 +51,7 @@ def get_pfile_classification(pfile):
else:
classification['Features'] = ['Multi-Band']

# Custome MUXRECON classification. This denotes that we should use muxrecon
# Custom MUXRECON classification. This denotes that we should use muxrecon
# for reconstruction.
if classification.has_key('Custom'):
classification['Custom'].append('MUXRECON')
Expand All @@ -75,6 +78,7 @@ def get_pfile_classification(pfile):
classification['Measurement'] = ['Spectroscopy']

else:
log.info("Using series description for classification!")
classification = classification_from_label.infer_classification(pfile.series_description)

return classification
Expand Down

0 comments on commit 593af67

Please sign in to comment.