Closed noppGithub closed 4 years ago
I had a similar problem. The cause was that whoever manipulated my SEGYs used different encoding when manipulating the binary header, so some are read in little endian, some in big.
You need to override every single binary header variable type that throws an error with one that fits. For that you need to look at the error message, find the corresponding python variable and override it.
For me it was for example
class CustomBinaryReelHeader(BinaryReelHeader):
ensemble_fold = field(
UInt16, offset=3227, default=0, documentation=
"""Number of samples per data trace. Mandatory for all types of data.
Note: The sample interval and number of samples in the Binary File Header should be for the primary set of
seismic data traces in the file."""
)
correlated_data_traces=field(
UInt16, offset=3249, default=0, documentation=
"""Number of correlated data traces."""
)
binary_gain_recovered=field(
UInt16, offset=3251, default=0, documentation=
"""Binary Gain rec"""
)
amplitude_recovery_method=field(
UInt16, offset=3253, default=0, documentation=
""Recovery Method"""
)
This will create nonsensical readings in the binary file header. But at least it fully reads the stuff.
@rob-smallshire Please accept my apology if my question annoys you. I have read your guide in #87 and try to make use of
custom_header.py
but can't make it. I'm trying to read a shot-gather.sgy file with the following script. Could you please guide me on which number to be replaced.Thank you in advance