GithubHelp home page GithubHelp logo

msnoise cc stack -m test fails about msnoise HOT 3 OPEN

asyates avatar asyates commented on August 16, 2024
msnoise cc stack -m test fails

from msnoise.

Comments (3)

asyates avatar asyates commented on August 16, 2024

Okay so turns out it's just a change in behaviour when number of 1-days CCFs is less than mov_stack size.

i.e. for the tests, which use only 1-day of data, having mov_stack = 5 would not return an error in old codes as it would output the 1-day CCF in the place of the 5-day stack based on setting low and high indexing.

old code:

                                for mov_stack in mov_stacks:
                                   if i < mov_stack:
                                       low = 0
                                       high = mov_stack
                                   else:
                                       low = i - mov_stack + 1
                                       high = i + 1
                                   newdata = False
                                   for uday in datelist[low:high]:
                                       if uday in updated_days:
                                           newdata = True
                                           break
                                   if newdata:
                                       corr = stack_total[low:high]

whereas in the new code, it returns an error if mov_stack is larger than number of ccfs, which is why test failing i.e.

new code:

                for mov_stack in mov_stacks:
                    #print(mov_stack, mov_stacks, len(dr.times))
                    if mov_stack > len(dr.times):
                        logger.error("not enough data for mov_stack=%i" % mov_stack)
                        continue

So not an issue really, but still tests should be updated so will leave open (and have updated title). Perhaps to include 2 days of data and set mov_stack = 2 for example... or even just mov_stack = 1?

from msnoise.

ThomasLecocq avatar ThomasLecocq commented on August 16, 2024

I'm thinking of adding a larger test dataset, but that should be automagically downloaded with https://github.com/fatiando/pooch , making the default code base super light (and not 30 MB as now). Include more than 5 days of data, and also horizontal components, what do you think?

from msnoise.

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.