🐛 Fix emission calculation and update type hints#30
Conversation
There was a problem hiding this comment.
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 anNDArray-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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 usenumpy.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.
Key changes include:
Corrected the emission calculation in the emission notebook and add some graphs.
Updated type hints for the
load_wall_meshandload_wall_outlinefunctions.