I have this kind of data. Speed in x axis and power in y axis. This gives one plot. But, there are a number of let's say C values that give other plots also on the speed vs power diagram.
The data is:
C = 12
speed:[127.1, 132.3, 154.3, 171.1, 190.7, 195.3]
power:[2800, 3400.23, 5000.1, 6880.7, 9711.1, 10011.2 ]
C = 14
speed:[113.1, 125.3, 133.3, 155.1, 187.7, 197.3]
power:[2420, 3320, 4129.91, 6287.17, 10800.34, 13076.5 ]
Now, I want to be able to interpolate at [[12.2, 122.1], [12.4, 137.3], [12.5, 154.9], [12.6, 171.4], [12.7, 192.6], [12.8, 198.5]]
for example.
I have read this answer. I am not sure if this is the way to do it.
I tried:
data = np.array([[12, 127.1, 2800], [12, 132.3, 3400.23], [12, 154.3, 5000.1], [12, 171.1, 6880.7],
[12, 190.7, 9711.1], [12, 195.3, 10011.2],
[14, 113.1, 2420], [14, 125.3, 3320], [14, 133.3, 4129.91], [14, 155.1, 6287.17],
[14, 187.7, 10800.34], [14, 197.3, 13076.5]])
coords = np.array([[12.2, 122.1], [12.4, 137.3], [12.5, 154.9], [12.6, 171.4], [12.7, 192.6], [12.8, 198.5]])
z = ndimage.map_coordinates(data, coords.T, order=2, mode='nearest')
but, I am receiving:
array([13076.5, 13076.5, 13076.5, 13076.5, 13076.5, 13076.5])
I am not sure how to deal with this kind of interpolation.