Degrees of freedom after applying dwidenoise

Is it possible to retain the voxel-wise maps of degrees of freedom after applying dwidenoise to data?

My understanding of dwidenoise is that it (1) performs a searchlight, (2) applies PCA within the searchlight, (3) applies Marchenko-Pastur thresholding to identify “signal” and “noise” components from the PCA, (4) reconstructs the searchlight’s data from the the “signal” components, and then (5) averages (maybe?) the denoising results for a given voxel across all searchlights which included that voxel. Based on steps 4 and 5, there should be an average number of components contributing to each voxel in the denoised output (i.e., the degrees of freedom).

Based on the documentation, I don’t think there’s an option to output this map, but I wanted to make sure I wasn’t missing something before opening an issue requesting a new feature.

For context, my interest is primarily in applying dwidenoise to fMRI data, and accounting for the reduced degrees of freedom that come with that denoising later on, in the statistical analysis of the data.

I’m afraid there is no option to output this information currently. It would be trivial to output if required though, so if there’s a lot of interest in this we could always add it in. It would just need to be handled much like the noise map output currently is. Not too difficult to do if someone is willing to invest a bit of time into it…

Thanks! I’m glad I wasn’t wrong in my interpretation, and it seems like it would be worth it to open an issue.

I’ve opened ENH dwidenoise: Optionally output degrees of freedom map · Issue #2312 · MRtrix3/mrtrix3 · GitHub.