The flip side of my comment above is that I bet these would be much more efficient calculated using `(i_kx**2-i_ky**2)/ik2)`, etc. as you had for the inverse calculation.  Trig functions are notoriously slow.