int-brain-lab / iblrig

Main repository for IBL rig code
https://int-brain-lab.github.io/iblrig/
MIT License
22 stars 22 forks source link

Harp sound card fails to output TTLs #655

Closed k1o0 closed 1 month ago

k1o0 commented 6 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 6 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 6 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 5 months ago

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

bimac commented 1 month ago

Quering datasets

- 4b02080d-3a7f-4185-a747-2206fdf3dc1b / 2024-10-03 / _iblrig_cortexlab_mesoscope / samuel_cuedBiasedChoiceWorld8.23.1+dirty/_iblrig_tasks_passiveChoiceWorld8.23.1+dirty/_iblrig_tasks_passiveChoiceWorld8.23.1+dirty
- 8f2acc4a-7977-4dcb-8ed8-f1f5a61e66cf / 2024-09-19 / _iblrig_cortexlab_mesoscope / samuel_cuedBiasedChoiceWorld8.23.1+dirty
- d975cd8a-860a-458e-804f-3c1729c1746b / 2024-09-19 / _iblrig_cortexlab_mesoscope / samuel_cuedBiasedChoiceWorld8.23.1+dirty
- 1ce1d217-f1e6-461b-b184-322310a4d893 / 2024-06-18 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_trainingChoiceWorld8.19.7/_iblrig_tasks_passiveChoiceWorld8.19.7
- 38751b1c-2b64-40c9-b0a7-95a922a4de98 / 2024-05-28 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_trainingChoiceWorld8.19.2
- 115412e5-0d00-4c86-b7b7-1409067ce89b / 2024-05-24 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_trainingChoiceWorld8.19.2/_iblrig_tasks_passiveChoiceWorld8.19.2
- 36242389-967d-4db6-b00f-fcece8c5b43f / 2024-05-14 / _iblrig_cortexlab_mesoscope / samuel_cuedBiasedChoiceWorld8.19.0/_iblrig_tasks_passiveChoiceWorld8.19.0
- d085b101-dc41-4268-9a51-4dc6d0a415dd / 2024-05-13 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_advancedChoiceWorld8.19.0
- e2a4702d-54f4-4e60-ac07-5eed06fa6b65 / 2024-05-10 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_advancedChoiceWorld8.19.0/_iblrig_tasks_passiveChoiceWorld8.19.0
- b3501ee8-0829-4399-a500-0dab3e62c14d / 2024-05-09 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_advancedChoiceWorld8.19.0
- 0dd8a981-3db4-47c8-8357-4aaf6b90c9c0 / 2024-05-08 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_advancedChoiceWorld8.19.0/_iblrig_tasks_passiveChoiceWorld8.19.0
- 908ac556-b741-4ee2-8665-7897ba5f2683 / 2024-02-19 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_trainingChoiceWorld8.15.5
- 3dfc4da1-a432-470a-800d-5abbd296eb61 / 2024-01-29 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_trainingChoiceWorld8.14.2
- 600ce551-a3ab-4f41-9c79-a2e781abe2a7 / 2023-08-03 / _iblrig_cortexlab_mesoscope / _iblrig_tasks_biasedChoiceWorld8.8.1

I can't see the phenomenon of the TTL not going low again though

bimac commented 1 month ago

Could not reproduce - closing.

Image

Both Bpod data and DAQ data show correct pulse lengths and no mayor outliers whatsoever. This may have been an issue with extraction or plotting that has been resolved in the meantime?

bimac commented 1 month ago

For reference, this is the original observation (unknown EID)Image