brainbox.tests.test_behavior

Classes

PsychofitTest

TestTraining

TestWheel

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

Bases: unittest.case.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_derivative()[source]
test_movements()[source]
test_movements_FPGA()[source]
test_traces_by_trial()[source]
test_direction_changes()[source]
class TestTraining(methodName='runTest')[source]

Bases: unittest.case.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]
class PsychofitTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp() → None[source]

Data are 3 x n arrays

test_weibull50()[source]
test_weibull()[source]
test_erf_psycho()[source]
test_erf_psycho_2gammas()[source]
test_neg_likelihood()[source]
test_mle_fit_psycho()[source]
tearDown()[source]

Hook method for deconstructing the test fixture after testing it.