NYU-DiffusionMRI / mppca_denoise

28 stars 13 forks source link

subtracting from empty variable #1

Closed sjoerdvos closed 4 years ago

sjoerdvos commented 7 years ago

In the denoising for-loop (starting line 157) there is a possibility that on line 184 the variable t is empty. In terms of the noise and signal this is handles by an isempty if-statement (lines 186-198) but for the npars parameter it's not, which makes it crash if t is empty. I suggest adding that to the isempty if-statement to resolve it. (Or, neither npars nor Npars is actually returned just remove it)

jelleveraart commented 7 years ago

Hi Sjoerd. Thanks for reporting this bug. Problem should be solved now.