Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circle to radial smoother argument takes values from line i-1 #31

Open
mknaranja opened this issue Jun 16, 2023 · 0 comments
Open

Circle to radial smoother argument takes values from line i-1 #31

mknaranja opened this issue Jun 16, 2023 · 0 comments

Comments

@mknaranja
Copy link
Member

mknaranja commented Jun 16, 2023

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?

@mknaranja mknaranja changed the title Circle to radial smoother argument is takes values from line i-1 Circle to radial smoother argument takes values from line i-1 Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant