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

Factor pi missing in compute_cheby_coeff #70

Open
kieranricardo opened this issue Feb 25, 2020 · 2 comments
Open

Factor pi missing in compute_cheby_coeff #70

kieranricardo opened this issue Feb 25, 2020 · 2 comments

Comments

@kieranricardo
Copy link

kieranricardo commented Feb 25, 2020

It looks like a factor of pi is missing in the numerical integration in

c[o] = 2. / N * np.dot(f._kernels[i](a1 * num + a2),
compared Eq 8 https://arxiv.org/pdf/1105.1891.pdf throwing off the Chebyshev coefficients by a factor of pi.

@nperraud
Copy link
Collaborator

Hi thanks for reporting that.
@mdeff , do you know if this is intentional or a mistake. I have the feeling we knew about that... If it is intentional, we should document it.

@mdeff
Copy link
Collaborator

mdeff commented Mar 18, 2021

Indeed, we use 2/n as a factor instead of 2/pi. As for #74, the definition of the coefficients came from the matlab implementation. I believe that is intentional and correct, as the integration over pi is approximated by a summation over n evaluation points. Do you agree @nperraud?

In my overhaul of the Chebyshev approximation (in the polynomial-approximations branch), I used 2/n and documented the definition. I could add that the summation is an approximation of the integral.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants