Skip to content

[issue-262] Add metadata for plotting 2D equilibrium in the poloidal_… - #263

Open
imbeauf wants to merge 9 commits into
iterorganization:developfrom
imbeauf:feature/issue-262
Open

[issue-262] Add metadata for plotting 2D equilibrium in the poloidal_…#263
imbeauf wants to merge 9 commits into
iterorganization:developfrom
imbeauf:feature/issue-262

Conversation

@imbeauf

@imbeauf imbeauf commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

…plane_coordinates_identifier.xml


📚 Documentation preview 📚: https://imas-data-dictionary--263.org.readthedocs.build/en/263/

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

>1</int>
<int name="inverse"
description="Rhopolar_polar 2D polar coordinates (rho=dim1, theta=dim2) with magnetic axis as centre of grid; the polar angle is theta= -atan2(z-zaxis,r-raxis)." units="m,rad"
description="Rhopolar_polar 2D polar coordinates (rho=dim1, theta=dim2) with magnetic axis as centre of grid; the polar angle is theta= -atan2(z-zaxis,r-raxis)." units="m,rad" axis_labels="rho,polar_angle"

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.

Better polar_angle or theta for representation on axis? Both are used in the description.

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.

And should Rhopolar be rho_pol ?

Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml
@Simon-McIntosh

Copy link
Copy Markdown
Contributor

There is no developer guide entry for axis_labels. The units_paths/units convention has a documented code-block example in docs/dd_developer_guide.rst. axis_labels has none. At minimum, a short paragraph + example should be added alongside the units_paths documentation, including the implicit rule that axis_labels[i] corresponds to the i-th path in units_paths.

We could consider adding a axis_paths convention, but in practice it would mirror the the existing units_paths element. The one exception would be a case (not present here) where we would have a set with fixed units but different axis labels that we want to annotate.

These XML elements do not appear to be 'wired' and are thus seen as documentation only. I was not aware that we had this units_paths mechanism for untangling 'mixed' units. Although this information would only be available at runtime only (a dynamic unit). To be avoided wherever possible.

@imbeauf

imbeauf commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

There is no developer guide entry for axis_labels. The units_paths/units convention has a documented code-block example in docs/dd_developer_guide.rst. axis_labels has none. At minimum, a short paragraph + example should be added alongside the units_paths documentation, including the implicit rule that axis_labels[i] corresponds to the i-th path in units_paths.

Yes, I have updated the developer guide accordingly.

@SimonPinches SimonPinches 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.

Maybe I don't quiet understand what this metadata should contain but I think we could make it slightly more rigorous, especially for straight field-line coordinates (note the hyphenation!) where we don't seem to keep track of the type (PEST, Boozer, etc).

>1</int>
<int name="inverse"
description="Rhopolar_polar 2D polar coordinates (rho=dim1, theta=dim2) with magnetic axis as centre of grid; the polar angle is theta= -atan2(z-zaxis,r-raxis)." units="m,rad"
description="Rhopolar_polar 2D polar coordinates (rho=dim1, theta=dim2) with magnetic axis as centre of grid; the polar angle is theta= -atan2(z-zaxis,r-raxis)." units="m,rad" axis_labels="rho,polar_angle"

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.

And should Rhopolar be rho_pol ?

Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
>2</int>
<int name="inverse_psi_straight_field_line"
description="Flux surface type with psi as radial label (dim1) and the straight-field line poloidal angle (mod(index,10)=1) (dim2); could be non-equidistant; magnetic axis as centre of grid" units="Wb,rad"
description="Flux surface type with psi as radial label (dim1) and the straight-field line poloidal angle (mod(index,10)=1) (dim2); could be non-equidistant; magnetic axis as centre of grid" units="Wb,rad" axis_labels="psi,straight_field_line_angle"

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.

There are an infinite number of different types of straight field-line coordinates and thus poloidal angle deformations. Is it to be assumed that here the toroidal coordinate is the usual toroidal angle, phi, and these are therefore PEST coordinates, or...?

@imbeauf imbeauf Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For the "inverse" case: for this one, the radial coordinate is ill-defined. According to @jfartaud, CHEASE (from which this identifier list is derived) is using psi as radial coordinate for the "inverse" case, which means "inverse" is the same as the "inverse_psi_polar" case. I propose then to rename "inverse" as "inverse_psi_polar" and indicate "inverse" as an alias for backward compatibility.

For the "straight field-line coordinates", I suggest that @SimonPinches indicates the most commonly used definition, I will report it in the identifier at the relevant places.

Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
Comment thread schemas/utilities/poloidal_plane_coordinates_identifier.xml Outdated
imbeauf and others added 4 commits August 18, 2026 10:29
Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

imbeauf and others added 2 commits August 18, 2026 10:32
Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
Co-authored-by: Simon Pinches <SimonPinches@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@imbeauf

imbeauf commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Closes #262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants