Commit cc89e037 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

update FFT

parent 7306904a
......@@ -268,7 +268,7 @@ template<typename T> void hartley2_2D(const pyarr_c<T> &in, pyarr_c<T> &out)
auto ptmp = out.mutable_data();
{
py::gil_scoped_release release;
pocketfft::r2r_hartley({nu, nv}, s_i, s_o, {0,1}, d_i, ptmp, T(1), 0);
pocketfft::r2r_separable_hartley({nu, nv}, s_i, s_o, {0,1}, d_i, ptmp, T(1), 0);
#pragma omp parallel for
for(size_t i=1; i<(nu+1)/2; ++i)
for(size_t j=1; j<(nv+1)/2; ++j)
......@@ -1164,6 +1164,8 @@ vis: np.array((nvis,), dtype=np.complex)
The visibility data for the index array
idx: np.array((nvis,), dtype=np.uint32)
the indices to be inserted
ms_in: np.array((nrows, nchannels), dtype=np.complex), optional
input measurement set to which the visibilities are added.
Returns
=======
......@@ -1266,6 +1268,29 @@ np.array((nu,nv), dtype=np.float64):
the gridded visibilities (made real by making use of Hermitian symmetry)
)""";
const char *vis2grid_c_DS = R"""(
Grids visibilities onto a UV grid
Parameters
==========
baselines: Baselines
the Baselines object
gconf: GridderConf
the GridderConf object to be used
(used to optimize the ordering of the indices)
idx: np.array((nvis,), dtype=np.uint32)
the indices for the entries to be gridded
vis: np.array((nvis,), dtype=np.complex)
The visibility data for the index array
grid_in: np.array((nu,nv), dtype=np.complex128), optional
If present, the result is added to this array.
Returns
=======
np.array((nu,nv), dtype=np.complex128):
the gridded visibilities
)""";
const char *grid2vis_DS = R"""(
Degrids visibilities from a UV grid
......@@ -1353,8 +1378,8 @@ PYBIND11_MODULE(nifty_gridder, m)
"grid"_a, "ms_in"_a=None);
m.def("grid2ms_wgt",&grid2ms_wgt<double>, "baselines"_a, "gconf"_a, "idx"_a,
"grid"_a, "wgt"_a, "ms_in"_a=None);
m.def("vis2grid_c",&vis2grid_c<double>, "baselines"_a, "gconf"_a, "idx"_a,
"vis"_a, "grid_in"_a);
m.def("vis2grid_c",&vis2grid_c<double>, vis2grid_c_DS, "baselines"_a,
"gconf"_a, "idx"_a, "vis"_a, "grid_in"_a);
m.def("ms2grid_c",&ms2grid_c<double>, "baselines"_a, "gconf"_a, "idx"_a,
"ms"_a, "grid_in"_a=None);
m.def("ms2grid_c_wgt",&ms2grid_c_wgt<double>, "baselines"_a, "gconf"_a,
......
This diff is collapsed.
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