Skip to content

Commit 3a8fdd6

Browse files
committed
[BUG] Fixed order of ids to make activation backwards compatible
1 parent 53853d1 commit 3a8fdd6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gempy_engine/modules/activator/activator_interface.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def soft_segment_unbounded_np(Z, edges, ids, sigmoid_slope):
140140
"""
141141
Z = np.asarray(Z)
142142
edges = np.asarray(edges)
143-
ids = np.asarray(ids)
143+
ids = np.asarray(ids[::-1])
144144

145145
# Check if sigmoid function is num or array
146146
match sigmoid_slope:
@@ -175,9 +175,10 @@ def _final_faults_segmentation(Z, edges, sigmoid_slope):
175175

176176

177177
def _lith_segmentation(Z, edges, ids, sigmoid_slope):
178+
178179
# 1) per-edge temperatures τ_k = |Δ_k|/(4·m)
179180
jumps = np.abs(ids[1:] - ids[:-1]) # shape (K-1,)
180-
tau_k = jumps / float(4 * sigmoid_slope) # shape (K-1,)
181+
tau_k = jumps / float(sigmoid_slope) # shape (K-1,)
181182
# 2) first bin (-∞, e1) via σ((e1 - Z)/τ₁)
182183
first = _sigmoid(
183184
scalar_field=-Z,

0 commit comments

Comments
 (0)