neurostuff / NiMARE

Coordinate- and image-based meta-analysis in Python
https://nimare.readthedocs.io
MIT License
176 stars 56 forks source link

The correlation matrix should be calculated in signal voxels #888

Open JulioAPeraza opened 1 month ago

JulioAPeraza commented 1 month ago

Summary

I now notice that we calculate the correlation matrix in Stouffers in all the voxels, even the ones with 0 or Nan. I think we can apply the aggressive mask to all images and then calculate the correlation matrix. We can also save that matrix in the estimator because we will use it in the report module.

Additional details

Saving the matrix will decrease the computation time in the Workflows but at the cost of extra memory in the estimator class.

Next steps

Apply the aggressive mask and calculate the correlation matrix in _preprocess_input. This will only affect Stouffers estimator.

JulioAPeraza commented 1 month ago

For the liberal masking approach, I also realized that the voxel mask and study mask image-base inputs (e.g., beta and varcope) may differ. So we need to create and join with the mask across different inputs here

https://github.com/neurostuff/NiMARE/blob/2f0fa61a21a3fcd70f74e6d949d4bc3ad1c50851/nimare/meta/ibma.py#L144-L147