Generate modeled activation maps with peaks2maps

Start with the necessary imports

import os

import numpy as np
import matplotlib.pyplot as plt
from nilearn.plotting import plot_glass_brain

import nimare
from nimare.tests.utils import get_test_data_path

Load Dataset

dset_file = os.path.join(get_test_data_path(), 'nidm_pain_dset.json')
dset = nimare.dataset.Dataset(dset_file)

Run peaks2maps

k = nimare.meta.cbma.kernel.Peaks2MapsKernel()
imgs = k.transform(dset, masked=True)

Plot modeled activation maps

for img in imgs:
    display = plot_glass_brain(img, display_mode='lyrz',
                               plot_abs=False, colorbar=True,
                               vmax=1, threshold=0)

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery