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

Little endian segy #18

Open
kerim371 opened this issue Jun 4, 2023 · 3 comments
Open

Little endian segy #18

kerim371 opened this issue Jun 4, 2023 · 3 comments

Comments

@kerim371
Copy link
Contributor

kerim371 commented Jun 4, 2023

Hi,

It seems there is no automatic check if endianess.
The package always supposes that endian is big.
This makes impossible to read/scan little endian segy.

@kerim371
Copy link
Contributor Author

kerim371 commented Jun 4, 2023

If so then I propose to add function: getSEGYEndian(file) that checks dataFormatCode then switches bytes and becomes dataFormatCodeSE and then we can check either dataFormatCode should be in range [1,8] or dataFormatCodeSE in the same range (these are exclusive: only one of those variable can be in range [1,8] at the same time).
Then check native machine endian using Julia API (there must be something) and make a decision wich endian has the SEGY. And use this endian when reading/scanning SEGY.

@mloubout
Copy link
Member

mloubout commented Jun 5, 2023

That could be good indeed

@kerim371
Copy link
Contributor Author

kerim371 commented Jun 5, 2023

I think I could try.

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

2 participants