🎨 Plot proc radiation contour plot#3996
Merged
jonmaddock merged 4 commits intomainfrom Dec 8, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3996 +/- ##
==========================================
- Coverage 46.03% 42.63% -3.41%
==========================================
Files 123 123
Lines 28964 32455 +3491
==========================================
+ Hits 13335 13837 +502
- Misses 15629 18618 +2989 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f11588c to
d44aaca
Compare
d44aaca to
ed03f98
Compare
timothy-nunn
requested changes
Dec 3, 2025
jonmaddock
requested changes
Dec 5, 2025
Contributor
jonmaddock
left a comment
There was a problem hiding this comment.
Found the plotting calculations quite hard to follow, especially when double or triple-indexing arrays: please add some comments. I don't understand the profile calculations like you do, but do you have a docs reference for:
ne = nd_plasma_electron_on_axis * (1 - rho**2) ** alphan
?
25df405 to
68ec297
Compare
jonmaddock
approved these changes
Dec 8, 2025
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.
This pull request enhances the plasma radiation plotting functionality by introducing a new 2D contour plot for radiation density and refactoring the profile generation logic for improved clarity and consistency. The main updates include the addition of the
plot_rad_contourfunction, adjustments to how plasma profiles are constructed, and integration of the new contour plot into the main plotting workflow, with appropriate handling for unsupported plasma shapes.Major changes:
1. New Feature: 2D Radiation Contour Plot
plot_rad_contourfunction to generate 2D contour plots of radiation density using plasma profile and impurity data, including mirrored plotting for both plasma halves and enhanced plot formatting.main_plot), displaying it when the plasma shape supports closed boundaries, and providing a user-friendly message when not supported.2. Plasma Profile Calculation Refactor
plot_radprofileto ensure consistent use of then_plasma_profile_elementsparameter and to clarify the logic for both non-pedestal and pedestal cases. [1] [2]3. Bug Fixes and Consistency Improvements
min(0.9999, ...)calls, ensuring correct profile behaviour near the plasma edge.Checklist
I confirm that I have completed the following checks: