brainbox.tests.test_behavior

Classes

TestTraining

TestWheel

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

Bases: TestCase

setUp()[source]

Load pickled test data 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 function under test, i.e. wheel.movements

The first set - test_data[0] - comes from Rigbox MATLAB and contains around 200 seconds of (reasonably) evenly sampled wheel data from a 1024 ppr device with X4 encoding, in raw samples. test_data[0] = ((t, pos), (onsets, offsets, amps, peak_vel))

The second set - test_data[1] - comes from ibllib FPGA and contains around 180 seconds of unevenly sampled wheel data from a 1024 ppr device with X2 encoding, in linear cm units. test_data[1] = ((t, pos), (onsets, offsets, amps, peak_vel))

test_velocity_filtered()[source]

Test for brainbox.behavior.wheel.velocity_filtered

test_movements()[source]
test_movements_FPGA()[source]
test_traces_by_trial()[source]
test_direction_changes()[source]

Test for brainbox.behavior.wheel.direction_changes

test_get_movement_onset()[source]

Test for brainbox.behavior.wheel.get_movement_onset

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

Bases: TestCase

setUp()[source]

Test data contains training data from 10 consecutive sessions from subject SWC_054. It is a dict of trials objects with each key indication a session date. By using data combinations from different dates can test each of the different training criterion a subject goes through in the IBL training pipeline

test_psychometric_insufficient_data()[source]
test_concatenate_and_computations()[source]
test_in_training()[source]
test_trained_1a()[source]
test_trained_1b()[source]
test_training_to_bias()[source]
test_ready4ephys()[source]
test_ready4delay()[source]
test_ready4recording()[source]
test_query_criterion()[source]

Test for brainbox.behavior.training.query_criterion function.