Skip to content

Commit 826cc43

Browse files
committed
Fix incorrect application of endianness in synthetic generation
1 parent 0978d81 commit 826cc43

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/unit/test_disaster_recovery_wrapper.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def create_test_segy_file(
7373
) -> SegySpec:
7474
"""Create a test SEGY file with synthetic data."""
7575
# Update spec with desired endianness
76-
spec = spec.model_copy(update={"endianness": endianness})
76+
spec.endianness = endianness
7777

7878
factory = SegyFactory(spec=spec, samples_per_trace=samples_per_trace)
7979

@@ -186,6 +186,11 @@ def test_header_validation_configurations(
186186
raw_headers["crossline"].tobytes(), dtype=np.uint8
187187
)[:4]
188188

189+
print(f"Transformed headers: {transformed_headers.tobytes()}")
190+
print(f"Raw headers: {raw_headers.tobytes()}")
191+
print(f"Inline bytes disk: {inline_bytes_disk.tobytes()}")
192+
print(f"Crossline bytes disk: {crossline_bytes_disk.tobytes()}")
193+
189194
# Compare bytes
190195
assert np.array_equal(raw_inline_bytes, inline_bytes_disk), \
191196
f"Inline bytes mismatch for trace {trace_idx} in {config_name}"

0 commit comments

Comments
 (0)