Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in extraction of reaction times. #2

Open
michaelsiniscalchi opened this issue Jul 8, 2019 · 0 comments
Open

Error in extraction of reaction times. #2

michaelsiniscalchi opened this issue Jul 8, 2019 · 0 comments

Comments

@michaelsiniscalchi
Copy link

This code actually gets reaction times ONLY from trials in which the lick bout begins before the cue, rather than the remaining trials:

%Reaction time
temp = find(respTimes>=trialData.cueTimes(idx(i)),1,'first');
trialData.reaction(idx(i)) = CODE(respIdx(temp));
% if there is no lick for 0.5 s before cue onset (i.e., mouse not licking prior to cue)
if sum((respTimes-respTimes(temp))>-0.5 & (respTimes-respTimes(temp))<0)
trialData.reactionTimes(idx(i)) = respTimes(temp)-trialData.cueTimes(idx(i)); %relative to cue time
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant