Wednesday, 11 September 2013

Interpolation between several values at the same point of consecutive arrays

Interpolation between several values at the same point of consecutive arrays

I have data of arrays such as:
[[1 3 5 1 . . 2] [9 3 6 1 . . 5] . . . [1 8 5 1 . . 7]]
[[2 2 3 7 . . 1] [10 2 5 3 . . 2] . . . [3 1 3 6 . . 11]]
.
.
[[7 10 15 11 . . 12] [4 7 1 3 . . 3] . . . [2 3 7 2 . . 1]]
I would like to get the value by interpolation between each set of arrays
in the same point. For example, the first values of the first array
(column) would be 1 2 ....7. In that series of numbers, I would like to
interpolate the value between 1 and 2, 2 and next number .... the previous
number and 7. The number of these array set would be 200 and I should be
extract those data array by using loop.
Such as:
for c in range(0,199):
w = wles[:,c,:,:]
th = Theta[:,c,:,:]
th_total = th + 300
w_mean = np.mean(w)
th_mean = np.mean(th_total)
wp = w - w_mean
thp = th_total - th_mean
mwtp = wp * thp
mwtp = list(mwtp)
mwtp1 = mwtp1 + [mwtp]
In that code, I would like to get values at each point in the array
between each loop for th by interpolation.
I am sorry that question itself is too messy and not organized, but I am
not sure even how to make the list of values for interpolation because it
will be accumulated by loop and too big.

No comments:

Post a Comment