Skip to content

Commit 29436d8

Browse files
committed
Checkpoint
1 parent afd4d80 commit 29436d8

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/mdio/builder/dataset_builder.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,17 @@ def push_dimension(self, dimension: NamedDimension, position: int, new_dim_chunk
125125
msg = "New dimension chunk size must be greater than 0"
126126
raise ValueError(msg)
127127

128+
print(f"Setting position {position} to size {new_dim_size}")
129+
print(f"Before: {self._dimensions}")
130+
128131
# In-place insertion of the dimension to the existing list of dimensions
129132
self._dimensions.insert(position, dimension)
133+
print(f"After: {self._dimensions}")
130134

131-
self._dimensions[position].size = new_dim_size
135+
# print(f"Setting position {position} to size {new_dim_size}")
136+
# print(self._dimensions)
137+
# self._dimensions[position].size = new_dim_size
138+
# print(self._dimensions)
132139

133140
def propogate_dimension(variable: Variable, position: int, new_dim_chunk_size: int) -> Variable:
134141
"""Propogates the dimension to the variable or coordinate."""

src/mdio/builder/templates/abstract_dataset_template.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def build_dataset(
6868
Dataset: The constructed dataset
6969
"""
7070
self._dim_sizes = sizes
71+
print(f"Sizes: {self._dim_sizes}")
7172
self._horizontal_coord_unit = horizontal_coord_unit
7273

7374
attributes = self._load_dataset_attributes() or {}
@@ -80,6 +81,8 @@ def build_dataset(
8081
if header_dtype:
8182
self._add_trace_headers(header_dtype)
8283

84+
85+
# This seems to be breaking the dataset, but adds the trace dimension.
8386
for transform in self._queued_transforms:
8487
logger.debug(f"Applying transform: {transform.__name__}")
8588
transform(self._builder)

src/mdio/converters/segy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ def segy_to_mdio( # noqa PLR0913
506506
logger.warning("MDIO__IMPORT__RAW_HEADERS is experimental and expected to change or be removed.")
507507
mdio_template = _add_raw_headers_to_template(mdio_template)
508508

509+
print(grid)
510+
509511
mdio_ds: Dataset = mdio_template.build_dataset(
510512
name=mdio_template.name,
511513
sizes=grid.shape,

0 commit comments

Comments
 (0)