@@ -149,45 +149,7 @@ def trace_worker( # noqa: PLR0913
149149
150150 if raw_header_key in worker_variables :
151151 tmp_raw_headers = np .zeros_like (dataset [raw_header_key ])
152-
153- # _foo = traces.tobytes()[:240]
154-
155- # _asContiguousCopy = np.ascontiguousarray(traces.header.copy()).view("|V240")
156- # _asContiguousCopy1 = _asContiguousCopy[0]
157-
158- # _asContiguousNoCopy = np.ascontiguousarray(traces.header).view("|V240")
159- # _asContiguousNoCopy1 = _asContiguousNoCopy[0]
160-
161- # _asArrayCopy = traces.header.copy().view("|V240")
162- # _asArrayCopy1 = _asArrayCopy[0]
163-
164- # _asArrayNoCopy = traces.header.view("|V240")
165- # _asArrayNoCopy1 = _asArrayNoCopy[0]
166-
167- # _fo = type(traces.header)
168-
169- # _aahhhhhhh = segy_file.header[0]
170-
171- # _asBytes = traces.header.tobytes()
172- # _are_equal = _foo == _asBytes[:240]
173- # _asBytesLen = len(_asBytes)
174- # _asContiguousBytes = np.ascontiguousarray(traces.header).tobytes()
175- # _asContiguousBytesLen = len(_asContiguousBytes)
176- # _asContiguousBytesView = np.ascontiguousarray(traces.header[0]).tobytes().view("|V240")
177- # _asBuffer = memoryview(traces.header)
178-
179- # _type = traces.header.dtype
180-
181- # tmp_raw_headers[not_null] = traces.raw_header
182- # tmp_raw_headers[not_null] = np.ascontiguousarray(traces.header.copy(order="C")).view("|V240")
183152 tmp_raw_headers [not_null ] = np .ascontiguousarray (traces .header .copy ()).view ("|V240" )
184- # tmp_raw_headers[not_null] = _asContiguousBytes
185- # tmp_raw_headers[not_null] = _asBytes
186- # tmp_raw_headers[not_null] = traces.header.view("|V240")
187- # tmp_raw_headers[not_null] = np.ascontiguousarray(traces.header.copy()).view("|V240") # Leaks numpy metadata
188-
189-
190- # tmp_raw_headers[not_null] = updated_traces.header.view("|V240")
191153
192154 ds_to_write [raw_header_key ] = Variable (
193155 ds_to_write [raw_header_key ].dims ,
@@ -214,7 +176,6 @@ def trace_worker( # noqa: PLR0913
214176 encoding = ds_to_write [header_key ].encoding , # Not strictly necessary, but safer than not doing it.
215177 )
216178
217- # del raw_headers # Manage memory
218179 data_variable = ds_to_write [data_variable_name ]
219180 fill_value = _get_fill_value (ScalarType (data_variable .dtype .name ))
220181 tmp_samples = np .full_like (data_variable , fill_value = fill_value )
0 commit comments