Skip to content

Commit

Permalink
MISC: cosmit in example
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed May 13, 2015
1 parent 602f5bd commit 5f67862
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions examples/plot_localizer_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,20 @@
ax.set_title('Design matrix')
plt.savefig(path.join(write_dir, 'design_matrix.png'))

########################################
# Perform a GLM analysis
########################################

fmri_glm = FMRILinearModel(epi_img,
design_matrix.matrix, mask='compute')
fmri_glm.fit(do_scaling=True, model='ar1')

#########################################
# Specify the contrasts
# Estimate contrasts
#########################################

# Specify the contrasts

# simplest ones
contrasts = {}
n_columns = len(design_matrix.names)
Expand All @@ -94,17 +104,6 @@
contrasts["reading-visual"] = contrasts["sentences"] * 2 - \
contrasts["damier_H"] - contrasts["damier_V"]

########################################
# Perform a GLM analysis
########################################

fmri_glm = FMRILinearModel(epi_img,
design_matrix.matrix, mask='compute')
fmri_glm.fit(do_scaling=True, model='ar1')

#########################################
# Estimate the contrasts
#########################################

for index, (contrast_id, contrast_val) in enumerate(contrasts.items()):
print(' Contrast % 2i out of %i: %s' %
Expand Down

0 comments on commit 5f67862

Please sign in to comment.