maartenmennes/ICA-AROMA

ValueError: cannot convert float NaN to integer

nbounoua opened this issue · 3 comments

Hello,
I wanted to follow-up on this issue we are having with some of our participants. We looked further into our data, and at least some of the cases where we are getting NaNs appears to be because one or more of the estimated motion parameter columns are all 0, so it's trying to correlate with a constant. Do you have suggestions on what we can do about this? As a short term solution, would be ok to replace the 0 columns with one of the non-0 columns?

Hi, Just wanted to bring this back to your attention. Thanks for the help!

Hi, I would be worried by motion parameter columns being exactly 0... Has this data been motion corrected (and realigned) before? Rather than a temporary fix, I would look into the origin of these values, as this is not expected with typical data (unless you're scanning fixed objects)...

Hi,
Thank you for your response!

We wondered the same thing and checked into it, but it doesn't seem to be an error. Specifically, (i) the motion corrected data looks reasonable, (ii) we only see it for people who move very little, and we don't see it in samples that overall move more (i.e., adolescents), (iii) the nan error is happening for people who don't have actually have all 0's - b/c they sample only 90% of the timepoints, there are people who have a few non-0 timepoints who are also showing the nan error, and (iv) the (near) constant columns are always the y (and sometimes z) rotation columns, which is the least likely to move, given the way we pack people in.

If this is the case, is the proposed solution is ok and is there a way to update the code so that it would ignore nans for these correlations with motion parameters?

Thank you for the help!