Commit 05fbd70d authored by Simon Perkins's avatar Simon Perkins
Browse files

Revert "Support grid_in for all gridding functions"

This reverts commit da1ff587.
parent da1ff587
......@@ -715,8 +715,8 @@ template<typename T> pyarr_c<complex<T>> vis2grid_c(
template<typename T> pyarr_c<T> vis2grid(const Baselines<T> &baselines,
const GridderConfig<T> &gconf, const pyarr<uint32_t> &idx_,
const pyarr<complex<T>> &vis_, py::object &grid_in)
{ return complex2hartley(vis2grid_c(baselines, gconf, idx_, vis_, grid_in)); }
const pyarr<complex<T>> &vis_)
{ return complex2hartley(vis2grid_c(baselines, gconf, idx_, vis_, None)); }
template<typename T> pyarr_c<complex<T>> ms2grid_c(
const Baselines<T> &baselines, const GridderConfig<T> &gconf,
......@@ -773,8 +773,8 @@ template<typename T> pyarr_c<complex<T>> ms2grid_c(
template<typename T> pyarr_c<T> ms2grid(const Baselines<T> &baselines,
const GridderConfig<T> &gconf, const pyarr<uint32_t> &idx_,
const pyarr<complex<T>> &ms_, py::object &grid_in)
{ return complex2hartley(ms2grid_c(baselines, gconf, idx_, ms_, grid_in)); }
const pyarr<complex<T>> &ms_)
{ return complex2hartley(ms2grid_c(baselines, gconf, idx_, ms_, None)); }
template<typename T> pyarr_c<complex<T>> ms2grid_c_wgt(
const Baselines<T> &baselines, const GridderConfig<T> &gconf,
......@@ -833,9 +833,8 @@ template<typename T> pyarr_c<complex<T>> ms2grid_c_wgt(
template<typename T> pyarr_c<T> ms2grid_wgt(const Baselines<T> &baselines,
const GridderConfig<T> &gconf, const pyarr<uint32_t> &idx_,
const pyarr<complex<T>> &ms_, const pyarr<T> &wgt_,
py::object &grid_in)
{ return complex2hartley(ms2grid_c_wgt(baselines, gconf, idx_, ms_, wgt_, grid_in)); }
const pyarr<complex<T>> &ms_, const pyarr<T> &wgt_)
{ return complex2hartley(ms2grid_c_wgt(baselines, gconf, idx_, ms_, wgt_, None)); }
template<typename T> pyarr_c<complex<T>> grid2vis_c(
const Baselines<T> &baselines, const GridderConfig<T> &gconf,
......@@ -1344,11 +1343,10 @@ PYBIND11_MODULE(nifty_gridder, m)
"gconf"_a, "flags"_a, "chbegin"_a=-1, "chend"_a=-1,
"wmin"_a=-1e30, "wmax"_a=1e30);
m.def("vis2grid",&vis2grid<double>, vis2grid_DS, "baselines"_a, "gconf"_a,
"idx"_a, "vis"_a, "grid_in"_a=None);
m.def("ms2grid",&ms2grid<double>, "baselines"_a, "gconf"_a, "idx"_a, "ms"_a,
"grid_in"_a=None);
"idx"_a, "vis"_a);
m.def("ms2grid",&ms2grid<double>, "baselines"_a, "gconf"_a, "idx"_a, "ms"_a);
m.def("ms2grid_wgt",&ms2grid_wgt<double>, "baselines"_a, "gconf"_a, "idx"_a,
"ms"_a, "wgt"_a, "grid_in"_a=None);
"ms"_a, "wgt"_a);
m.def("grid2vis",&grid2vis<double>, grid2vis_DS, "baselines"_a, "gconf"_a,
"idx"_a, "grid"_a);
m.def("grid2ms",&grid2ms<double>, "baselines"_a, "gconf"_a, "idx"_a,
......
......@@ -62,8 +62,8 @@ def test_hoisted_grid_allocation(nxdirty, nydirty, nrow, nchan, epsilon):
vis = baselines.ms2vis(ms, idx)
user_grid = np.zeros((gconf.Nu(), gconf.Nv()),
dtype=np.complex128)
grid = ng.vis2grid_c(baselines, gconf, idx, vis, grid_in=None)
grid2 = ng.vis2grid_c(baselines, gconf, idx, vis, grid_in=user_grid)
grid = ng.vis2grid_c(baselines, gconf, idx, vis, user_grid=None)
grid2 = ng.vis2grid_c(baselines, gconf, idx, vis, user_grid=user_grid)
# Almost same visibilities
assert_array_almost_equal(grid, grid2)
......
Supports Markdown
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