Skip to content

Commit 70dc39b

Browse files
committed
fix geometry calculation by adding the new shot_index field
1 parent 7c1b186 commit 70dc39b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/mdio/segy/geometry.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,13 @@ def transform(
487487

488488
# This might be slow and potentially could be improved with a rewrite
489489
# to prevent so many lookups
490+
shot_index = np.empty(len(index_headers), dtype="uint8")
491+
index_headers = rfn.append_fields(index_headers, "shot_index", shot_index)
490492
if geom_type == ShotGunGeometryType.B:
491493
for sail_line in unique_sail_lines:
492494
sail_line_idxs = np.where(index_headers["sail_line"][:] == sail_line)
493-
index_headers["shot_point"][sail_line_idxs] = np.floor(
494-
index_headers["shot_point"][sail_line_idxs] / max_num_guns
495+
index_headers["shot_index"][sail_line_idxs] = np.floor(
496+
index_headers["shot_index"][sail_line_idxs] / max_num_guns
495497
)
496498
return index_headers
497499

0 commit comments

Comments
 (0)