"reversed activation" first-level analysis


I am trying to perform a first-level analysis on nilearn but my results seem odd. The regions that are supposed to be more activated when the subject is moving his right finger (like the left motor cortex) are less activated and vice versa. We tried to process our data on spm and everything worked fine.

This is how I created my contrasts:

 contrast_matrix = np.eye(design_matrix.shape[1])
 basic_contrasts = dict([(column, contrast_matrix[i]) for i, column in enumerate(design_matrix.columns)]
 contrasts = {'move - hold': basic_contrasts['move'] - basic_contrasts['hold'],\
                      'imagine - hold': basic_contrasts['imagine'] - basic_contrasts['hold'],\
                      'move - imagine': basic_contrasts['move'] - basic_contrasts['imagine']}

I am new here so I can’t post screenshots but I will try to describe one of my contrast. For “move - hold” there is a black square under “hold”, a white one under “move” and some grey ones elsewhere.

Does someone know how to solve this problem ?

Hello and welcome to NeuroStars!

Might be a bit difficult without screenshots to help but let’s see what we can do.

First, can you confirm your design matrix is correct? That is, look at your event timings and see if it lines up with the columns in the design matrix ?

Then make sure the elements basic_contrasts match up with the columns they are supposed to. For example, does the location of the 1 in the output of basic_contrasts['move'] match the column index of the design matrix?

Then, for the contrasts, you should see that black and white values correspond to 1 and -1, with grays being 0 everywhere else. Does this tend to match what is expected?

And then what code are you using to plot your contrasts?


Thank you for your answer !

My design matrix seems correct, and the elements of basic_contrats match my Design Matrix.
The first column is hold, the second one is imagine and the third one move.
And this is the content of basix_contrasts:
hold [1. 0. 0. 0. …]
imagine [0. 1. 0. 0. …]
move [0. 0. 1. 0. …]

In my contrast scale, black value is equal to -1, white is equal to 1 and grey is equal to 0.

I use this code to plot my contrast:

report = fmri_glm_ensemble.generate_report(contrasts, title=title, bg_img='MNI152TEMPLATE', threshold=0, alpha=0.001, cluster_threshold=10, height_control='fpr', min_distance=8.0, plot_type='glass', display_mode=None, report_dims=(1600, 800))