Comments (12)
And... this kept bugging me so here we are. Check out the PR that addresses the bug: #88
from ocbpy.
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.
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.
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.
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.
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.
from ocbpy.
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.
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.
from ocbpy.
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.
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!
from ocbpy.
That is great, good job!
from ocbpy.
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:
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)
- Update IMAGE acceptance criteria HOT 1
- TST: see if filecmp works on Windows
- Update IMAGE references
- MAINT: remove ssj_auroral_boundary dependence HOT 1
- BUG: individual IMAGE instrument OCBs
- Improve pysat custom function HOT 2
- MAINT: add pyproject.toml
- MAINT: Remove deprecated routines
- ENH: Add POLAR boundaries
- ENH: Add GUVI model boundaries
- Use importlib for managing files
- End support for python 2.7
- Use Requires.io
- README installation example
- Create better `__repr__` functions
- Coveralls broke for Python 2.7 HOT 1
- Convert example doesn't treat magnetic long->local time conversion correctly
- Add .zenodo.json
- Update pysat support
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 ocbpy.