ibllib.tests.test_mesoscope

Tests for ibllib.pipes.mesoscope_tasks.

Classes

TestImagingMeta

Test raw imaging metadata versioning.

TestMesoscopeFOV

Test for MesoscopeFOV task and associated functions.

TestMesoscopePreprocess

Test for MesoscopePreprocess task.

TestRegisterFOV

Test for MesoscopeFOV.register_fov method.

class TestMesoscopePreprocess(methodName='runTest')[source]

Bases: TestCase

Test for MesoscopePreprocess task.

setUp() None[source]

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

test_meta()[source]

Test arguments that are overwritten by meta file and set in task.kwargs, and that explicitly passed kwargs overwrite default and meta args

test_get_default_tau()[source]

Test for MesoscopePreprocess.get_default_tau method.

test_consolidate_exptQC()[source]

Test for MesoscopePreprocess._consolidate_exptQC method.

test_setup_uncompressed()[source]

Test set up behaviour when raw tifs present.

test_setup_compressed()[source]

Test set up behaviour when only compressed tifs present.

test_roi_detection()[source]

Test roi_detection method.

This simply tests that the input ops are modified and that suite2p is called and it’s return value is returned.

test_image_motion_registration()[source]

Test image_motion_registration method.

test_get_plane_paths()[source]

Test _get_plane_paths method.

tearDown() None[source]

Hook method for deconstructing the test fixture after testing it.

class TestMesoscopeFOV(methodName='runTest')[source]

Bases: TestCase

Test for MesoscopeFOV task and associated functions.

test_get_provenance()[source]

Test for MesoscopeFOV.get_provenance method.

test_find_triangle()[source]

Test for find_triangle function.

test_surface_normal()[source]

Test for surface_normal function.

test_nearest_neighbour_1d()[source]

Test for _nearest_neighbour_1d function.

test_update_surgery_json()[source]

Test for MesoscopeFOV.update_surgery_json method.

Here we mock the Alyx object and simply check the method’s calls.

class TestRegisterFOV(methodName='runTest')[source]

Bases: TestCase

Test for MesoscopeFOV.register_fov method.

setUp() None[source]

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

test_register_fov()[source]

Test MesoscopeFOV.register_fov method.

Note this doesn’t actually hit Alyx. Also this doesn’t test stack creation.

tearDown() None[source]

The ONE function is cached and therefore the One object persists beyond this test. Here we return the mode back to the default after testing behaviour in offline mode.

class TestImagingMeta(methodName='runTest')[source]

Bases: TestCase

Test raw imaging metadata versioning.

test_patch_imaging_meta()[source]

Test for ibllib.io.extractors.mesoscope.patch_imaging_meta function.