Giter Club home page Giter Club logo

eddy_identification_winding's Issues

A bug in the eddy_subroutine

Hi dougcahl,

I'm using your code for the winding angle detection approach and realize that there're probably a bug in the eddy_subroutine function.

Around line 170, you detect if the direction of the velocity vector changes from the previous components. I notice that you convert the ang_diff to a reasonable range ([0, pi] or [-pi, 0]) here after this check but I guess this should before this check. Otherwise, the ang_diff could reach a huge number like 330 in my case.

        if ii > 2 % only after first winding angle
            newdir = sign(ang_diff);
            if newdir ~= dir % if winding changes direction
                baddir = baddir + ang_diff;
                if abs(baddir) > baddir_thres % break after this many degrees bad dirs
                    break
                end
            end
            if newdir == dir % reset if goes back to correct direction before baddir_thres
                baddir = 0;
            end
        end




        if ang_diff > 180
            ang_diff = ang_diff - 360;
        end
        if ang_diff < -180
            ang_diff = ang_diff + 360;
        end  

I switch the sequence of this section and it works well but let me know if you are trying to do something else.

AttributeError: module 'matplotlib.cbook' has no attribute '_check_in_list'

dear dougcahl
Thank you for providing the code for eddy extraction and tracing.
When I run the program (streamplot_dc.py, line 96,
cbook._check_in_list(['both', 'forward', 'backward'],
integration_direction=integration_direction)), the following problem occurs: AttributeError: module 'matplotlib.cbook' has no attribute '_check_in_list'.
What is the reason for this? Is it the matplotlib version?
Thanks.

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.