pyCAPS
pyCAPS: A Python Extension Module for CAPS
Loading...
Searching...
No Matches
DataSet Class Reference

Defines a CAPS DataSet Object. More...

Inherits object.

Public Member Functions

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

Detailed Description

Defines a CAPS DataSet Object.

Created via VertexSet.dataSet.create().

Parameters
DataSet.attrAttrSequence of ValueIn attributes

Member Function Documentation

◆ connectivity()

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()

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()

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()

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 DataSet.view$fig.
dataSetIndexIndex of data set being added to DataSet.view$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()

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 DataSet.writeTecplot$filename.
filenameWrite Tecplot file with the specified name.

◆ writeVTK()

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()

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: