Skip to content
Snippets Groups Projects
Commit a9b8d316 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fixes

parent 3b88ba48
No related branches found
No related tags found
1 merge request!327Power grid
Pipeline #50078 failed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment