Table Operations

Append Table to Cell Data

class PVGeo.filters.tables.AppendTableToCellData[source]

Bases: PVGeo.base.FilterPreserveTypeBase

Takes two inputs, a dataset to preserve and a table of data, where the data in the table is appended to the CellData of the input dataset. The 0th port is the dataset to preserve and the 1st port is a table whos rows will be appended as CellData to the 0th port. The number of rows in the table MUST match the number of cells in the input dataset.

Apply(dataset, table)[source]

Update the algorithm and get the output data object

Parameters:
  • dataset (vtkDataSet) – Any dataset with CellData
  • table (vtkTable) – table of data values that will be appended to dataset’s CellData
Returns:

The appended dataset as a new object

Return type:

vtkDataSet

GetTimestepValues()[source]

Use this in ParaView decorator to register timesteps.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

RequestInformation(request, inInfo, outInfo)[source]

Overwritten by subclass to provide meta-data to downstream pipeline.

_UpdateTimeSteps()[source]

For internal use only: appropriately sets the timesteps.

Combine Tables

class PVGeo.filters.tables.CombineTables[source]

Bases: PVGeo.base.FilterBase

Takes two tables and combines them if they have the same number of rows. Currently this cannot handle time varing tables as that gets complicated real quick if the tables do not have the same timestep values

Apply(table0, table1)[source]

Update the algorithm and get the output data object

FillInputPortInformation(port, info)[source]

Used by pipeline. Necessary when dealing with multiple input ports

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

Extract Array

class PVGeo.filters.tables.ExtractArray[source]

Bases: PVGeo.base.FilterBase

Extract an array from a vtkDataSet and make a vtkTable of it.

Apply(inputDataObject, arrayName)[source]

Update the algorithm and get the output data object

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

SetInputArrayToProcess(idx, port, connection, field, name)[source]

Used to set the input array(s)

Parameters:
  • idx (int) – the index of the array to process
  • port (int) – input port (use 0 if unsure)
  • connection (int) – the connection on the port (use 0 if unsure)
  • field (int) – the array field (0 for points, 1 for cells, 2 for field, and 6 for row)
  • name (int) – the name of the array

Reshape Table

class PVGeo.filters.tables.ReshapeTable(**kwargs)[source]

Bases: PVGeo.base.FilterBase

This filter will take a vtkTable object and reshape it. This filter essentially treats vtkTable``s as 2D matrices and reshapes them using ``numpy.reshape in a C contiguous manner. Unfortunately, data fields will be renamed arbitrarily because VTK data arrays require a name.

AddName(name)[source]

Use to append a name to the list of data array names for the output table.

GetNames()[source]
RequestData(request, inInfo, outInfo)[source]

Used by pipeline

SetNames(names)[source]

Set names using a semicolon (;) seperated string or a list of strings

Parameters:names (string) – a string of data array names for the reshaped table using a semicolon (;) to spearate
SetNumberOfColumns(ncols)[source]

Set the number of columns for the output vtkTable

SetNumberOfRows(nrows)[source]

Set the number of rows for the output vtkTable

SetOrder(order)[source]

Set the reshape order ('C' of 'F')

_Reshape(pdi, pdo)[source]

Internal helper to perfrom the reshape

Split Table On Array

class PVGeo.filters.tables.SplitTableOnArray[source]

Bases: PVGeo.base.FilterBase

A filter to seperate table data based on the unique values of a given data array into a vtkMultiBlockDataSet.

Apply(inputDataObject, arrayName)[source]

Update the algorithm and get the output data object

RequestData(request, inInfo, outInfo)[source]

Overwritten by subclass to execute the algorithm.

SetInputArrayToProcess(idx, port, connection, field, name)[source]

Used to set the input array(s)

Parameters:
  • idx (int) – the index of the array to process
  • port (int) – input port (use 0 if unsure)
  • connection (int) – the connection on the port (use 0 if unsure)
  • field (int) – the array field (0 for points, 1 for cells, 2 for field, and 6 for row)
  • name (int) – the name of the array