Example #1
0
    def test_one_to_one_alignment(self):
        """Test alignment to 1 sample to a template"""
        register = elastic_registration(self.unimodal_samples[0],
                                        self.template)
        distances = metric(self.template, register)

        np.testing.assert_allclose(distances, 0, atol=12e-3)
Example #2
0
    def test_set_alignment(self):
        """Test alignment 3 curves to set with 3 templates"""
        # Should give same result than test_template_alignment
        register = elastic_registration(self.unimodal_samples,
                                        self.template_rep)
        distances = metric(self.template, register)

        np.testing.assert_allclose(distances, 0, atol=12e-3)