gamma-wadati 0.1.0.dev1__tar.gz → 0.1.0.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gamma-wadati
3
- Version: 0.1.0.dev1
3
+ Version: 0.1.0.dev3
4
4
  Summary: Earthquake phase association and location as a Bayesian Gaussian mixture on the Wadati transform
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -16,7 +16,7 @@ Earthquake phase **association** and **location** solved together as a
16
16
  form
17
17
 
18
18
  ```
19
- M = (t_P + t_S)/2 = t0 + p·r D = (t_S − t_P)/2 = q·r
19
+ M = (t_P + t_S)/2 = t0 + p·r D = t_S − t_P = q·r
20
20
  ```
21
21
 
22
22
  which are linear in source distance `r`. The transform decouples origin time
@@ -6,7 +6,7 @@ Earthquake phase **association** and **location** solved together as a
6
6
  form
7
7
 
8
8
  ```
9
- M = (t_P + t_S)/2 = t0 + p·r D = (t_S − t_P)/2 = q·r
9
+ M = (t_P + t_S)/2 = t0 + p·r D = t_S − t_P = q·r
10
10
  ```
11
11
 
12
12
  which are linear in source distance `r`. The transform decouples origin time
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gamma-wadati"
7
- version = "0.1.0.dev1"
7
+ version = "0.1.0.dev3"
8
8
  description = "Earthquake phase association and location as a Bayesian Gaussian mixture on the Wadati transform"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gamma-wadati
3
- Version: 0.1.0.dev1
3
+ Version: 0.1.0.dev3
4
4
  Summary: Earthquake phase association and location as a Bayesian Gaussian mixture on the Wadati transform
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -16,7 +16,7 @@ Earthquake phase **association** and **location** solved together as a
16
16
  form
17
17
 
18
18
  ```
19
- M = (t_P + t_S)/2 = t0 + p·r D = (t_S − t_P)/2 = q·r
19
+ M = (t_P + t_S)/2 = t0 + p·r D = t_S − t_P = q·r
20
20
  ```
21
21
 
22
22
  which are linear in source distance `r`. The transform decouples origin time
@@ -3,7 +3,7 @@
3
3
  The (M, D) Wadati coordinates of a pick are linear in source--station distance::
4
4
 
5
5
  M = t0 + p * r p = (1/v_p + 1/v_s) / 2 (mean slowness)
6
- D = q * r q = (1/v_s - 1/v_p) / 2 (differential slowness)
6
+ D = q * r q = 1/v_s - 1/v_p (differential slowness)
7
7
 
8
8
  with derived constants ``alpha = p / q`` (Wadati slope) and ``beta = 1 / q``
9
9
  (distance per unit D). See ``formulation.md``.
@@ -35,11 +35,11 @@ class Velocity:
35
35
 
36
36
  @property
37
37
  def q(self) -> float:
38
- return 0.5 * (1.0 / self.vs - 1.0 / self.vp)
38
+ return 1.0 / self.vs - 1.0 / self.vp
39
39
 
40
40
  @property
41
41
  def alpha(self) -> float:
42
- """Wadati slope p / q = (vp + vs) / (vp - vs)."""
42
+ """Wadati slope p / q = (vp + vs) / (2 (vp - vs))."""
43
43
  return self.p / self.q
44
44
 
45
45
  @property
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Wadati model needs, per event and station, a matched P and S arrival:
4
4
 
5
- M = (t_P + t_S) / 2 , D = (t_S - t_P) / 2 .
5
+ M = (t_P + t_S) / 2 , D = t_S - t_P .
6
6
 
7
7
  Association has not happened yet, so pairing must be done from raw picks without
8
8
  knowing events. Per station we take, in order of increasing S-P time (the
@@ -49,7 +49,7 @@ def pair_ps(station_id, t, phase_type, score=None, dt_max=25.0, method="monotoni
49
49
  score : array of shape (n_picks,) or None
50
50
  Pick quality in [0, 1]; the pair weight is ``min(score_P, score_S)``.
51
51
  dt_max : float
52
- Maximum S-P time (s); ``D <= dt_max/2``, i.e. distance <= beta*dt_max/2.
52
+ Maximum S-P time (s); ``D <= dt_max``, i.e. distance <= beta*dt_max.
53
53
  method : {"monotonic", "greedy"}
54
54
  "monotonic" (default): order-preserving matching -- the i-th P pairs with
55
55
  the earliest still-available S after it, so interleaved arrivals from
@@ -91,7 +91,7 @@ def pair_ps(station_id, t, phase_type, score=None, dt_max=25.0, method="monotoni
91
91
  while j < len(tS) and tS[j] <= tP[i]:
92
92
  j += 1
93
93
  if j < len(tS) and tS[j] - tP[i] <= dt_max:
94
- rows.append((0.5 * (tP[i] + tS[j]), 0.5 * (tS[j] - tP[i]),
94
+ rows.append((0.5 * (tP[i] + tS[j]), tS[j] - tP[i],
95
95
  min(sP[i], sS[j]), gp[i], gs[j]))
96
96
  j += 1
97
97
  continue
@@ -119,7 +119,7 @@ def pair_ps(station_id, t, phase_type, score=None, dt_max=25.0, method="monotoni
119
119
  rows.append(
120
120
  (
121
121
  0.5 * (tP[ip] + tS[is_]), # M
122
- 0.5 * (tS[is_] - tP[ip]), # D
122
+ tS[is_] - tP[ip], # D
123
123
  min(sP[ip], sS[is_]), # weight
124
124
  gp[ip], # iP
125
125
  gs[is_], # iS