You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some operations, such as poloidal-plane plots/animations, can be annoyingly slow. This can happen even when a plot on the x-theta logical grid is fast, in which case the slow-down probably comes from the from_region() operation.
Slow down is probably due to combining coordinates (as in #220). In plotting functions, no Dataset/DataArray is returned, so most of the coordinates are not needed or used.
Responsiveness (e.g. of poloidal-plane plots/animations) might be significantly improved by:
dropping unused coordinates somewhere before the concatenation operations here
optionally change the coords and compat arguments to xr.concat() to less-safe but faster settings. A good method might be to add an argument to various functions to switch between the current settings and 'fast'/'unsafe' settings; this argument could then be passed from within plotting methods, etc.
The text was updated successfully, but these errors were encountered:
Another option could be to load the Rxy_corners and Zxy_corners from the grid file (now that hypnotoad saves them). With the corner positions, the plotting could be done without guard cells and adjacent regions would line up perfectly without the need for guard cells: avoiding guard cells would mean no need to concatenate, which should speed everything up.
There would probably be a bit of initial overhead, because we'd probably need to convert the Rxy_corners and Zxy_corners which give the 'lower left' corner position into separate arrays for all four corners of a cell (i.e. getting some values from adjacent regions just once at start-up time, and ideally without concatenating any arrays).
Implementing this suggestion would probably also have the bonus of making the plots look a bit nicer, and line up with the divertor targets better.
Some operations, such as poloidal-plane plots/animations, can be annoyingly slow. This can happen even when a plot on the x-theta logical grid is fast, in which case the slow-down probably comes from the
from_region()
operation.Slow down is probably due to combining coordinates (as in #220). In plotting functions, no Dataset/DataArray is returned, so most of the coordinates are not needed or used.
Responsiveness (e.g. of poloidal-plane plots/animations) might be significantly improved by:
xBOUT/xbout/region.py
Lines 1738 to 1745 in 12c0088
coords
andcompat
arguments toxr.concat()
to less-safe but faster settings. A good method might be to add an argument to various functions to switch between the current settings and 'fast'/'unsafe' settings; this argument could then be passed from within plotting methods, etc.The text was updated successfully, but these errors were encountered: