VPNL / fLoc

Functional localizer experiment used to define category-selective cortical regions
20 stars 18 forks source link

behavioral response calculation #3

Closed sedaakbiyik closed 1 year ago

sedaakbiyik commented 1 year ago

Hi! Thanks so much for this great repository.

I'm planning on using this localizer for a study, and while working on the code, I noticed a bug in the calculation of hit rates and false alarms that has to do with the function 'record_keys', and its outputs.

It seems that the function 'record_keys' returns an 'ie' value of '0' if there's a response, and '1' if there's no response, since the specification is done based on an 'isempty' description (i.e., 1 if the vector is empty and 0 if not). Later when 'record_keys' is called in 'flocSession', a vector of 'ii_press' is generated based on this 'ie' value, which is then used to compute hit rates and false alarms. So no response is counted as 1 and response is counted as 0 since the calculation is done on 'is_empty' (also, in flocSession, min is called on ii_press to find the minimum value from responses in the possible response windows, which again makes it such that the output is zero if there's a response in one of the potential windows). An easy fix is to change the 'ie' value to 1 when there's a response, and call 'max' in the flocSession, which fixes the issue for me.

I might be missing something in the rest of the code so please let me know if I'm mistaken, and if I shouldn't have experienced this issue in the first place!