Skip to content

Add function to plot PF coil dimensions in summary plot - #4499

Merged
clmould merged 2 commits into
mainfrom
add_pf_dimensions_diagram
Aug 6, 2026
Merged

Add function to plot PF coil dimensions in summary plot#4499
clmould merged 2 commits into
mainfrom
add_pf_dimensions_diagram

Conversation

@chris-ashe

Copy link
Copy Markdown
Collaborator

This pull request introduces a new visualization for plotting the dimensions of PF (Poloidal Field) coils in the summary plotting workflow. The main change is the addition of the plot_pf_dimensions function, which visually annotates PF coil positions and dimensions on the plot, and its integration into the summary plotting routine.

New PF Coil Visualization

  • Added plot_pf_dimensions function to summary.py, which plots the PF coil locations, dimensions, and annotations (ΔR and ΔZ) on a given axis, enhancing the clarity of PF coil geometry in the plots.
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 requested a review from a team as a code owner August 4, 2026 14:43
@codecov-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 1.85185% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.15%. Comparing base (cd715d2) to head (3d10b02).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
process/core/io/plot/summary.py 1.85% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4499      +/-   ##
==========================================
- Coverage   49.30%   49.15%   -0.16%     
==========================================
  Files         151      151              
  Lines       29611    29707      +96     
==========================================
+ Hits        14599    14601       +2     
- Misses      15012    15106      +94     

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

@clmould clmould self-assigned this Aug 5, 2026

@clmould clmould left a comment

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.

I'm happy with these changes, just want a modeller to check the new figure first before I merge :)

@clmould
clmould requested review from a team and j-a-foster August 5, 2026 10:02
@mkovari

mkovari commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Looks nice. Why not add the dimensions of the CS (since it is a PF coil)?

@chris-ashe

Copy link
Copy Markdown
Collaborator Author

Looks nice. Why not add the dimensions of the CS (since it is a PF coil)?

The CS has its own page and dimension plot a few pages down in the summary. I will probably remove the CS from that plotting function and use the one that shows the full structure for all general plotting

@mkovari

mkovari commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

The OUT.DAT lists the coils as 0 to 5, not 1 to 6.

Geometry of PF coils, central solenoid and plasma:
 
Coil      R(m)    Z(m)    dR(m)    dZ(m)    turns
PF 0      5.57    9.64    1.36     1.36       506
PF 1      5.57  -10.9     1.46     1.46       587
PF 2     16.9     2.67    1.11     1.11       185
PF 3     16.9    -2.67    1.11     1.11       185
PF 4     15.4     7.47    0.769    0.769      118
PF 5     15.4    -7.47    0.769    0.769      118
CS        2.28    0       0.547   15.9       4650
Plasma    8       0       5.33     9.87         1

(To be honest I don't know why.)

@chris-ashe

Copy link
Copy Markdown
Collaborator Author

The OUT.DAT lists the coils as 0 to 5, not 1 to 6.

Geometry of PF coils, central solenoid and plasma:
 
Coil      R(m)    Z(m)    dR(m)    dZ(m)    turns
PF 0      5.57    9.64    1.36     1.36       506
PF 1      5.57  -10.9     1.46     1.46       587
PF 2     16.9     2.67    1.11     1.11       185
PF 3     16.9    -2.67    1.11     1.11       185
PF 4     15.4     7.47    0.769    0.769      118
PF 5     15.4    -7.47    0.769    0.769      118
CS        2.28    0       0.547   15.9       4650
Plasma    8       0       5.33     9.87         1

(To be honest I don't know why.)

Shall make an issue to fix this, should really index the coils from 1

@mkovari

mkovari commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Shall make an issue to fix this, should really index the coils from 1

I agree.

@j-a-foster j-a-foster left a comment

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.

Happy with changes.

@clmould

clmould commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

#4502 to fix PF coil numbering

@clmould
clmould merged commit 3ceb438 into main Aug 6, 2026
10 of 11 checks passed
@clmould
clmould deleted the add_pf_dimensions_diagram branch August 6, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants