-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some plot issues when NFP differs from one for objects, or when p…
…assed-in phi exceeds 2pi/nfp (#1204) - in `plot_surfaces` (and `plot_section` and `plot_boundary`) when `phi` is supplied which exceeds `NFP`, the grid used for the map coordinates (a lineargrid with `NFP=eq.NFP` would truncate the `phi`. This is fine unless the new truncated phi has some duplicates. The grid is still a meshgrid of the supplied rho, theta, zeta, however, then the `grid.num_zeta` value, which gives the unique zeta values, might not correspond to the original length of `phi`. This causes reshaping errors like those seen in #1202. These grids though dont need to have the NFP arg at all as they always supply `phi` as an array (instead of supplying `N`), so we can set them to `1` to avoid this issie - in `plot_comparison` and `plot_boundaries`, there is some ambiguity on what should happen by default when things of differing NFP are passed in. This changes to by default, throw an error if multiple nonaxisymmetric objects with difering NFP are passed in (as it is not clear what phis to do, and even then the plot title "phi*NFP/2pi" is ambiguous (which NFP does it refer to?)). If there are differing NFPs but the only ones with nonzero NFPs have the same NFP, and the remaining are axisymmetric objects, it will change the axisymmetric object NFP to match the nonaxisymetric ones (we can do that and it does not affect the plot since they are the same at every zeta). The change in `plot_boundaries` behavior is something I am not 100% sure on, what do people think it should be? we could leave as is and just plot a bunch of XS, maybe with the phi being determined inside of the for loop instead of outside, so that if the default is used you get (0,2np.pi,4,endpoint=False). The only weird thing is now you have a bunch of XS where they are at differing angles and it is not clear how they should be compared to eachother. Resolves #1202
- Loading branch information
Showing
3 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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