|
pyCAPS
pyCAPS: A Python Extension Module for CAPS
|
Functions to interact with a CAPS bound object. More...
Public Member Functions | |
| def | getBoundInfo (self, printInfo=True, kwargs) |
| Gets bound information for the bound object. More... | |
| def | fillVertexSets (self) |
| Populates VertexSets for the bound. More... | |
| def | executeTransfer (self, variableName=None) |
| Execute data transfer for the bound. More... | |
| def | viewData (self, variableName=None, kwargs) |
| Visualize data in the bound. More... | |
| def | writeTecplot (self, filename, variableName=None) |
| Write a Tecplot compatiable file for the data in the bound. More... | |
| def | createTree (self, filename="boundName", kwargs) |
| Create a HTML dendrogram/tree of the current state of the bound. More... | |
Public Attributes | |
| boundName | |
| Bound/transfer name used to set up the data bound. More... | |
| capsProblem | |
| Reference to the problem object (pyCAPS.capsProblem) the bound belongs to. More... | |
| variables | |
| List of variables in the bound. More... | |
| vertexSet | |
| Dictionary of vertex set object (pyCAPS._capsVertexSet) in the bound. More... | |
| dataSetSrc | |
| Dictionary of "source" data set objects (pyCAPS._capsDataSet) in the bound. More... | |
| dataSetDest | |
| Dictionary of "destination" data set objects (pyCAPS._capsDataSet) in the bound. More... | |
Functions to interact with a CAPS bound object.
Should be created with capsProblem.createDataBound or capsProblem.createDataTransfer (not a standalone class).
| def createTree | ( | self, | |
filename = "boundName", |
|||
| kwargs | |||
| ) |
Create a HTML dendrogram/tree of the current state of the bound.
The HTML file relies on the open-source JavaScript library, D3, to visualize the data. This library is freely available from https://d3js.org/ and is dynamically loaded within the HTML file. If running on a machine without internet access a (miniaturized) copy of the library may be written to a file alongside the generated HTML file by setting the internetAccess keyword to False. If set to True, internet access will be necessary to view the tree.
| filename | Filename to use when saving the tree (default - "boundName"). Note an ".html" is automatically appended to the name (same with ".json" if embedJSON = False). |
| **kwargs | See below. |
Valid keywords:
| embedJSON | Embed the JSON tree data in the HTML file itself (default - True). If set to False a seperate file is generated for the JSON tree data. |
| internetAccess | Is internet access available (default True)? If set to True internet access will be necessary to view the tree. |
| def executeTransfer | ( | self, | |
variableName = None |
|||
| ) |
Execute data transfer for the bound.
| variableName | Name of variable to implement the data transfer for. If no name is provided the first variable in bound is used. |
| def fillVertexSets | ( | self | ) |
Populates VertexSets for the bound.
Must be called to finalize the bound after all mesh generation aim's have been executed
| def getBoundInfo | ( | self, | |
printInfo = True, |
|||
| kwargs | |||
| ) |
Gets bound information for the bound object.
| printInfo | Print information to sceen if True. |
| **kwargs | See below. |
Valid keywords:
| infoDict | Return a dictionary containing bound information instead of just the state (default - False) |
| def viewData | ( | self, | |
variableName = None, |
|||
| kwargs | |||
| ) |
Visualize data in the bound.
The function currently relies on matplotlib or the capViewer class (webviewer) to plot the data.
| variableName | Name of variable to visualize. If no name is provided the first variable in the bound is used. |
| **kwargs | See below. |
Valid keywords:
| viewerType | What viewer should be used (default - capsViewer). Options: capsViewer or matplotlib (options are case insensitive). Important: if $filename isn't set to None, the default to changed to matplotlib. |
| portNumber | Port number to start the server listening on (default - 7681). |
| filename | Save image(s) to file specified (default - None). Not available when using the webviewer |
| colorMap | Valid string for a, matplotlib::cm, colormap (default - 'Blues'). Not as options are available when using the webviewer (see capsViewer for additional details). |
| showImage | Show image(s) (default - True). |
| def writeTecplot | ( | self, | |
| filename, | |||
variableName = None |
|||
| ) |
Write a Tecplot compatiable file for the data in the bound.
| filename | Name of file to save data to. |
| variableName | Single or list of variables to write data for. If no name is provided all variables in the bound are used. |
| boundName |
Bound/transfer name used to set up the data bound.
Reference to the problem object (pyCAPS.capsProblem) the bound belongs to.
| dataSetDest |
Dictionary of "destination" data set objects (pyCAPS._capsDataSet) in the bound.
| dataSetSrc |
Dictionary of "source" data set objects (pyCAPS._capsDataSet) in the bound.
| variables |
List of variables in the bound.
| vertexSet |
Dictionary of vertex set object (pyCAPS._capsVertexSet) in the bound.
1.8.13