✨ Enhance plasma and radiation data handling with 3D visualization support#35
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the project’s radiation + plasma tooling to better support ITER JOREK-style 3D workflows, including new radiation IDS loaders, an emitter factory, improved IDS time-slicing fallback behavior, and accompanying docs/notebooks and tests.
Changes:
- Add radiation IDS accessors + a
load_radiation_emitter()entrypoint that can use either emissivity values or Fourier-Bezier coefficients. - Improve IDS time-slice fallback by re-slicing through the IMAS memory backend when
get_slice()is unavailable. - Add 3D visualization notebooks and update test fixtures/dependencies to support the new workflows.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_ids_time_slice.py |
Adds unit tests for get_ids_time_slice() fallback + re-slicing behavior. |
tests/plasma/conftest.py |
Removes duplicate plasma dataset fixtures (now centralized). |
tests/ggd/conftest.py |
Removes duplicated dataset copy fixtures (now centralized). |
tests/emitter/test_radiation.py |
Adds tests covering radiation emitter loading + coefficient reconstruction. |
tests/conftest.py |
Centralizes dataset-to-tmp copying fixtures for multiple test suites. |
src/cherab/imas/plasma/edge.py |
Adjusts grid subset handling and charge usage in edge plasma loading. |
src/cherab/imas/plasma/core.py |
Adjusts charge usage in core plasma loading. |
src/cherab/imas/plasma/blend.py |
Adjusts grid subset handling and charge usage in blended plasma loading. |
src/cherab/imas/math/functions/fourier_bezier.pyx |
Ensures coefficient arrays are C-contiguous; fixes LaTeX line breaks. |
src/cherab/imas/math/functions/fourier_bezier.pxd |
Removes unused NumPy cimport. |
src/cherab/imas/ids/radiation/load_radiation.py |
Introduces radiation emissivity/coefficients loaders. |
src/cherab/imas/ids/radiation/__init__.py |
Exposes radiation IDS loader APIs. |
src/cherab/imas/ids/common/slice.py |
Adds memory-backend re-slicing fallback when get_slice() is unavailable. |
src/cherab/imas/ggd/unstruct_3d_mesh.py |
Clarifies interpolator cache docstrings. |
src/cherab/imas/ggd/unstruct_2d_mesh.py |
Clarifies interpolator cache docstrings. |
src/cherab/imas/ggd/unstruct_2d_extend_mesh.py |
Clarifies interpolator cache docstrings. |
src/cherab/imas/ggd/base_mesh.py |
Documents interpolator cache modes and defaults. |
src/cherab/imas/emitter/radiation.py |
Adds load_radiation_emitter() for values/coefficients/auto emissivity sources. |
src/cherab/imas/emitter/__init__.py |
Exposes emitter public API. |
pixi.toml |
Adds visualization dependencies for 3D workflows. |
docs/source/examples.md |
Adds radiation notebook gallery section. |
docs/source/conf.py |
Adds PyVista intersphinx mapping. |
docs/notebooks/radiation/grid_3d.ipynb |
Adds 3D grid visualization notebook (ITER JOREK). |
docs/notebooks/radiation/3d_radiation.ipynb |
Adds 3D radiation emitter visualization notebook. |
CHANGELOG.md |
Updates changelog for v0.5.0 release items/date. |
.binder/environment.yml |
Adds binder deps needed for new notebooks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #35 +/- ##
==========================================
- Coverage 70.10% 69.55% -0.56%
==========================================
Files 48 52 +4
Lines 3111 3291 +180
Branches 491 526 +35
==========================================
+ Hits 2181 2289 +108
- Misses 711 766 +55
- Partials 219 236 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Key changes include:
Improved grid subset handling in plasma loading functions.
Added 3D grid visualization notebook for ITER JOREK data.
Updated dependencies for enhanced visualization capabilities.
Implemented re-slicing of IDS with fallback handling.
Added unit tests for new functionalities and fixed charge type conversion issues.
Updated documentation and changelog for version 0.5.0 release.