Skip to content

DO NOT SQUASH: Simple accurate vp output#330

Open
Olender wants to merge 8 commits into
mainfrom
simple_accurate_vp_output
Open

DO NOT SQUASH: Simple accurate vp output#330
Olender wants to merge 8 commits into
mainfrom
simple_accurate_vp_output

Conversation

@Olender

@Olender Olender commented Jul 14, 2026

Copy link
Copy Markdown
Member

TLDR: New method to export scalar fields to segy or png and some io file reorganization

Since we use high-order FEM we cant visualize correctly in paraview. I've introduced a new utility function for exporting scalar fields to segy or png (for paper or report images). Now we can export our data to a more accurate (based on the grid space of the desired sampling) image. Unfortunately, since the parallelism related decorators were all over the place I had to reorganize them as well.

Therefore, this pull request refactors the spyro/io module to improve code organization. I just moved the parallelism-related decorators and functions into a new parallelism_wrappers module, and updated the imports throughout the codebase. These changes help separate concerns between basic I/O operations and parallelism logic.

Refactoring and Code Organization

  • Moved all parallelism-related decorators and utility functions (such as ensemble_save, ensemble_load, ensemble_gradient, ensemble_functional, delete_tmp_files, switch_serial_shot, ensemble_shot_record, is_owner, and ensemble_propagator) from basicio.py to a new parallelism_wrappers.py module, and updated imports accordingly throughout the codebase.

New Features

  • Added a new utility function export_scalar_field in segy_io.py to export scalar fields to SEG-Y or PNG formats, including logic for intermediate conversion and file validation. (spyro/io/segy_io.py,

@Olender Olender closed this Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.77064% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.63%. Comparing base (05b166a) to head (d87e538).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
spyro/io/parallelism_wrappers.py 75.91% 46 Missing ⚠️
spyro/io/segy_io.py 35.71% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   84.73%   84.63%   -0.11%     
==========================================
  Files          97       98       +1     
  Lines        9379     9409      +30     
==========================================
+ Hits         7947     7963      +16     
- Misses       1432     1446      +14     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Olender Olender changed the title Simple accurate vp output DO NOT SQUASH: Simple accurate vp output Jul 18, 2026
@Olender
Olender requested a review from ruansava July 18, 2026 20:45
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

Successfully merging this pull request may close these issues.

1 participant