Comments (8)
Line 43 in 9a4fc7c
I think the doc is perfect, but the order of the arguments should be reversed. I think this is more intuitive since b2 comes first in the numerator and denominator for the normalized difference equation.
from earthpy.
see PR #44
from earthpy.
I wouldn't have any strong prior expectations for the ordering of bands for a function like this.
from earthpy.
it is more subjective... as long as the doc is clear on which bands go where in the equation, which I think it is. seeing the equation (b2 - b1) / (b2 + b1), implies to me, that the the args should come in as b2 and then b1, but that's a little weird since it sounds like you're counting backwards and we read left to right.
from earthpy.
I agree with Joe that it is more intuitive for b2 to be provided as the first argument, and then b1 as the second. As he said, this matches the actual structure of the equation.
from earthpy.
just a note all that in line with @joemcglinchy 's original thought and @jlpalomino 's second.... that the order of bands in the norm_diff function is confusing... several students have voiced the same issue! This is why i originally created this issue. @joemcglinchy i know you made some changes... Do you want to resubmit the PR to adjust the function and also update the docs, here and we can then decide when to merge it the students have an assignment where they will likely use it starting today. but after thanksgiving could be a good time to merge this. then we'd want to update our lessons too. not a big deal to do tho!
from earthpy.
@jlpalomino assigning this issue to you when you add tests for norm_diff please also just swap the parameter order!
from earthpy.
referencing this pr which has the changes implemented. - #140
@jlpalomino will you please also close this issue when the PR is merged!
from earthpy.
Related Issues (20)
- plot_rgb fails with stretch=True for masked array with masked NaNs HOT 1
- Issue in Docs - incorrect url is breaking CI HOT 1
- Doubt on using NDVI for Sentinel-1 images
- Issue with plotting nan values. HOT 1
- Update dependencies HOT 1
- check_crs additional testing needed
- Fix Linting tests to run both black and flake8
- Issue with downloading `et.data.get_data()` HOT 2
- `_stretch_im` not working as intended HOT 4
- overlay shapefile on raster based on raster extent
- em.pixel_flags is poorly documented HOT 1
- Update vignettes to use rioxarray
- `earthpy.plot.plot_bands` method ignores `ax` keyword argument if raster has multiple bands HOT 2
- Earthpy Compatibility with Matplotlib
- Several tests are failing HOT 7
- BadZipFile: File is not a zip file HOT 1
- Error produced when I try to run earthpy with my new environment (that includes earthpy). HOT 6
- Support APPEEARS downloads
- Custom file download location HOT 1
- Add option to keep axes ticks and labels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earthpy.