pyCAPS
pyCAPS: A Python Extension Module for CAPS
DataSet Class Reference

Defines a CAPS DataSet Object. More...

Inherits object.

Public Member Functions

def name (self)
 Property returns the name of the CAPS DataSet Object.
 
def history (self)
 Returns the history list of the CAPS DataSet Object.
 
def data (self)
 Executes caps_getData on data set object to retrieve data set variable. More...
 
def xyz (self)
 Executes caps_getData on data set object to retrieve XYZ coordinates of the data set. More...
 
def connectivity (self)
 Executes caps_getTriangles on data set's vertex set to retrieve the connectivity (triangles only) information for the data set. More...
 
def link (self, source, dmethod=caps.dMethod.Interpolate)
 Link this DataSet to an other CAPS DataSet Object. More...
 
def view (self, fig=None, numDataSet=1, dataSetIndex=0, **kwargs)
 Visualize data set. More...
 
def writeTecplot (self, filename=None, file=None)
 Write data set to a Tecplot compatible data file. More...
 
def writeVTK (self, filename)
 Write data set to a VTK compatible data file. More...
 

Detailed Description

Defines a CAPS DataSet Object.

Created via VertexSet.dataSet.create().

Parameters
DataSet.attrAttrSequence of ValueIn attributes

Member Function Documentation

◆ connectivity()

def connectivity (   self)

Executes caps_getTriangles on data set's vertex set to retrieve the connectivity (triangles only) information for the data set.

Returns
Optionally returns a list of lists of connectivity values (e.g. [ [node1, node2, node3], [node2, node3, node7], etc. ] ) and a list of lists of data connectivity (not this is an empty list if the data is node-based) (eg. [ [node1, node2, node3], [node2, node3, node7], etc. ]

◆ data()

def data (   self)

Executes caps_getData on data set object to retrieve data set variable.

Returns
Optionally returns a list of data values. Data with a rank greater than 1 returns a list of lists (e.g. data representing a displacement would return [ [Node1_xDisplacement, Node1_yDisplacement, Node1_zDisplacement], [Node2_xDisplacement, Node2_yDisplacement, Node2_zDisplacement], etc. ]

◆ link()

def link (   self,
  source,
  dmethod = caps.dMethod.Interpolate 
)

Link this DataSet to an other CAPS DataSet Object.

Parameters
sourceThe source DataSEt Object
dmethodTransfter method: dMethod.Interpolate or "Interpolate", tMethod.Conserve or "Conserve"

◆ view()

def view (   self,
  fig = None,
  numDataSet = 1,
  dataSetIndex = 0,
**  kwargs 
)

Visualize data set.

The function currently relies on matplotlib to plot the data.

Parameters
figFigure object (matplotlib::figure) to append image to.
numDataSetNumber of data sets in $fig.
dataSetIndexIndex of data set being added to $fig.
**kwargsSee below.

Valid keywords:

Parameters
filenameSave image(s) to file specified (default - None).
colorMapValid string for a, matplotlib::cm, colormap (default - 'Blues').
showImageShow image(s) (default - True).
titleSet a custom title on the plot (default - VertexSet= 'name', DataSet = 'name', (Var. '#') ).

◆ writeTecplot()

def writeTecplot (   self,
  filename = None,
  file = None 
)

Write data set to a Tecplot compatible data file.

A triagulation of the data set will be used for the connectivity.

Parameters
fileOptional open file object to append data to. If not provided a filename must be given via the keyword arguement $filename.
filenameWrite Tecplot file with the specified name.

◆ writeVTK()

def writeVTK (   self,
  filename 
)

Write data set to a VTK compatible data file.

A triagulation of the data set will be used for the connectivity.

Parameters
filenameWrite VTK file with the specified name.

◆ xyz()

def xyz (   self)

Executes caps_getData on data set object to retrieve XYZ coordinates of the data set.

Returns
Optionally returns a list of lists of x,y, z values (e.g. [ [x2, y2, z2], [x2, y2, z2], [x3, y3, z3], etc. ] )

The documentation for this class was generated from the following file: