-
Notifications
You must be signed in to change notification settings - Fork 28
Optional segyio and segy write #469
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
Conversation
|
I am particularly interested if you have ideas for improving the detection of segy files found here. |
dascore/io/segy/core.py
Outdated
| spec.samples = np.ones(len(time)) * len(channel) | ||
| spec.ilines = range(len(channel)) | ||
| spec.xlines = [1] | ||
| # breakpoint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
dascore/io/segy/utils.py
Outdated
| # Valid data format codes as specified in the SEGY rev1 manual. | ||
| VALID_FORMATS = [1, 2, 3, 4, 5, 8] | ||
|
|
||
| # This is the maximum possible interval between two samples due to the nature | ||
| # of the SEG Y format. | ||
| MAX_INTERVAL_IN_SECONDS = 0.065535 | ||
|
|
||
| # largest number possible with int16 | ||
| MAX_NUMBER_OF_SAMPLES = 32767 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we don't since they are edge cases. But for the writer, we may want to ensure we don't make a trace with more than max number of samples. Since DAS can be very small dt and very large time, this could become an issue.
|
This is failing. @aaronjgirard and I discussed Also, for now we are just going to support converting patches with a dimension of "channel" to segy. In the future we will figure out how to handle 'distance' or 'x', 'y' coords. |
|
We also need to add a test for standard patch conversion |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #469 +/- ##
========================================
Coverage 99.85% 99.85%
========================================
Files 115 115
Lines 9374 9482 +108
========================================
+ Hits 9360 9468 +108
Misses 14 14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Hey @aaronjgirard, I am going to merge this. I think I implemented everything we planned on for the first pass at segy write, and we really need this fix to support python 3.13. No doubt, we will have improvements to make to segy in the future! |
Description
This PR removes segyio as a hard dependency. Segyio is great, but usually very slow to upgrade to newer python versions which, in tern, keeps DASCore from upgrading. This PR fixes this.
It also implements very simple support for writing segy files as requested in #428. This will probably require more work in the future to get right, but at least we have a start here.
@aaronjgirard, do you mind reviewing this PR?
Checklist
I have (if applicable):