Reimplement omega angle calculation and confidence curve#342
Merged
Conversation
…aster. Follows PR #341
Member
Author
|
Checks are now passing, merging PR and removing both omega_rework branches. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basically, reproduces failed PR #341.
Here's the original PR message
This is a very long overdue PR for the omega angle calculation and confidence curve plot.
I just finished doing a large swath of validation test to make sure everything is right and follows the Tape and Tape 2016 and Tape and Tape 2017 papers.
Here's an example that reproduces the 2017's Figure 3, where we move the considered point vertically along the center of the lune (full moment tensor space for reference in dotted line):

and the Figure 2 (moving along the equator of the eigenvalue lune):

Before the rework
The _calculate_omega appeared to yield very inconsistent result when compared with the expected analytical solution (the vertical lines are the critical ω_i for the derivative of the fractional volume curve):



After the rework
The issue came from the fact that the original method tried to use the moment tensor as a 6D vector, and some of the computation were not accounting for the off-diag terms of the tensor properly. The new formulation explicitly builds the 3x3 tensor to compute the inter-tensor distance.



This pull request also adds the confidence curve figure, with average confidence score plotted over the shaded area like in Tape and Tape 2016's Figure 1.
To this day, we had made some checks with @SeismoFelix, but only on the DC and FMT space. We now have also the checks on arbitrary coordinates on the lune.
@rmodrak, @SeismoFelix or @ammcpherson, if you want to have a look before I merge that'd be awesome.
ps: @carltape turns out there is another method to compute the critical angle, based on the angular distance between the 6 permutations around the eigensphere. Here an example, say we have$Λ^{DC}$ :
$$\Lambda^{DC} = \left(\tfrac{1}{\sqrt{2}},\ 0,\ -\tfrac{1}{\sqrt{2}}\right)$$
if we compute the dot product between the 6 permutations:
(0, 1, 2), (0, 2, 1), (1, 0, 2), (1, 2, 0), (2, 0, 1), (2, 1, 0)
we get the following angles: