-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Issue:
Segy file has the required binary and trace headers but all the sample values in that file are exactly zero. This is possible when delta field is consciously chosen to be exactly zero. Such a file cannot be ingested to mdio format.
Steps to replicate:
Unzip the attached file to get the segy file. This file is just one trace with required headers but all sample values zeros.
AP_Data_900_General_SingleTracewithSampleValuesZero.zip
Following code replicates the issue
from mdio import segy_to_mdio
segy_file = "SingleTracewithSampleValuesZero.sgy"
mdio_file = "SingleTracewithSampleValuesZero.mdio"
if __name__ == "__main__":
segy_to_mdio(segy_file, mdio_file, index_bytes=[21], index_names=["cdp"], index_types=["int32"], chunksize=(128, 128), overwrite=True)Error:
The execution fails at
mdio-python/src/mdio/segy/blocked_io.py
Line 93 in 4ddae82
| glob_count, glob_sum, glob_sum_square, glob_min, glob_max = chunk_stats |
with error
segy_to_mdio(segy_file, mdio_file, index_bytes=[21], index_names=["cdp"], index_types=["int32"], chunksize=(128, 128), overwrite=True)
ValueError: not enough values to unpack (expected 5, got 0)Expected behavior
If the segy file has all sample values exactly zeros, we should generate a warning so that user can investigate. The ingestion should however still go through.