ibllib.tests.extractors.test_ephys_fpga

Classes

TestEphysFPGA_TTLsExtraction

TestExtractedWheelUnits

Tests the infer_wheel_units function

TestIblChannelMaps

TestSyncExtraction

TestWheelExtraction

TestWheelMovesExtraction

TestsFolderStructure

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

Bases: unittest.case.TestCase

setUp()[source]

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

test_get_ephys_files()[source]
tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

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

Bases: unittest.case.TestCase

setUp()[source]

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

test_sync_nidq()[source]
test_sync_3B()[source]
test_sync_3A()[source]
sync_gen(fn, ns, nc, sync_depth)[source]
class TestIblChannelMaps(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

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

test_ibl_sync_maps()[source]
class TestWheelExtraction(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp() → None[source]

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

test_x1_decoding()[source]
test_x4_decoding()[source]
test_x2_decoding()[source]
class TestExtractedWheelUnits(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests the infer_wheel_units function

wheel_radius_cm = 3.1
setUp() → None[source]

Create the wheel position data for testing: the positions attribute holds a dictionary of units, each holding a dictionary of encoding types to test, e.g.

positions = {
‘rad’: {

‘X1’: …, ‘X2’: …, ‘X4’: …

}, ‘cm’: {

‘X1’: …, ‘X2’: …, ‘X4’: …

}

} :return:

test_extract_wheel_moves()[source]
class TestWheelMovesExtraction(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp() → None[source]

Test data is in the form ((inputs), (outputs)) where inputs is a tuple containing a numpy array of timestamps and one of positions; outputs is a tuple of outputs from the functions. For details, see help on TestWheel.setUp method in module brainbox.tests.test_behavior

test_extract_wheel_moves()[source]
test_movement_log()[source]

Integration test for inferring the units and decoding type for wheel data input for extract_wheel_moves. Only expected to work for the default wheel diameter.

test_extract_first_movement_times()[source]
class TestEphysFPGA_TTLsExtraction(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_ttl_bpod_gaelle_writes_protocols_but_guido_doesnt_read_them()[source]
test_frame2ttl_flickers()[source]

Frame2ttl can flicker abnormally. One way to detect this is to remove consecutive polarity switches under a given threshold