@@ -91,20 +91,10 @@ def mdio_to_segy( # noqa: PLR0912, PLR0913
9191
9292 output_segy_path = Path (output_segy_path )
9393
94- # mdio = MDIOReader(
95- # mdio_path_or_buffer=mdio_path_or_buffer,
96- # access_pattern=access_pattern,
97- # storage_options=storage_options,
98- # )
99-
10094 mdio = MDIO .open (mdio_path_or_buffer )
10195
10296 seismic_chunks = mdio .seismic .encoding .get ("chunks" , mdio .seismic .shape )
10397
104- print (f"mdio.seismic.chunks: { seismic_chunks } " )
105- print (f"mdio.seismic.shape: { mdio .seismic .shape } " )
106- print (f"mdio.seismic.dtype: { mdio .seismic .dtype } " )
107-
10898 if new_chunks is None :
10999 new_chunks = segy_export_rechunker (seismic_chunks , mdio .seismic .shape , mdio .seismic .dtype )
110100
@@ -129,9 +119,6 @@ def mdio_to_segy( # noqa: PLR0912, PLR0913
129119 else :
130120 mdio , segy_factory = mdio_spec_to_segy (* creation_args )
131121
132- print (f"segy_factory: { segy_factory } " )
133-
134- # live_mask = mdio.live_mask.compute()
135122 live_mask = mdio .trace_mask .compute ().to_numpy ()
136123
137124 if selection_mask is not None :
@@ -152,17 +139,11 @@ def mdio_to_segy( # noqa: PLR0912, PLR0913
152139 dim_slices += (slice (start , stop ),)
153140
154141 # Lazily pull the data with limits now, and limit mask so its the same shape.
155- print (f"dim_slices: { dim_slices } " )
156142 indexer = {}
157143 for dim , i in zip (mdio .trace_mask .dims , dim_slices ):
158144 indexer [dim ] = i
159145
160- print (f"indexer: { indexer } " )
161- # live_mask = mdio.trace_mask.isel(dim_slices[:-1])
162- # headers = mdio.headers.isel(dim_slices[:-1])
163- # samples = mdio.seismic.isel(dim_slices[:-1])
164146 live_mask = mdio .trace_mask .isel (indexer )
165- print (f"live_mask { live_mask } " )
166147
167148 headers = mdio .headers .isel (indexer )
168149 samples = mdio .seismic .isel (indexer )
0 commit comments