test.py 624 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import interpolate

missing_value = -9999.0
tolerance = 0.0001
circular = False

base_values = [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
interp_values = [1.0, missing_value, 3.0, missing_value, 6.0, missing_value,
                 1.0]
expect_values = [1.0, 2.0, 3.0, 4.5, 6.0, 3.5, 1.0]

print("Base values: ", str(base_values))
print("Before interpolation: ", str(interp_values))

test_values = interpolate.interpolateValues(base_values, interp_values,
                                            circular, missing_value)

print("After interpolation: ", str(interp_values))
print("Expected values: ", str(expect_values))