Exemplo n.º 1
0
    def test_pair_timepoints_same_length(self):

        ind1, ind2 = link_functions.pair_tracks_softassign(T4, T5)

        exp_ind1 = np.array([0, 1, 2, 3])
        exp_ind2 = np.array([0, 1, 2, 3])

        np.testing.assert_equal(ind1, exp_ind1)
        np.testing.assert_equal(ind2, exp_ind2)
Exemplo n.º 2
0
    def test_pair_timepoints_identical(self):

        ind1, ind2 = link_functions.pair_tracks_softassign(T2, T2)

        exp_ind1 = np.array([0, 1, 2, 3])
        exp_ind2 = np.array([0, 1, 2, 3])

        np.testing.assert_equal(ind1, exp_ind1)
        np.testing.assert_equal(ind2, exp_ind2)
Exemplo n.º 3
0
    def test_pair_timepoints_small_large(self):

        ind1, ind2 = link_functions.pair_tracks_softassign(T2, T3)

        exp_ind1 = np.array([0, 1, 2, 3])
        exp_ind2 = np.array([0, 1, 3, 4])

        np.testing.assert_equal(ind1, exp_ind1)
        np.testing.assert_equal(ind2, exp_ind2)
Exemplo n.º 4
0
    def test_pair_timepoints_error(self):

        t1 = np.array([
            [1.0, 2.0, 3.0, 4.0, 5.0],
            [1.0, 2.0, 3.0, 4.0, 5.0],
        ]).T
        t2 = np.array([
            [1.0, 2.0, 3.0, 4.0, 5.0],
            [1.0, 2.0, 3.0, 4.0, 5.0],
        ]).T + 200

        ind1, ind2 = link_functions.pair_tracks_softassign(t1, t2)

        exp_ind1 = np.array([])
        exp_ind2 = np.array([])

        np.testing.assert_equal(ind1, exp_ind1)
        np.testing.assert_equal(ind2, exp_ind2)