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

Fix NDVI and SWI calculation #714

Merged
merged 2 commits into from
Aug 17, 2022
Merged

Fix NDVI and SWI calculation #714

merged 2 commits into from
Aug 17, 2022

Conversation

adamjstewart
Copy link
Collaborator

Fixes #713

We were calculating NDVI incorrectly, using (Red - NIR) instead of (NIR - Red). The only reason our plots looked correct is that we were inverting the color scales.

We used the incorrect band names for SWI. This PR fixes those as well.

I double checked all other indices and things look correct, but I would appreciate it if someone else could triple check.

I'll see if I can get our blog fixed as well.

@cagsen @isaaccorley @MATRIX4284

@adamjstewart adamjstewart added this to the 0.3.1 milestone Aug 11, 2022
@github-actions github-actions bot added documentation Improvements or additions to documentation transforms Data augmentation transforms labels Aug 11, 2022
@adamjstewart adamjstewart merged commit 62f914b into main Aug 17, 2022
@adamjstewart adamjstewart deleted the fixes/ndvi branch August 17, 2022 17:24
Modexus pushed a commit to Modexus/torchgeo that referenced this pull request Sep 3, 2022
* Fix NDVI and SWI calculation

* Escape LaTeX code
adamjstewart added a commit that referenced this pull request Sep 3, 2022
* Fix NDVI and SWI calculation

* Escape LaTeX code
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
* Fix NDVI and SWI calculation

* Escape LaTeX code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation transforms Data augmentation transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is NDVI calculation correct?
2 participants