Commit 17990efd authored by Martin Reinecke's avatar Martin Reinecke
Browse files

zero-fill the grid

parent b36440b7
...@@ -1267,6 +1267,8 @@ template<typename T> pyarr_c<complex<T>> apply_holo( ...@@ -1267,6 +1267,8 @@ template<typename T> pyarr_c<complex<T>> apply_holo(
auto ogrid = res.mutable_data(); auto ogrid = res.mutable_data();
{ {
py::gil_scoped_release release; py::gil_scoped_release release;
for (size_t i=0; i<nu*nv; ++i) ogrid[i] = T(0);
T beta = gconf.Beta(); T beta = gconf.Beta();
size_t w = gconf.W(); size_t w = gconf.W();
...@@ -1307,7 +1309,7 @@ template<typename T> pyarr_c<complex<T>> apply_holo( ...@@ -1307,7 +1309,7 @@ template<typename T> pyarr_c<complex<T>> apply_holo(
complex<T> tmp(r*ku[cu]); complex<T> tmp(r*ku[cu]);
for (size_t cv=0; cv<w; ++cv) for (size_t cv=0; cv<w; ++cv)
wptr[cv] += tmp*kv[cv]; wptr[cv] += tmp*kv[cv];
wptr+=jump; wptr += jump;
} }
} }
} }
......
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