Skip to content

✨ Enhance plasma and radiation data handling with 3D visualization support#35

Merged
munechika-koyo merged 25 commits into
masterfrom
develop
Jun 24, 2026
Merged

✨ Enhance plasma and radiation data handling with 3D visualization support#35
munechika-koyo merged 25 commits into
masterfrom
develop

Conversation

@munechika-koyo

Copy link
Copy Markdown
Member

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cherab/imas/plasma/edge.py
Comment thread src/cherab/imas/plasma/blend.py
Comment thread src/cherab/imas/ids/common/slice.py Outdated
Comment thread src/cherab/imas/ids/radiation/load_radiation.py
Comment thread src/cherab/imas/ids/radiation/load_radiation.py
Comment thread src/cherab/imas/ids/radiation/load_radiation.py Outdated
Comment thread tests/emitter/test_radiation.py Outdated
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.55%. Comparing base (d9b987a) to head (816de95).

Files with missing lines Patch % Lines
src/cherab/imas/ids/radiation/load_radiation.py 29.41% 37 Missing and 11 partials ⚠️
src/cherab/imas/emitter/radiation.py 74.35% 14 Missing and 6 partials ⚠️
src/cherab/imas/plasma/blend.py 44.44% 4 Missing and 1 partial ⚠️
src/cherab/imas/plasma/edge.py 44.44% 4 Missing and 1 partial ⚠️
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.
📢 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.

@munechika-koyo munechika-koyo merged commit 387e901 into master Jun 24, 2026
11 of 13 checks passed
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.

2 participants