Rigbox icon indicating copy to clipboard operation
Rigbox copied to clipboard

first stimulus flip in photodiode sometimes late relative to signals stimulus onset time

Open synapticlee opened this issue 4 years ago • 2 comments

Hi, I am still working on adding details but wanted to flag this first (initially flagged on #rigbox-signals channel in the cortexlab slack).

In a fair amount of trials, it seems that the the first flip of the photodiode is >100ms late of the signals-intended onset of the stimulus. It's unclear whether it could be a photodiode issue, but if true would suggest that the actual stimulus onset is 100ms later than the intended onset. In an example session with a good photodiode trace, this still occurred in 10% of trials, with some trials experiencing even 200-400ms delay (see histogram below). The flip is apparently always late or on time, and never early.

This was also observed by @pipcoen and @petersaj who use different rigs and expdefs. It was suggested this might be because I also have a stimulus onset tone, and perhaps signals could "wait" for the tone before delivering the stimulus.

image

image

Will add more details about specific expdef and rigbox versions and timeline etc. soon and whether this is consistent across sessions with different expdefs I have.

This particular session is from expdef julieWorldQuiescent

synapticlee avatar May 12 '20 10:05 synapticlee

I suggest this is a high priority issue because it means up to 100-200ms after stimulus onset, which is a typical area of integration for looking at stimulus-related activity, there might not be an actual stimulus on the screen.

synapticlee avatar May 12 '20 10:05 synapticlee

the flip does respect the stim window update times (thanks lauren for the suggestion) though, so it's clear (?) the stimulus really was "late", but still unclear why blue - photodiode; black - stim window update times; orange- audio command (TL); red - stimulus onset time according to block structure image

synapticlee avatar May 12 '20 12:05 synapticlee