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

Can read according to traces[ 1 5 9]? #16

Open
13299118606 opened this issue Apr 8, 2023 · 2 comments
Open

Can read according to traces[ 1 5 9]? #16

13299118606 opened this issue Apr 8, 2023 · 2 comments

Comments

@13299118606
Copy link

Can read sgy read according to traces, such as parameter traces in python; sgyio, want to read part of large sgy data without having to load it into the whole data and then slice it, such as reading [1 59 100] of a [50 :100].

@mloubout
Copy link
Member

mloubout commented Apr 8, 2023

Lemme check I I understand the question, you want to read a few specific traces out of a segy file? If so yes this is exactly what this package is designed for. Don't use segy_read that reads the whole file but use segy_scan that only reads the headers and then you can access specific traces via block.data[tracenmber].

E.g.

block = segy_scan(pwd(), partial_name,  ["SourceX", "SourceY"])
traces = Float32.(block[1].data[[1, 5, 9]]) # 1 block per source

@13299118606
Copy link
Author

Thank you very much for your answer, I understand out this powerful function, but there are still some small bugs and suggestions in the use process;
1.traces=block2 [[1,5,9]] # Read lane 1,5,9 seismic data is seisblock, which must be considered artificial set traces.fileheader.bfh.dt = 1000, cannot directly equal to seiscon.dsf * 1000, without this field this will cause the write sgy data open error in other applications.
2. Can you add other formats segywrite, such as the IBMfloat format

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