Commit a9b8d316 authored by Martin Reinecke's avatar Martin Reinecke

fixes

parent 3b88ba48
Pipeline #50078 failed with stages
in 5 minutes
......@@ -90,9 +90,12 @@ class RadioGridder(LinearOperator):
import nifty_gridder
self._check_input(x, mode)
if mode == self.TIMES:
x = x.to_global_data().reshape((-1,1))
x = self._bl.ms2vis(x, self._idx)
res = nifty_gridder.vis2grid(
self._bl, self._gconf, self._idx, x.to_global_data())
self._bl, self._gconf, self._idx, x)
else:
res = nifty_gridder.grid2vis(
self._bl, self._gconf, self._idx, x.to_global_data())
res = self._bl.vis2ms(res, self._idx).reshape((-1,))
return from_global_data(self._tgt(mode), res)
......@@ -36,9 +36,7 @@ def _l2error(a, b):
@pmp('N', [1, 10, 100])
def test_gridding(nu, nv, N, eps):
uvw = np.random.rand(N, 3) - 0.5
ms = (np.random.randn(N) + 1j*np.random.randn(N)).reshape((-1,1))
# FIXME temporary!
vis = np.ones((N,))+1j*np.ones((N,))
vis = (np.random.randn(N) + 1j*np.random.randn(N))
# Nifty
GM = ift.GridderMaker(ift.RGSpace((nu, nv)), uvw=uvw, channel_fact=np.array([1.]), eps=eps)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment