[issue-262] Add metadata for plotting 2D equilibrium in the poloidal_…#263
[issue-262] Add metadata for plotting 2D equilibrium in the poloidal_…#263imbeauf wants to merge 1 commit into
Conversation
…plane_coordinates_identifier.xml
| >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" |
There was a problem hiding this comment.
Better polar_angle or theta for representation on axis? Both are used in the description.
There was a problem hiding this comment.
And should Rhopolar be rho_pol ?
|
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. |
Yes, I have updated the developer guide accordingly. |
SimonPinches
left a comment
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
And should Rhopolar be rho_pol ?
|
|
||
| <int name="rectangular" | ||
| description="Cylindrical R,Z ala eqdsk (R=dim1, Z=dim2). In this case the position arrays should not be filled since they are redundant with grid/dim1 and dim2." units="m,m" | ||
| description="Cylindrical R,Z ala eqdsk (R=dim1, Z=dim2). In this case the position arrays should not be filled since they are redundant with grid/dim1 and dim2." units="m,m" axis_labels="R,Z" |
There was a problem hiding this comment.
I'm not sure referencing eqsk to define these coordinates helps.
| description="Cylindrical R,Z ala eqdsk (R=dim1, Z=dim2). In this case the position arrays should not be filled since they are redundant with grid/dim1 and dim2." units="m,m" axis_labels="R,Z" | |
| description="R (major radius), Z (height) (R=dim1, Z=dim2). In this case the position arrays should not be filled since they are redundant with grid/dim1 and grid/dim2." units="m,m" axis_labels="R,Z" |
| >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" |
There was a problem hiding this comment.
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...?
| >13</int> | ||
| <int name="inverse_psi_straight_field_line_fourier" | ||
| description="Flux surface type with psi as radial label (dim1) and Fourier modes in the straight-field line poloidal angle (mod(index,10)=4) (dim2), could be non-equidistant; magnetic axis as centre of grid" units="Wb,1" | ||
| description="Flux surface type with psi as radial label (dim1) and Fourier modes in the straight-field line poloidal angle (mod(index,10)=4) (dim2), could be non-equidistant; magnetic axis as centre of grid" units="Wb,1" axis_labels="psi,straight_field_line_fourier" |
There was a problem hiding this comment.
Fourier modes of which poloidal angle? Equal arc, polar, Boozer, PEST, Hamada...?
| description="Flux surface type with psi as radial label (dim1) and Fourier modes in the straight-field line poloidal angle (mod(index,10)=4) (dim2), could be non-equidistant; magnetic axis as centre of grid" units="Wb,1" axis_labels="psi,straight_field_line_fourier" | |
| description="Flux surface type with psi as radial label (dim1) and Fourier modes in the straight field-line poloidal angle (mod(index,10)=4) (dim2), could be non-equidistant; magnetic axis as centre of grid" units="Wb,1" axis_labels="psi,straight_field_line_fourier" |
| description="Flux surface type with psi as radial label (dim1) and Fourier modes in the polar poloidal angle (mod(index,10)=6) (dim2); could be non-equidistant" units="Wb,1" axis_labels="psi,equal_arc_fourier" | ||
| >16</int> | ||
| <int name="inverse_rhopolnorm_straight_field_line" | ||
| description="Flux surface type with radial label sqrt[(psi-psi_axis)/(psi_edge-psi_axis)] (dim1) and the straight-field line poloidal angle (dim2)" units="1,rad" |
There was a problem hiding this comment.
Again, are we assuming straight field-lines when using the usual toroidal angle phi, i.e. PEST coordinates?
| description="Flux surface type with radial label sqrt[(psi-psi_axis)/(psi_edge-psi_axis)] (dim1) and the straight-field line poloidal angle (dim2)" units="1,rad" | |
| description="Flux surface type with radial label sqrt[(psi-psi_axis)/(psi_edge-psi_axis)] (dim1) and the straight field-line poloidal angle (dim2)" units="1,rad" |
| >33</int> | ||
| axis_labels="rho_tor_norm,polar_angle">33</int> | ||
| <int name="inverse_rhotornorm_straight_field_line_fourier" | ||
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and Fourier modes in the straight-field line poloidal angle (dim2)" units="1,1" |
There was a problem hiding this comment.
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and Fourier modes in the straight-field line poloidal angle (dim2)" units="1,1" | |
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and Fourier modes in the straight field-line poloidal angle (dim2)" units="1,1" |
|
|
||
| <int name="inverse_rhotor_straight_field_line_fourier" | ||
| description="Flux surface type with radial label sqrt[Phi/pi/B0] (dim1), Phi being toroidal flux, and Fourier modes in the straight-field line poloidal angle (dim2)" units="m,1" | ||
| description="Flux surface type with radial label sqrt[Phi/pi/B0] (dim1), Phi being toroidal flux, and Fourier modes in the straight-field line poloidal angle (dim2)" units="m,1" axis_labels="rho_tor,straight_field_line_fourier" |
There was a problem hiding this comment.
| description="Flux surface type with radial label sqrt[Phi/pi/B0] (dim1), Phi being toroidal flux, and Fourier modes in the straight-field line poloidal angle (dim2)" units="m,1" axis_labels="rho_tor,straight_field_line_fourier" | |
| description="Flux surface type with radial label sqrt[Phi/pi/B0] (dim1), Phi being toroidal flux, and Fourier modes in the straight field-line poloidal angle (dim2)" units="m,1" axis_labels="rho_tor,straight_field_line_fourier" |
| units="1,1" >26</int> | ||
| units="1,1" axis_labels="rho_pol_norm,polar_fourier">26</int> | ||
| <int name="inverse_rhotornorm_straight_field_line" | ||
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and the straight-field line poloidal angle (dim2)" units="1,rad" |
There was a problem hiding this comment.
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and the straight-field line poloidal angle (dim2)" units="1,rad" | |
| description="Flux surface type with radial label sqrt[Phi/Phi_edge] (dim1) and the straight field-line poloidal angle (dim2)" units="1,rad" |
|
|
||
| <int name="inverse_rhopol_straight_field_line_fourier" | ||
| description="Flux surface type with radial label sqrt[psi-psi_axis] (dim1) and Fourier modes in the straight-field line poloidal angle (dim2)" units="Wb^-0.5,1" | ||
| description="Flux surface type with radial label sqrt[psi-psi_axis] (dim1) and Fourier modes in the straight-field line poloidal angle (dim2)" units="Wb^-0.5,1" axis_labels="rho_pol,straight_field_line_fourier" |
There was a problem hiding this comment.
| description="Flux surface type with radial label sqrt[psi-psi_axis] (dim1) and Fourier modes in the straight-field line poloidal angle (dim2)" units="Wb^-0.5,1" axis_labels="rho_pol,straight_field_line_fourier" | |
| description="Flux surface type with radial label sqrt[psi-psi_axis] (dim1) and Fourier modes in the straight field-line poloidal angle (dim2)" units="Wb^-0.5,1" axis_labels="rho_pol,straight_field_line_fourier" |
…plane_coordinates_identifier.xml
📚 Documentation preview 📚: https://imas-data-dictionary--263.org.readthedocs.build/en/263/