Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEG-Y rev2 file endianness #530

Open
TheZappie opened this issue Mar 30, 2022 · 0 comments
Open

SEG-Y rev2 file endianness #530

TheZappie opened this issue Mar 30, 2022 · 0 comments

Comments

@TheZappie
Copy link

SEG-Y rev2 officially allows files to be written in both little and big endian.
As per file specification, the endianness can be inferred from bytes 3297-3300. However in Segyio, one has to explicitly pass the endianness to segyio.open.

Feature request: infer the file endianness from the SEG-Y when opening the file by default (and revert back to old behavior when nothing is found in the relevant bytes).

Currently segyio doesn't recognize the rev2 fields. That may be required to implement this.

f.bin[3297] = 16909060
File "C:\ProgramData\Miniconda3\envs\py310\lib\site-packages\segyio\field.py", line 419, in __setitem__
    self.putfield(self.buf, key, val)
KeyError: 'No such field 3297'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant