GithubHelp home page GithubHelp logo

Comments (12)

aburrell avatar aburrell commented on May 29, 2024 3

And... this kept bugging me so here we are. Check out the PR that addresses the bug: #88

JR_vel_bug_fixed_sign_and_angle

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024 1

Ok, I found the bug that caused the obvious error, but I want to go through all of the permutations again and check that I haven't made any more mistakes.

from ocbpy.

jpreistad avatar jpreistad commented on May 29, 2024 1

Wow, I really appreciate your efforts! Looking forward to see how this impacts my results, I hope to be able to dig into this again this week.

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024

Ok, this does look like a problem that could be a bug. I'll carve out some time to take a look at it this week. Thanks for the comprehensive example!

from ocbpy.

jpreistad avatar jpreistad commented on May 29, 2024

I have tried to identify what causes this behavior but not succeeded. It is very difficult to follow all the quadrant logic. However, it appear to be related to how the ocb east/north components obtain their sign. First, I thought it had to do with the 'calc_ocb_vec_sign' function. However, whats going on at lines 803-806 in ocb_scaling.py, (what I interpret as a projection of vmag along the ocb east and north directions), will also affect the sign (ocb_naz can be in [-180,180] I think?). Altogether this unfortunately lead to the wrong sing in the end in some instances. I really hoped that I would be able to get to the bottom of this, but I have failed to do that so far.

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024

Ok, so I am working on this now. The first step was to reproduce your figure using the file you supplied for the AACGM coordinates. There are some differences, namely the OCB is not oriented correctly in your AACGMV2 plot. However, there are still vectors that look suspicious in the plot on the right, so I think that difference is not particularly important to this issue. I will start by looking into the two vectors near the OCB just after midnight and then examine the vectors near the OCB pole.

JR_vel_bug

from ocbpy.

jpreistad avatar jpreistad commented on May 29, 2024

Yes, I see that I have implemented the AMPERE OCB correction incorrectly, thank you for pointing that out! I was actually surprised in my plot how well the boundary matched the observed velocity shear around 6 MLT, but that was unfortunately not the case.

However, I really hope that you will be able to figure out what is causing this behavior. It seems like you reproduce the problem pointed out.

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024

Yes, I'm going through step by step. It looks like the OCB and vect quadrants are being assigned correctly, so now I'm looking at the 6 sign combinations. When this is all done, I'll may write up an explanation of this logic in the docs.

JR_ocb_vect_quad_check

from ocbpy.

jpreistad avatar jpreistad commented on May 29, 2024

I should say that I have tried digging into this myself, a few weeks ago. I regret that I did not document my efforts, but I recall that I also concluded that the quadrant assignment was ok. I think I got stuck in understanding what was happening in the calc_ocb_vector_sign function. This may be a good place to check if the logic is correctly implemented :)

Good luck debugging, I really appreciate your efforts!

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024

I can confirm that the problem is in the calc_ocb_vector_sign function. A few of the points are getting the incorrect north sign. Wish me luck!
JR_ocb_vsign_check_bad_north_sign

from ocbpy.

jpreistad avatar jpreistad commented on May 29, 2024

That is great, good job!

from ocbpy.

aburrell avatar aburrell commented on May 29, 2024

Wow. Ok. 16 diagrams later, another double check, and I am as sure as one person can be that have caught all of the errors in the sign logic. However, this means that I am pretty sure there's an error in the OCB vector azimuth angle logic that was (in some cases) made invisible by the sign logic error. Check out the data near 06:00 MLT in the OCB dial:

JR_vel_bug_fixed_sign

Hopefully it won't take much longer to go through that logic (Lines 867-904 in ocb_scaling) now that I have all the diagrams drawn, but I may not be able to work on this next week.

from ocbpy.

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.