1313from segy .config import SegyHeaderOverrides
1414from segy .standards .codes import MeasurementSystem as SegyMeasurementSystem
1515from segy .standards .fields import binary as binary_header_fields
16- from zarr import open_group as zarr_open_group
1716
1817from mdio .api .io import _normalize_path
19- from mdio .api .io import _normalize_storage_options
2018from mdio .api .io import to_mdio
2119from mdio .builder .schemas .chunk_grid import RegularChunkGrid
2220from mdio .builder .schemas .chunk_grid import RegularChunkShape
@@ -587,7 +585,6 @@ def segy_to_mdio( # noqa PLR0913
587585 default_variable_name = mdio_template .default_variable_name
588586 # This is an memory-expensive and time-consuming read-write operation
589587 # performed in chunks to save the memory
590- # NOTE: trace_data_crc32c was already calculated during header scanning phase
591588 blocked_io .to_zarr (
592589 segy_file_kwargs = segy_file_kwargs ,
593590 output_path = output_path ,
@@ -600,9 +597,10 @@ def segy_to_mdio( # noqa PLR0913
600597 if trace_data_crc32c is not None :
601598 # The trace_data_crc32c is now the full file CRC32C from DistributedCRC32C
602599 final_crc32c = trace_data_crc32c
600+ from mdio .api .io import _normalize_storage_options # noqa: PLC0415
603601
604602 storage_options = _normalize_storage_options (output_path )
605- zarr_group = zarr_open_group (output_path .as_posix (), mode = "a" , storage_options = storage_options )
603+ zarr_group = zarr . open_group (output_path .as_posix (), mode = "a" , storage_options = storage_options )
606604 zarr_group .attrs .update (
607605 {
608606 "segy_input_crc32c" : final_crc32c , # Store as integer, not hex string
0 commit comments