This algorithm denoising data using PCA. Code was implemeted based on the algorithm suggested by:
Veraart et al. Denoising of diffusion MRI using random matrix theory (2016). Neuroimage 142:394-406
This algorithm is the reference code that I've implemented for my PhD thesis:
If you use this code, please cite the two references pointed above.