Coverage for python/gsfit/plotting/two_d_plasma_grid.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-14 15:25 +0000

1import matplotlib.axes 

2import numpy as np 

3from gsfit_rs.imas import equilibrium_paths as ep 

4 

5from ..gsfit import Gsfit 

6 

7 

8def plot(gsfit_controller: Gsfit, ax: matplotlib.axes.Axes) -> None: 

9 plasma = gsfit_controller.plasma 

10 

11 # `profiles_2d/r` and `/z` are the (R, Z) mesh; flattening them row-major gives the flat grid 

12 grid_r = np.asarray(plasma.get(ep.time_slice[0].profiles_2d[0].r)).flatten() 

13 grid_z = np.asarray(plasma.get(ep.time_slice[0].profiles_2d[0].z)).flatten() 

14 

15 ax.plot(grid_r, grid_z, linestyle="", marker="o", color="black", markersize=0.75)