netstim / leaddbs

Lead-DBS is a MATLAB toolbox facilitating deep brain stimulation electrode localization and connectomic neuroimaging.
https://www.lead-dbs.org
Other
93 stars 98 forks source link

ENH better dealing with subthreshold values. #1136

Closed andreashorn closed 8 months ago

andreashorn commented 8 months ago

This PR adds changes that could affect results in ongoing analyses. While no real bugs before, dealing subthreshold Efield values had been misleading before.

Sweetspot explorer: Before this change: For each E-field, values below the efieldthreshold were set to nan for each individual E-field.

After this change: Values of pixels that do not meet criteria (coverthreshold & efieldthreshold) are set to Nan.

-> This better reflects what is suggested to happen by the GUI and may add power to some pixels.

Fibefiltering explorer: Before this change: Fibervalues that did not meet criteria of being "connected" to specific efields (connthreshold) were set to 0. In posthoc stats, this may have led to these fibers not excluded but these could still be part of e.g. the Spearman correlation.

After this change: Instead of setting to zero, values will be set to nan, leading to them being ignored entirely.

-> This better reflects what is suggested to happen by the GUI and leads to proper exclusion of fibers that do not meet criteria.