Hi,
Caveat* I have no experience with Spike 2 syntax.
I didn't do a thorough search through the forum for this but would much appreciate any help:
I have a file from a session where I recorded the amount of licks during a behavioral task where the animal was supposed to sample an odor and a reward would become available at the end of the trial.
In order to analyze the data, I need to be able to only select the trials where the animal did not lick during the "odor on" period.
I have a channel (Odor) with TextMarks that tell me the exact time when the odor turns on for each trial during the entire session.
A different channel (Lick) has TextMarks for every lick that occurs during the session.
I would like to use the the Odor channel for generating the range of time ("odor on") for searching the Lick channel. The range will be constant - 7 seconds long: 3 seconds before each Odor TextMark and 4 seconds after.
Then, I would like to use that 7 seconds rage to search the Lick channel for TextMarks. If there is a TextMark in the Lick channel, a new TextMark is created "BadTrial" that would allow me to filter out the trials where there is a lick during the "odor on" period.
Thank you in advance for any help.