mindelec.vision.vtk_structure

mindelec.vision.vtk_structure(grid_tensor, eh_tensor, path_res)[source]

Generates 3D vtk file for visualizaiton.

Parameters
  • grid_tensor (numpy.ndarray) – grid data (shape: (dim_t, dim_x, dim_y, dim_z, 4)).

  • eh_tensor (numpy.ndarray) – electric and magnetic data (np.array, shape: (dim_t, dim_x, dim_y, dim_z, 6)).

  • path_res (str) – save path for the output vtk file.

Supported Platforms:

Ascend

Examples

>>> import numpy as np
>>> from mindelec.vision import vtk_structure
>>> grid_tensor = np.random.rand(20, 10, 10, 10, 4).astype(np.float32)
>>> eh_tensor = np.random.rand(20, 10, 10, 10, 6).astype(np.float32)
>>> path_res = './result_vtk'
>>> vtk_structure(grid_tensor, eh_tensor, path_res)