Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/mdio/builder/templates/seismic_2d_prestack_shot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(self, data_domain: SeismicDataDomain):

self._dim_names = ("shot_point", "channel", self._data_domain)
self._physical_coord_names = ("source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y")
self._logical_coord_names = ("gun",)
self._var_chunk_shape = (16, 32, 2048)

@property
Expand All @@ -39,12 +38,6 @@ def _add_coordinates(self) -> None:

# Add non-dimension coordinates
compressor = compressors.Blosc(cname=compressors.BloscCname.zstd)
self._builder.add_coordinate(
"gun",
dimensions=("shot_point",),
data_type=ScalarType.UINT8,
compressor=compressor,
)
self._builder.add_coordinate(
"source_coord_x",
dimensions=("shot_point",),
Expand Down
17 changes: 4 additions & 13 deletions tests/unit/v1/templates/test_seismic_2d_prestack_shot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ def _validate_coordinates_headers_trace_mask(dataset: Dataset, headers: Structur
"""Validate the coordinate, headers, trace_mask variables in the dataset."""
# Verify variables
# 4 dim coords + 5 non-dim coords + 1 data + 1 trace mask + 1 headers = 12 variables
assert len(dataset.variables) == 11
assert len(dataset.variables) == 10

# Verify trace headers
validate_variable(
dataset,
name="headers",
dims=[("shot_point", 256), ("channel", 24)],
coords=["gun", "source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
coords=["source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
dtype=headers,
)

validate_variable(
dataset,
name="trace_mask",
dims=[("shot_point", 256), ("channel", 24)],
coords=["gun", "source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
coords=["source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
dtype=ScalarType.BOOL,
)

Expand Down Expand Up @@ -69,14 +69,6 @@ def _validate_coordinates_headers_trace_mask(dataset: Dataset, headers: Structur
assert domain.metadata.units_v1 == UNITS_SECOND

# Verify non-dimension coordinate variables
validate_variable(
dataset,
name="gun",
dims=[("shot_point", 256)],
coords=["gun"],
dtype=ScalarType.UINT8,
)

source_coord_x = validate_variable(
dataset,
name="source_coord_x",
Expand Down Expand Up @@ -125,7 +117,6 @@ def test_configuration(self) -> None:
assert t._data_domain == "time"
assert t._dim_names == ("shot_point", "channel", "time")
assert t._physical_coord_names == ("source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y")
assert t._logical_coord_names == ("gun",)
assert t.full_chunk_shape == (16, 32, 2048)

# Variables instantiated when build_dataset() is called
Expand Down Expand Up @@ -159,7 +150,7 @@ def test_build_dataset(self, structured_headers: StructuredType) -> None:
dataset,
name="amplitude",
dims=[("shot_point", 256), ("channel", 24), ("time", 2048)],
coords=["gun", "source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
coords=["source_coord_x", "source_coord_y", "group_coord_x", "group_coord_y"],
dtype=ScalarType.FLOAT32,
)
assert isinstance(seismic.compressor, Blosc)
Expand Down