Skip to content

Commit 30f75f7

Browse files
authored
Fix bug in _get_ica_confounds (#124)
1 parent 2c48e48 commit 30f75f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fmripost_aroma/interfaces/confounds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get_ica_confounds(mixing, aroma_features, skip_vols, newpath=None):
9898
data=np.ones((padded_mixing_arr.shape[0], 1), dtype=int),
9999
)
100100
confounds_df.to_csv(aroma_confounds, sep='\t', index=False)
101-
return None, mixing_out
101+
return aroma_confounds, mixing_out
102102

103103
# return dummy lists of zeros if no signal components were found
104104
if signal_ics.size == 0:
@@ -182,7 +182,7 @@ def _run_interface(self, runtime):
182182
accepted_idx = metrics_df.loc[metrics_df['classification'] == 'accepted'].index.values
183183
rejected_components = mixing[:, rejected_idx]
184184
accepted_components = mixing[:, accepted_idx]
185-
if not rejected_components:
185+
if rejected_idx.size == 0:
186186
print('No rejected components detected. Returning input data as "denoised".')
187187
self._results['denoised_file'] = bold_file
188188
return runtime

0 commit comments

Comments
 (0)