pyCAPS
pyCAPS: A Python Extension Module for CAPS
Public Member Functions | Public Attributes | List of all members
_capsDataSet Class Reference

Functions to interact with a CAPS dataSet object. More...

Public Member Functions

def getData (self)
 Executes caps_getData on data set object to retrieve data set variable, dataSetName. More...
 
def getDataXYZ (self)
 Executes caps_getData on data set object to retrieve XYZ coordinates of the data set. More...
 
def getDataConnect (self)
 Executes caps_triangulate on data set's vertex set to retrieve the connectivity (triangles only) information for the data set. More...
 
def viewData (self, fig=None, numDataSet=1, dataSetIndex=0, kwargs)
 Visualize data set. More...
 
def writeTecplot (self, file=None, filename=None)
 Write data set to a Tecplot compatible data file. More...
 

Public Attributes

 dataSetName
 Data set name (variable name). More...
 
 capsBound
 Reference to the bound object (pyCAPS._capsBound) that data set pertains to. More...
 
 capsVertexSet
 Reference to the vertex set object (pyCAPS._capsVertexSet) that data set pertains to. More...
 
 dataSetMethod
 Data method: Analysis, Interpolate, Conserve. More...
 
 dataRank
 Rank of data set. More...
 

Detailed Description

Functions to interact with a CAPS dataSet object.

Should be initiated within pyCAPS._capsBound (not a standalone class)

Member Function Documentation

◆ getData()

def getData (   self)

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

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. ]

◆ getDataConnect()

def getDataConnect (   self)

Executes caps_triangulate 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. ]

◆ getDataXYZ()

def getDataXYZ (   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. ] )

◆ viewData()

def viewData (   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).

◆ writeTecplot()

def writeTecplot (   self,
  file = None,
  filename = 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.

Member Data Documentation

◆ capsBound

capsBound

Reference to the bound object (pyCAPS._capsBound) that data set pertains to.

◆ capsVertexSet

capsVertexSet

Reference to the vertex set object (pyCAPS._capsVertexSet) that data set pertains to.

◆ dataRank

dataRank

Rank of data set.

◆ dataSetMethod

dataSetMethod

Data method: Analysis, Interpolate, Conserve.

◆ dataSetName

dataSetName

Data set name (variable name).


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