mindelec.vision.plot_eh

mindelec.vision.plot_eh(simu_res_tensor, path_image_save, z_index, dpi=300)[source]

Draw electric and magnetic field values of every timestep for 2D slices, and save them in path_image_save

Parameters
  • simu_res_tensor (numpy..array) – simulation result (shape (dim_t, dim_x, dim_y, dim_z, 6)).

  • path_image_save (str) – images saved path.

  • z_index (int) – show 2D image for z=z_index.

  • dpi (int) – plotting parameters. Default: 300.

Supported Platforms:

Ascend

Examples

>>> import numpy as np
>>> from mindelec.vision import plot_eh
>>> simu_res_tensor = np.random.rand(20, 10, 10, 10, 6).astype(np.float32)
>>> path_image_save = './result_eh'
>>> z_index = 5
>>> dpi = 300
>>> plot_eh(simu_res_tensor, path_image_save, z_index, dpi)