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

Override Numpy's copy method to SegyArray to ensure uninterpreted bytes are preserved. #78

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

tasansal
Copy link
Contributor

@tasansal tasansal commented Apr 5, 2024

A copy method, which maintains raw binary data and padding bytes, has been added to the SegyArray. This is essential for SEG-Y data processing where unparsed fields are present and preserving raw (uninterpreted) binary data integrity is crucial.

A 'copy' method, which maintains raw binary data and padding bytes, has been added to the SegyArray class in arrays.py. This is essential for SEG-Y data processing where unparsed fields are present but preserving raw binary data integrity is crucial.
@tasansal tasansal added the bug Something isn't working label Apr 5, 2024
@tasansal tasansal self-assigned this Apr 5, 2024
@tasansal tasansal changed the title Add a copy method to SegyArray to ensure uninterpreted bytes are preserved. Override Numpy's copy method to SegyArray to ensure uninterpreted bytes are preserved. Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 94.59%. Comparing base (af1922c) to head (4347c4c).

❗ Current head 4347c4c differs from pull request most recent head 75b7436. Consider uploading reports for the commit 75b7436 to get more accurate results

Files Patch % Lines
src/segy/arrays.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   94.75%   94.59%   -0.17%     
==========================================
  Files          37       37              
  Lines        1660     1664       +4     
  Branches      205      205              
==========================================
+ Hits         1573     1574       +1     
- Misses         67       70       +3     
  Partials       20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Altay Sansal added 2 commits April 4, 2024 19:33
The test has been added to confirm that the copy method of SegyArray can successfully copy a segy array with the exact underlying buffer. The test also verifies that the memory between the original segy array and its copy are not shared.
@tasansal tasansal merged commit 6c2949c into main Apr 5, 2024
30 checks passed
@tasansal tasansal deleted the add-void-copy branch April 5, 2024 00:46
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.

1 participant