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

Fix bug in decoding IBM-float values in trace accessor #175

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

tasansal
Copy link
Contributor

@tasansal tasansal commented Aug 9, 2024

Resolves #168

The TraceAccessor was constructing the wrong pipeline when IBM-float header keys were present. It was not decoding the IBM-float headers. The SegyFile's .trace method was returning wrong values. However, the .header accessor works fine because the pipeline is correct.

The fundamental issue is: Transform and TransformPipeline has no way to apply nested decoding transformations. As a workaround (without changing the fundamental design), I implemented a TraceTransform, which applies a trace's header and data transforms pipelines in sequence. This is terrible because it introduces a circular dependency: TransformPipeline depends on Transforms, which depends on TransformPipelines. You can also see all the typing issues we had to ignore.

This was a quick fix, but we must refactor the transformation logic to improve it. Will open a separate issue for it.

@tasansal tasansal added the bug Something isn't working label Aug 9, 2024
@tasansal tasansal self-assigned this Aug 9, 2024
@tasansal tasansal merged commit 4c9e233 into main Aug 9, 2024
30 checks passed
@tasansal tasansal deleted the fix-ibm-trace-accessor branch August 9, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Unable to correctly read the 32 bit IBM Floating point numbers from trace headers
1 participant