ibllib.tests.integration.tasks.test_choice_world_mesoscope

Tests for Timeline behaviour extraction for UCL mesoscope.

Classes

TestTimelineTrials

TestTimelineTrialsHabituation

Test for HabituationTrialsTimeline task.

class TestTimelineTrials(*args, **kwargs)[source]

Bases: IntegrationTest

session_path = None
required_files = ['mesoscope/test/2023-02-17/002']

An optional list of required files/folders to glob for, relative to data_path.

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_sync()[source]
test_get_wheel_positions(plt_mock)[source]

Test for TimelineTrials.get_wheel_positions in ibllib.io.extractors.mesoscope.

test_get_valve_open_times(plt_mock)[source]

Test for TimelineTrials.get_valve_open_times in ibllib.io.extractors.mesoscope.

test_plot_timeline(plt_mock)[source]

Test for ibllib.io.extractors.mesoscope.plot_timeline.

test_timeline2sync()[source]

Test for ibllib.io.raw_daq_loaders.load_timeline_sync_and_chmap.

class TestTimelineTrialsHabituation(*args, **kwargs)[source]

Bases: IntegrationTest

Test for HabituationTrialsTimeline task.

session_path = None
required_files = ['mesoscope/SP065/2024-10-07/001']

An optional list of required files/folders to glob for, relative to data_path.

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_extraction()[source]

Test habituation data is correct.

NB: In this session the stimulus on the first is indeed not displayed or detected, so we expect a NaN.