int-brain-lab / iblrig

Main repository for IBL rig code
MIT License
21 stars 20 forks source link

Harp sound card fails to output TTLs #655

Open k1o0 opened 2 months ago

k1o0 commented 2 months ago

This card emits sound, and provides a TTL output marking the onset / offset of such sound.

We train mice on a task that requires auditory signals (pure tones) to be played. Typically, mice do ~500 trials on this task.

We noticed that on ~1% of the trials, and this on all setup we deployed (10), the Harp TTL for the audio signal does not transition from High to Low state after the sound has been emitted. We observed this in more than 100 sessions.

As a result, the next sound generation is not visible on the TTL trace, and we cannot know precisely when the sound was emitted, which is an issue when it comes to synchronization.

bimac commented 2 months ago

Using the following state machine and the harp soundcard I can't observe any issues with TTL output whatsoever:

sma = StateMachine(self.bpod)
sma.add_state('tone', 0, {'BNC2High': 'high'}, [self.bpod.actions.play_noise])
sma.add_state('high', 0, {'BNC2Low': 'low'}, [])
sma.add_state('low', 0.1, {'Tup': 'tone'}, [])  
bimac commented 2 months ago

here's a graphical representation of the above ... I let it run for >1000 periods, no issues at all. Pretty sure that this is not a hardware issue.

image

mayofaulkner commented 1 month ago

All sessions where goCue_delay qc check fails (Miles to send Florian query)