Skip to content

🐛 Fix emission calculation and update type hints#30

Merged
munechika-koyo merged 6 commits into
masterfrom
develop
Apr 13, 2026
Merged

🐛 Fix emission calculation and update type hints#30
munechika-koyo merged 6 commits into
masterfrom
develop

Conversation

@munechika-koyo
Copy link
Copy Markdown
Member

Key changes include:

  • Corrected the emission calculation in the emission notebook and add some graphs.

  • Updated type hints for the load_wall_mesh and load_wall_outline functions.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the IMAS wall-loading API typing and corrects/extends the plasma emission documentation notebook so that emission is computed consistently and additional diagnostic plots/metrics are produced.

Changes:

  • Refined return type hints in wall loading helpers (notably load_wall_outline() now returns an NDArray-typed dict).
  • Fixed emission accumulation logic in the emission notebook and added checks/plots (total power estimate, wavelength-band breakdown).
  • Adjusted OpenADAS initialization/imports and added a repository population guard.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/cherab/imas/wall/wall.py Adds NDArray typing and tweaks docstring return type formatting for wall loaders.
docs/notebooks/plasma/emission.ipynb Fixes emission summation logic, improves OpenADAS setup flow, and adds additional computed outputs/plots.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cherab/imas/wall/wall.py Outdated
Comment thread docs/notebooks/plasma/emission.ipynb Outdated
Comment thread docs/notebooks/plasma/emission.ipynb Outdated
Comment thread docs/notebooks/plasma/emission.ipynb
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 11, 2026

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.90%. Comparing base (70fc172) to head (be1b108).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
src/cherab/imas/ids/wall/load3d.py 0.00% 10 Missing ⚠️
src/cherab/imas/ids/wall/load2d.py 0.00% 2 Missing ⚠️
src/cherab/imas/wall/wall.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
- Coverage   64.10%   63.90%   -0.21%     
==========================================
  Files          46       46              
  Lines        2811     2820       +9     
  Branches      468      468              
==========================================
  Hits         1802     1802              
- Misses        804      813       +9     
  Partials      205      205              

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the plasma emission example notebook to correct how total emission is accumulated and adds additional derived plots/metrics, and it refines type annotations/documentation for IMAS wall loading helpers.

Changes:

  • Adjust emission accumulation logic in Emission2DSample._emission() and extend the notebook with additional plots and total-power calculations.
  • Update load_wall_outline() return type annotation to use numpy.typing.NDArray (and tweak related docstring type formatting).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/cherab/imas/wall/wall.py Introduces NDArray typing for load_wall_outline() and adjusts return-type docstring formatting.
docs/notebooks/plasma/emission.ipynb Fixes emission aggregation and adds total radiated power and spectrum visualizations/summary calculations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cherab/imas/wall/wall.py
Comment thread docs/notebooks/plasma/emission.ipynb Outdated
Comment thread docs/notebooks/plasma/emission.ipynb Outdated
Comment thread src/cherab/imas/wall/wall.py
@munechika-koyo munechika-koyo merged commit 0879490 into master Apr 13, 2026
13 of 15 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