def test_after_end(self):
        new_x = [15 + i for i in xrange(7)]
        new_y = [10.0, 11.0, 8.0, 5.0, 2.0, -1.0, -4.0]

        results = (new_x, new_y)

        self.assertEqual(results,
                interpolation.linear_resample(self.measurement, new_x))
    def test_before_start(self):
        new_x = range(-3, 0) + range(0, 3)
        new_y = [-3.0, -1.0, 1.0, 3.0, 5.0, 7.0]

        results = (new_x, new_y)

        self.assertEqual(results,
                interpolation.linear_resample(self.measurement, new_x))
    def test_middle(self):
        new_x = [2*i + 1 for i in xrange(9)]
        new_y = map(float, [5, 6, 3, 2, 2, 4, 8, 10, 8])

        results = (new_x, new_y)

        self.assertEqual(results,
                interpolation.linear_resample(self.measurement, new_x))
Beispiel #4
0
    def test_middle(self):
        new_x = [2 * i + 1 for i in xrange(9)]
        new_y = map(float, [5, 6, 3, 2, 2, 4, 8, 10, 8])

        results = (new_x, new_y)

        self.assertEqual(
            results, interpolation.linear_resample(self.measurement, new_x))
Beispiel #5
0
    def test_after_end(self):
        new_x = [15 + i for i in xrange(7)]
        new_y = [10.0, 11.0, 8.0, 5.0, 2.0, -1.0, -4.0]

        results = (new_x, new_y)

        self.assertEqual(
            results, interpolation.linear_resample(self.measurement, new_x))
Beispiel #6
0
    def test_before_start(self):
        new_x = range(-3, 0) + range(0, 3)
        new_y = [-3.0, -1.0, 1.0, 3.0, 5.0, 7.0]

        results = (new_x, new_y)

        self.assertEqual(
            results, interpolation.linear_resample(self.measurement, new_x))