Commit 888a679a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Accept filtered_func_data_clean.nii.gz as melodic data file

parent c17195b5
...@@ -133,10 +133,18 @@ def getDataFile(meldir): ...@@ -133,10 +133,18 @@ def getDataFile(meldir):
if topDir is None: if topDir is None:
return None return None
dataFile = op.join(topDir, 'filtered_func_data') # People often rename filtered_func_data.nii.gz
# to something like filtered_func_data_clean.nii.gz,
# because that is the recommended approach when
# performing ICA-based denoising). So we try both.
candidates = ['filtered_func_data', 'filtered_func_data_clean']
try: return fslimage.addExt(dataFile) for candidate in candidates:
except fslimage.PathError: return None dataFile = op.join(topDir, candidate)
try: return fslimage.addExt(dataFile)
except fslimage.PathError: continue
return None
def getMeanFile(meldir): def getMeanFile(meldir):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment