Add pulse timings dataclass - #4497
Open
chris-ashe wants to merge 10 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4497 +/- ##
==========================================
+ Coverage 49.30% 49.38% +0.08%
==========================================
Files 151 151
Lines 29611 29640 +29
==========================================
+ Hits 14599 14638 +39
+ Misses 15012 15002 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…operties for PF coil active phases
…roved timing management
…d timing management
…mproved pulse timing management
…nd integrate point abbreviations for improved clarity in timing management
…ings dataclass for improved clarity in timing representation
chris-ashe
marked this pull request as ready for review
August 4, 2026 12:31
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 refactors how pulse timing and cumulative time points are handled throughout the codebase by introducing and consistently applying the
PulseTimingsclass. This change improves code clarity, reduces duplication, and centralizes pulse timing logic, making it easier to maintain and extend. The update affects plotting routines, model calculations, and output formatting for pulse-related data.Pulse timing refactor and centralization:
Replaced manual cumulative time calculations in plotting functions (e.g.,
plot_current_profiles_over_time,plot_system_power_profiles_over_time,plot_cs_stress_time_profile) with usage of the newPulseTimingsclass, ensuring consistent time axis generation and annotation across all plots.Updated model logic in
physics.pyandpfcoil.pyto usePulseTimingsfor all derived pulse timing values, such as total pulse time, plasma-present time, and no-burn time, removing duplicated cumulative sum logic.Modified power system models (
power.py) to passPulseTimingsas an argument to the PF coil power calculation routines (pfpwr), ensuring all power calculations use unified pulse timing data.Output and labeling improvements:
Standardized the use of pulse time labels and cumulative time points in output routines and plot annotations, using properties from
PulseTimingsfor axis tick labels and time column headers.Cleanup and removal of legacy code:
times_variables.pyand related model files, reducing code redundancy.Checklist
I confirm that I have completed the following checks: