database_file = join(dirname(nimare.__file__), 'tests/data/nidm_pain_dset.json')
db = nimare.dataset.Database(database_file)
ds = db.get_dataset()
kernel = nimare.meta.cbma.MKDAKernel(ds.coordinates, ds.mask)
mkda_r08 = kernel.transform(ids=ds.ids, r=8)
mkda_r09 = kernel.transform(ids=ds.ids, r=9)
mkda_r10 = kernel.transform(ids=ds.ids, r=10)
mkda_r11 = kernel.transform(ids=ds.ids, r=11)
fig, axes = plt.subplots(nrows=4, ncols=1, figsize=(10, 17.5))
plot_stat_map(mkda_r08[2], cut_coords=[-2, -10, -4],
title='r=8mm', vmax=2, axes=axes[0],
draw_cross=False)
plot_stat_map(mkda_r09[2], cut_coords=[-2, -10, -4],
title='r=9mm', vmax=2, axes=axes[1],
draw_cross=False)
plot_stat_map(mkda_r10[2], cut_coords=[-2, -10, -4],
title='r=10mm', vmax=2, axes=axes[2],
draw_cross=False)
plot_stat_map(mkda_r11[2], cut_coords=[-2, -10, -4],
title='r=11mm', vmax=2, axes=axes[3],
draw_cross=False)
fig.savefig('mkda_ma_maps.png', dpi=400)