Skip to content

Error in extraction of reaction times. #2

@michaelsiniscalchi

Description

@michaelsiniscalchi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions