cvnlab / GLMsingle

A toolbox for accurate single-trial estimates in fMRI time-series data
BSD 3-Clause "New" or "Revised" License
98 stars 42 forks source link

fix calcbadness using special case for zero divisions. #102

Closed iancharest closed 1 year ago

iancharest commented 1 year ago

I noticed a bug when some datasets lead to zero divides in calcbadness.

kendrickkay commented 1 year ago

I looked through. Seems fine to me. I am not entirely sure what scenario you are encountering, but a common/probable one is when you have "zero" voxels, like voxels outside the brain that get set to zero or something. It seems like you already ported zerodiv.py but maybe you just cleaned it up?

Anyway, seems fine to me, so I'll go ahead and merge