Code Monkey home page Code Monkey logo

Comments (8)

joemcglinchy avatar joemcglinchy commented on June 14, 2024

def normalized_diff(b1, b2):

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.

joemcglinchy avatar joemcglinchy commented on June 14, 2024

see PR #44

from earthpy.

mbjoseph avatar mbjoseph commented on June 14, 2024

I wouldn't have any strong prior expectations for the ordering of bands for a function like this.

from earthpy.

joemcglinchy avatar joemcglinchy commented on June 14, 2024

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.

jlpalomino avatar jlpalomino commented on June 14, 2024

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.

lwasser avatar lwasser commented on June 14, 2024

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.

lwasser avatar lwasser commented on June 14, 2024

@jlpalomino assigning this issue to you when you add tests for norm_diff please also just swap the parameter order!

from earthpy.

lwasser avatar lwasser commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.