-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make SEG-Y endianness and spec inference more robust and flexible (#223)
* add endianness and more codes which also removes mapping and bidict requirement * backward compatibility for python <3.12 * Remove unused sample fields from config.py The 'samples_per_trace' and 'sample_interval' fields were removed from `src/segy/config.py`. These fields are no longer needed and their removal simplifies the configuration handling. * Refactor SEG-Y file endianness and revision inference Rework the logic for inferring the endianness and revision of SEG-Y files, introducing explicit handling for different cases and additional settings-based overrides. This update simplifies control flow and improves the clarity and maintainability of the code. * Remove native endianness enum * Fix segy_revision_minor calculation in factory.py * Remove 'sample_format' from SEG-Y file __slots__. * fix code based on static type analysis * Refactor spec initialization in SEGY file handling Extract spec initialization into a separate method `_initialize_spec` to simplify the code structure and improve readability. This refactoring ensures centralized logic for setting the SEG-Y standard and endianness, reducing redundancy and potential errors. * update locked dependencies * Update error message for endianness inference failure * Add SegyStandard.REV2 to test parameters --------- Co-authored-by: Altay Sansal <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,511 additions
and
1,310 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.