DEMutilities.postprocessing.representation. export_vtk

In order to be able to use this module import it like this:

import DEMutilities.postprocessing.representation.export_vtk
#or assign it to a shorter name
import DEMutilities.postprocessing.representation.export_vtk as exp
DEMutilities.postprocessing.representation.export_vtk._smooth(data, sigma)
DEMutilities.postprocessing.representation.export_vtk.heatmap3D(basename, *args, **kwargs)

Saves three-dimensional grid-like data into a rectilinear vtk grid (.vtr file) that can be viewed in Paraview.

  • basename – Base name of file name to save. Saved file will be called basename``+.vtr``
  • *args – Data entries that will be saved. These can be one or multiple hdf5 entries. However, they MUST share the same axes. Each entry will be visible as a ‘field’ in the .vtr data file.
  • **kwargs – See below:
Keyword Arguments:
  • dsx – Optional x-axis to be used. If not provided. the first data entry’s axis_0 field will be used.
  • dsy – Optional y-axis to be used. If not provided. the first data entry’s axis_1 field will be used.
  • dsz – Optional z-axis to be used. If not provided. the first data entry’s axis_2 field will be used.
  • point_or_cell – If point, the field data will be point data, if cell, the field data will be cell data and the axes will be rescaled to N+1 length under the assumption that the field data is the evaluation at the bin midpoints.
  • normalize_axes – If True,the x, y and z axes will be rescaled so they are between zero and one (a cube)
  • smooth – If specified (either single value or tuple of values per axis),
    will apply Gaussian smooth filter with this standard deviation to the point or cell data
  • All other key word arguments are passed to GridToVTK() in module pyevtk.hl.