Commit 318424a6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

add alternative formula for n term (currently disabled)

parent a26e60b3
......@@ -594,9 +594,13 @@ template<typename T> class GridderConfig
complex<T> wscreen(double x, double y, double w, bool adjoint) const
{
constexpr double pi = 3.141592653589793238462643383279502884197;
#if 1
double eps = sqrt(x+y);
double s = sin(eps);
double nm1 = -s*s/(1.+cos(eps));
#else
double nm1 = (-x-y)/(sqrt(1.-x-y)+1);
#endif
double n = nm1+1., xn = 1./n;
double phase = 2*pi*w*nm1;
if (adjoint) phase *= -1;
......@@ -1563,10 +1567,14 @@ cout << "applying correction for gridding in w direction" << endl;
{
double fy = y0+j*psy;
fy*=fy;
auto n=cos(sqrt(fx+fy)) -1; // cosine profile
#if 1
auto nm1=cos(sqrt(fx+fy)) -1; // cosine profile
#else
auto nm1 = (-fx-fy)/(sqrt(1.-fx-fy)+1.);
#endif
double fct = 0.;
for (int ix=0; ix<p; ++ix)
fct += wgt[ix]*psi[ix]*cos(pi*w_supp*n*dw*x[ix]);
fct += wgt[ix]*psi[ix]*cos(pi*w_supp*nm1*dw*x[ix]);
fct = 1./(w_supp*fct);
size_t i2 = nx_dirty-i, j2 = ny_dirty-j;
accum[ny_dirty*i+j]*=fct;
......
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