surfplot icon indicating copy to clipboard operation
surfplot copied to clipboard

mismatch between Surfplot and Freeview

Open pinilorenzo opened this issue 1 year ago • 1 comments

I have a .mgh file representing a <significance_map> in fsaverage space. I am attempting to visualize it on Surfplot:

from surfplot import Plot from neuromaps.datasets import fetch_fsaverage import nibabel as nib

left = nib.load('/lh.glmdir/FSGD_acute_vs_controls/cache.th40.pos.sig.cluster.lh.mgh')
right = nib.load('/rh.glmdir/FSGD_acute_vs_controls/cache.th40.pos.sig.cluster.rh.mgh')
fsagg=np.concatenate([left.get_fdata().flatten(),right.get_fdata().flatten()])

surfaces = fetch_fsaverage(density='164k') lh, rh = surfaces['inflated'] p = Plot(lh,rh, views=['medial', 'lateral'], flip=False, zoom=1.2) p.add_layer(fslr_agg, zero_transparent=True, as_outline=False, cbar=True, cmap='Reds') p.build()

The process runs successfully. However, upon comparing this result with the fsaverage inflated in freeview, significant differences emerge. The mapping appears in entirely different regions. What might be incorrect in the above code?

Thanks, L

pinilorenzo avatar Jan 01 '24 22:01 pinilorenzo

Hi @pinilorenzo thank you for bringing this to my attention. Is it possible to share the files or screenshots of the differences? Or if not, are you able to recreate this issue with some mock data? I will look into this and try and recreate it locally

What version of surfplot and matplotlib are you running?

Thanks for your patience

danjgale avatar Jan 16 '24 15:01 danjgale