Skip to content

Add ion temp class - #4598

Merged
timothy-nunn merged 12 commits into
mainfrom
add_ion_temp_class
Sep 29, 2026
Merged

timothy-nunn merged 12 commits into
mainfrom
add_ion_temp_class

Conversation

@chris-ashe

@chris-ashe chris-ashe commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

This PR introduces a new explicit class for the ion temperature profile IonTemperatureProfile. This moves all existing ion temperature function and calculations into the class. This also created a new ion temperature profile array as part of PlasmaProfile that can be called for function use instead of having to always multiply the electron profile by the scaling constant. New explicitly variables for the ion and electron temperatures at the pedestals and separatrix's have also been made.

Variable Renaming and Standardization:

  • Renamed all instances of temp_plasma_pedestal_kev and temp_plasma_separatrix_kev to temp_plasma_pedestal_electron_kev and temp_plasma_separatrix_electron_kev in code, input handling, validation, and plotting routines for improved clarity and consistency.

  • Updated variable mapping for obsolete and legacy variable names to point to the new standardized names.

Documentation and Input File Updates:

  • Updated documentation and input parameter tables to use the new variable names, and clarified the distinction between electron and ion temperature profiles.

  • Modified all relevant example input files to use the new variable names.

Plotting and Output Enhancements:

  • Enhanced temperature profile plotting to use the new variable names and improved the displayed labels to include both electron and ion temperatures for greater clarity.
image

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe added Profiles Relating to the plasma profiles Refactor labels Sep 14, 2026
@codecov-commenter

codecov-commenter commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.11628% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.91%. Comparing base (4171d8d) to head (8810217).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
process/core/io/plot/summary.py 0.00% 6 Missing ⚠️
process/models/physics/plasma_profiles.py 44.44% 5 Missing ⚠️
process/models/physics/physics.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4598      +/-   ##
==========================================
+ Coverage   49.88%   49.91%   +0.03%     
==========================================
  Files         151      151              
  Lines       30071    30081      +10     
==========================================
+ Hits        15000    15015      +15     
+ Misses      15071    15066       -5     

☔ 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.

@chris-ashe
chris-ashe force-pushed the add_ion_temp_class branch 2 times, most recently from 7b94ff1 to fb974f0 Compare September 28, 2026 12:14
@chris-ashe
chris-ashe marked this pull request as ready for review September 28, 2026 12:39
@chris-ashe
chris-ashe requested a review from a team as a code owner September 28, 2026 12:39
@timothy-nunn timothy-nunn self-assigned this Sep 28, 2026
@chris-ashe
chris-ashe force-pushed the add_ion_temp_class branch 3 times, most recently from 8de2f83 to 60e47b9 Compare September 29, 2026 09:27
…atureProfile in BootstrapCurrent and PlasmaProfile classes
…_pedestal_electron_kev` across various files including documentation, input files, and code logic.
…lasma_separatrix_electron_kev` across multiple files, including documentation, input files, and code logic.
- Introduced `temp_plasma_pedestal_ion_kev` and `temp_plasma_separatrix_ion_kev` to store ion temperature values.
- Updated `plot_t_profiles` function to include ion temperature in the output.
- Enhanced `Physics` class to output ion temperature values for pedestal and separatrix.
- Modified `PlasmaProfile` class to reset ion temperature values appropriately.
Comment thread process/models/physics/profiles.py Outdated
Comment on lines +650 to +651
self.data.physics.temp_plasma_ion_vol_avg_kev
/ self.data.physics.temp_plasma_electron_vol_avg_kev

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this self.data.physics.f_temp_plasma_ion_electron?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good spot, yes that should just be self.data.physics.f_temp_plasma_ion_electron. It will give the same value but now makes all the calcs consistent

@timothy-nunn
timothy-nunn merged commit 4ad2bec into main Sep 29, 2026
8 of 11 checks passed
@timothy-nunn
timothy-nunn deleted the add_ion_temp_class branch September 29, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Profiles Relating to the plasma profiles Refactor Variable rename

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants