Comments (10)
cc @domfournier
from simpeg.
Hmm ok clearly the sign flip is not good. The idea of this function is to always return the complementary angle, exactly for the reason you've mentioned (i.e. two angles that are close to each other but in different quadrants). Coterminal is called after computing the gradient (normalized difference) between the angle values. But yea, the negative is no good. We should fix it directly on #1299
from simpeg.
Nice little catch, Fortunately I don't think it was causing any issues in the way that we were using it, as we calculated co-terminal angles AFTER doing a difference (not before) so the sign flip wouldn't have mattered.
from simpeg.
But it actually does, just by visual inspection of the example/03-magnetic/plot_inv_mag_MVI_Sparse_TreeMesh
This is the XY slice through the model - where the coterminal manners: (ignore the title, this is the spherical result)
Really seems to improve getting smooth direction.
from simpeg.
That improvement just seems odd to me...
for reference here are the three methods that we've been talking about:
from simpeg.
The "modulus" is the most correct way of doing this, the current method will over-do angle differences larger than
from simpeg.
Also, scary behavior here is that the coterminal
calculation actually modifies it's argument in-place.
from simpeg.
Agree on the modulus, although angle > pi would never happen in the inversion since we always reproject on [-pi, pi].
from simpeg.
The angles themselves are always projected onto the interval
from simpeg.
True
from simpeg.
Related Issues (20)
- ENH: Choclo for Equivalent Source HOT 4
- BUG: Some tutorials are failing when trying to build the docs HOT 2
- DOC: Extend docs for submitting PRs: they should solve only one thing
- BUG: Inconsistent `deriv` definition in maps HOT 1
- DOC: Wrong specification of location arguments for DC Dipole source
- MAINT: Move some of the tests in the codebase to `tests`
- DOC: Include directives in the API Reference
- DOC: Remove “twitter” links
- MAINT: Rename Spontaneous Potential module to Self Potential HOT 4
- ENH: Add base station for Natural Source EM HOT 1
- Remove default arguments for UniformBackgroundField? HOT 1
- DOC: Document EM simulations possible combinations
- Discussion regarding `kwargs` HOT 11
- ENH: Make explicit the Public and Private members of the simulation classes. HOT 2
- BUG: Pole-pole DCR survey HOT 3
- BUG: small typo in 0.21.0 release notes HOT 1
- developer tips for updating after merging `SimPEG` --> `simpeg` HOT 1
- DOC: Update API reference to use `simpeg` instead of `SimPEG`? HOT 2
- ENHC: make static utils discoverable under dc.utils, ip.utils
- plot_pseudosection: show n_spacing on y-axis
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 simpeg.