Hotfix/issue/38 bug correction in sfgetcregather #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📤 Pull Request
Description
Correct bug in sfgetcregather putting zeroed samples when CMP coordinate of the traces gets out of model bounds.
Resolve #38
Type of change
Please delete options that are not relevant.
Add images bellow and aditional context if needed
CRE trajectories are parabolas in CMP x Offset domain. And CRE gathers are seismic traces above those trajectories. Therefore, CMP increases faster than Offset. So, for a small amount of increasing in Offset coordinate it has a greater increase in CMP coordinate (See the image above. Horizontal axis is CMP, vertical axis is Offset).
Because of that, a CMP coordinate of a trace can be out of the limits of the model in the CMP x Offset plane, despite it has a valid Offset coordinate. This trace will generate an invalid output of a CRE Gather from sfgetcregather, and the bug referenced in this issue will occur.
The solution is when a trace with an invalid CMP coordinate is request to form the CRE Gather, put a zeroed one (zero amplitude trace). The amount of traces in a gather will be the same and zero amplitudes won't affect following processes.