Hi - I have run tedana in both 23.0.2 and 24.0.1 following fmriprep. There is a change in 24.0.1 output in which there is a grey shadow around each image of the ICA components in the tedana report. This is not present in 23.0.2. I am not sure if this indicates a problem with the masking, or simply a quirk of the changes to the report html display. It doesn’t seem to be present in images of the instructions. I indicated to use the mask from the output of fMRIprep. The identified components also differ between the two versions. I am not sure which output to believe, so advice would be most helpful.
@tsalo can probably shed more light on this issue, but fro your description, it looks like the mask from fmriprep is rather large, extending well beyond the edges of the brain. The gray there would be near zero loading from the components, in comparison to the tissue which has the signal related to the ICs.
The mask does seem larger than I would expect, guessing that would include skull/skin?
As for which one to believe, that is a harder question - probably both are usable, assuming both removed noise/preserved signal. I’d be inclined to trust the newer version, because it included more brain (but also more pure noise, so it is a tough choice).
I’ve noticed the same thing. I don’t think the mask is the problem, but you can check the adaptive mask plot in the HTML report to be sure. I think it’s just a minor bug in Nilearn’s plot_stat_map function.
Thanks for the thoughts! Indeed the adaptive mask, looks ok. So it sounds from @tsalo that its just a display bug and the outputs still probably ok for checking and manual classification (ignoring the grey)?
I’m not sure specifically how this happened, but I have two guesses. Between v23 & 24 we changed to using nilearn to display the images. Our old version was very simplistic and just plotted the a colormap of each matrix. nilearn is using information, like the voxel sizes.
Guess 1. Our color scale goes from the 2nd percentile to the 98th percentile. If nilearn.plot_stat_map is plotting values below the 2nd percentile as gray rather than white, then perhaps there are a bunch of voxels that are rounding errors about zero rather than exactly zero and are appearing as gray. You can test this by opening desc-ICA_components.nii.gz directly and checking what the values actually are.
Guess 2. We define the underlay as bg_img=None so there shouldn’t be any underlay, but there definitely is something there. There is a default atlas (MNI152TEMPLATE) to use if bg_img is undefined. Perhaps something is being set as a background image even when this parameter is set to None? Are your data aligned to a template space? If not, maybe this is the issue.
Thanks @handwerkerd. I have opened desc-ICA_components.nii.gz (in fsleyes) and anything that is not in the brain has a value of 0 (as per fsleyes). If there is a rounding error, I don’t see it.
I ran the standard fmriprep pipeline, so the the input images I am using are aligned to the anatomical, not the template space at all.
If I go into the static_figures.py and hash out the bg_image=None flag, it make no difference to the figures, so it may not be doing anything.