11"""Task QC for samuel_cuedBiasedChoiceWorld.
22
33The task itself is identical to the biasedChoiceWorld except that there is an interactive delay
4- between stimOn and goCue.
4+ between stimOn and goCue. Critically, the tone plays **before** the visual stimulus onset and is
5+ therefore not strictly a 'go cue' tone and the delay is not strictly an 'interactive' one.
56
67Mapping the correct Bpod trials extractor is done in `projects.task_extractor_map.json`. The trial
78alignment to the DAQ remains unchanged. The
@@ -27,7 +28,9 @@ def check_stimOn_goCue_delays(self, data, audio_output='harp', **_):
2728 """
2829 Verify time delay between audio cue and stimOn is ~equal to the INTERACTIVE_DELAY specified.
2930
30- Metric: M = stimOn_times - goCue_times - interactive_delay
31+ The so-called goCue is expected to occur before the stimulus onset.
32+
33+ Metric: M = goCue_times - stimOn_times - interactive_delay
3134 Criteria: 0 < M < 0.010 s
3235 Units: seconds [s]
3336
@@ -55,7 +58,7 @@ def check_stimOn_goCue_delays(self, data, audio_output='harp', **_):
5558 # If either are NaN, the result will be Inf to ensure that it crosses the failure threshold.
5659 threshold = 0.01 if audio_output .lower () == 'harp' else 0.053
5760 delay = self .extractor .settings ['INTERACTIVE_DELAY' ]
58- metric = np .nan_to_num (data ['goCue_times ' ] - data ['stimOn_times ' ] - delay , nan = np .inf )
61+ metric = np .nan_to_num (data ['stimOn_times ' ] - data ['goCue_times ' ] - delay , nan = np .inf )
5962 passed = (metric < threshold ) & (metric > 0 )
6063 assert data ['intervals' ].shape [0 ] == len (metric ) == len (passed )
6164 return metric , passed
0 commit comments