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)
- plot_pseudosection: show n_spacing on y-axis
- Update url in version switcher (before next release) HOT 1
- DOC: Remove mamba recommendation from docs HOT 1
- ENH: Rename `seed` arguments to `random_seed` across simpeg
- MNT: Update usage of `refine_tree_xyz`
- BUG: <Please write a comprehensive title after the 'BUG: ' prefix> HOT 1
- ENH: print SimPEG version in inversion log
- BUG: `GaussianMixtureWithPrior.fit_predict` fails with latest version of scikit-learn HOT 3
- rename VTEM waveform HOT 1
- How to Implementing Anisotrophy for Conductivity in a new version of Simpeg HOT 1
- DOC: Include guide on setting up solver for EM simulations HOT 1
- Release v0.22.0
- cannot import name 'numpy' from 'matplotlib' HOT 3
- BUG: Segfault on M3 when loading simpeg.potential_fields through PythonCall.jl
- BUG: numpy import error in 'electromagnetics/natural_source/utils/plot_data_types.py' HOT 3
- Release v0.22.1
- BUG: SciPy 1.14 removed the `tol` argument of `scipy.sparse.linalg.***`
- MNT: Drop support for Python 3.8
- ENH: De-couple `Data` from `Survey` HOT 7
- Release v0.22.2
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.