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

bug in kndvi.js script #2

Closed
GregDuveiller opened this issue May 7, 2021 · 1 comment
Closed

bug in kndvi.js script #2

GregDuveiller opened this issue May 7, 2021 · 1 comment

Comments

@GregDuveiller
Copy link

Hi,
I think there is a small problem in the javascript code for kndvi. Shouldn't Line 19 read:

  var k = D2.divide(sigma.pow(2).multiply(2)).multiply(-1).exp();

instead of:

  var k = D2.divide(sigma.pow(2)).multiply(-1).exp();

That factor 2 is present in other scripts, such as kndvi.R but not in the GEE script.

Cheers,
Greg

@Jordi-
Copy link
Member

Jordi- commented May 7, 2021

Hi Greg.
Yes, if we want to strictly follow the maths, one should divide by 2*sigma^2, not just by sigma^2.
We've updated the code in a new commit. Thanks!

@Jordi- Jordi- closed this as completed May 7, 2021
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

2 participants