So I have a N-dimensional array of values, let's call it A. Now, I can plot this in a contour map, with coordinate axes X and Y, using
X - X1
Y - X1
A friend helped me out with this. Seems to work perfectly.
for ii in xrange(A.shape): for jj in xrange(A.shape): H = ii - alpha_x[jj,ii] J = jj - alpha_y[jj,ii] if H >= 0 and H<= A.shape and J >= 0 and J <= A.shape: B[J,H] = B[J,H] + A[jj,ii]