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.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

RequestInformation(request, inInfo, outInfo)[source]

Used by pipeline to handle time variance

_update_time_steps()[source]

For internal use only: appropriately sets the timesteps.

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

get_time_step_values()[source]

Use this in ParaView decorator to register 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

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

apply(table0, table1)[source]

Run the algorithm on the two input tables

Extract Array

class PVGeo.filters.tables.ExtractArray[source]

Bases: PVGeo.base.FilterBase

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

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
apply(input_data_object, array_name)[source]

Run the algorithm on the input data object, specifying the array name to extract.

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.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline

_reshape(pdi, pdo)[source]

Internal helper to perfrom the reshape

add_name(name)[source]

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

get_names()[source]

Returns a list of the names given to the new arrays

set_names(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
set_number_of_columns(ncols)[source]

Set the number of columns for the output vtkTable

set_number_of_rows(nrows)[source]

Set the number of rows for the output vtkTable

set_order(order)[source]

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

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.

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
apply(input_data_object, array_name)[source]

Run the algorithm on the input data object, specifying the array name to use for the split.