You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several things to note and they might be related to #310:
The way iplot works is that it calls nilearn.plotting.view_image under the hood which computes its threshold using this helper function. It turns out this is computed over the entire nifti image with no ability specify a mask. This means the percentile threshold will routinely be lower forbrain.iplot() than brain.plot() producing different figures. See the issue I opened here to track this is on the nilearn side: view_img percentile threshold behavior is a bit confusing nilearn/nilearn#2112
iplot also has no way of specifying something comparable to threshold_lower in plot and instead uses the absolute value of the image and a single threshold. This means that maps that have negative and positive values will have different percentile bounds with both methods. plot takes into account the fact that distributions can be non-symmetrial whereas iplot does not
Alsop worth noting that when percentile thresholding is performed on maps constructed using ROI masks, the bounds are determined using all voxels rather than rois, which means that the bounds are actually a bit more stringent than they ought to be.
TL;DR Dont use percentile thresholding with Brain_Data.iplot() for the moment. It produces results different from what you probably want.
The text was updated successfully, but these errors were encountered:
Several things to note and they might be related to #310:
The way
iplot
works is that it callsnilearn.plotting.view_image
under the hood which computes its threshold using this helper function. It turns out this is computed over the entire nifti image with no ability specify a mask. This means the percentile threshold will routinely be lower forbrain.iplot()
thanbrain.plot()
producing different figures. See the issue I opened here to track this is on the nilearn side: view_img percentile threshold behavior is a bit confusing nilearn/nilearn#2112iplot
also has no way of specifying something comparable tothreshold_lower
inplot
and instead uses the absolute value of the image and a single threshold. This means that maps that have negative and positive values will have different percentile bounds with both methods.plot
takes into account the fact that distributions can be non-symmetrial whereasiplot
does notAlsop worth noting that when percentile thresholding is performed on maps constructed using ROI masks, the bounds are determined using all voxels rather than rois, which means that the bounds are actually a bit more stringent than they ought to be.
TL;DR Dont use percentile thresholding with
Brain_Data.iplot()
for the moment. It produces results different from what you probably want.The text was updated successfully, but these errors were encountered: