Skip to content

Commit

Permalink
Merge pull request #207 from adelavega/fix/input_ix
Browse files Browse the repository at this point in the history
FIX: FEMA input index should filter on rows, not columns.
  • Loading branch information
effigies authored Dec 13, 2019
2 parents a53f76e + 86aec54 commit 99e518d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fitlins/interfaces/nistats.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@ def _run_interface(self, runtime):

# Pass-through happens automatically as it can handle 1 input
if contrast_type == 'FEMA':
# Filter effects and variances based on weights
ix = weights[0].astype(bool)
# Index design identity matrix on non-zero contrasts weights
con_ix = weights[0].astype(bool)
# Index of all input files "involved" with that contrast
dm_ix = mat.iloc[:, con_ix].any(axis=1)

ffx_res = compute_fixed_effects(
np.array(filtered_effects)[ix],
np.array(filtered_variances)[ix]
np.array(filtered_effects)[dm_ix],
np.array(filtered_variances)[dm_ix]
)

maps = {
Expand Down

0 comments on commit 99e518d

Please sign in to comment.