In https://github.com/mknaranja/GMGPolar/blob/25cd29f5926df0fb05e6ca15a66a714694d6920d/src/smoother.cpp#L80
we want to check q*r>1 as derived in (4.4) of https://link.springer.com/article/10.1007/s10915-022-01802-1. However, with the previous line, we actually check k/h_{i-1}*r_i>1 instead of k/h_{i}*r_i>1. I think this should be corrected.
I think the correct solution is:
for (i = 1; i < nr_int - 1; i++) {
// assume that k=k_j=theta_{j+1}-theta_{j} is constant
double q = (theta[1] - theta[0]) / (r[i+1] - r[i]);
if (r[i] > 1 / q)
break;
}
Thanks to @CodingAllan for reporting. What do you think @chrissy-s96 and @Philou31 ?
Is the upper bound correct? Why was is nr_int-2 before?
-> Was this preventing that the radial smoother is empty?