Skip to content

Reimplement omega angle calculation and confidence curve#342

Merged
thurinj merged 1 commit intomasterfrom
omega_rework_clean
Feb 17, 2026
Merged

Reimplement omega angle calculation and confidence curve#342
thurinj merged 1 commit intomasterfrom
omega_rework_clean

Conversation

@thurinj
Copy link
Member

@thurinj thurinj commented Feb 17, 2026

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):
vhat_isotropic_points_tapetape

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

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):
vhat_validation_beta_90_old
vhat_validation_beta_60_old
vhat_validation_gamma_18_old

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.
vhat_validation_beta_90
vhat_validation_beta_60
vhat_validation_gamma_18

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:

Pair Dot product $\omega$
$(0,1,2)\cdot(0,1,2)$ $+1$ $0°$
$(0,1,2)\cdot(0,2,1)$ $+\tfrac{1}{2}$ $60°$
$(0,1,2)\cdot(1,0,2)$ $+\tfrac{1}{2}$ $60°$
$(0,1,2)\cdot(1,2,0)$ $-\tfrac{1}{2}$ $120°$
$(0,1,2)\cdot(2,0,1)$ $-\tfrac{1}{2}$ $120°$
$(0,1,2)\cdot(2,1,0)$ $-1$ $180°$

@thurinj
Copy link
Member Author

thurinj commented Feb 17, 2026

Checks are now passing, merging PR and removing both omega_rework branches.

@thurinj thurinj merged commit 711d175 into master Feb 17, 2026
1 check passed
@thurinj thurinj deleted the omega_rework_clean branch February 17, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant