Home

VisIt Python Interface Manual

image

Contents

1. Synopsis MeshAttributes gt MeshAttributes object Returns The MeshAttributes function returns a MeshAttributes object Object definition Field Type Default value legendFlag int 1 lineStyle int 0 lineWidth int 0 meshColor tuple of int 0 0 0 255 outlineOnlyFlag int 0 errorTolerance float 0 01 opaqueMode int Auto Possible values Auto On Off pointSize float 0 05 opaqueColor tuple of int 255 255 255 255 backgroundFlag int 1 foregroundFlag int 1 smoothingLevel int None Possible values None Fast High pointSize VarEnabled int 0 pointSize Var string default pointType int Box Possible values Box Axis Icosahedron Point showInternal int 0 Description The MeshAttributes function is used to create MeshAttributes objects that can be fed to the SetPlo tOptions function in order to set the attributes for Mesh plots 230 VisIt Python Interface Manual PseudocolorAttributes PseudocolorAttributes PseudocolorAttributes function and object Synopsis PseudocolorAttributes gt PseudocolorAttributes object Returns The PseudocolorAttributes function returns a PseudocolorAttributes object Object definition Field Type Default value legendFlag int 1 lightingFlag int 1 minFlag int 0 maxFlag int 0 centering int Natural Possible values Natural Nodal Zonal scaling int Linear Possible values Linear Log
2. The AddPlot caused a database correlation to be created DrawPlots wi GetWindowInformation print Active time slider wi timeSliders wi activeTimeSlider This will set time for both databases since the database correlation is the active time slider SetTimeSliderState 5 VisIt Python Interface Manual 159 SetGlobalLineoutAttributes SetGlobalLineoutAttributes Sets global lineout attributes that are used for all lineouts Synopsis SetGlobalLineoutAttributes atts gt integer Arguments atts A GlobalLineoutAttributes object that contains the new settings Returns The SetGlobalLineoutAttributes function returns 1 on success and O on failure Description The SetGlobalLineoutAttributes function allows you to set global lineout options that are used in the creation of all lineouts You can for example specify the destination window and the number of sample points for lineouts Example visit cli SetWindowLayout 4 OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots gla GetGlobalLineoutAttributes gla createWindow 0 gla windowId 4 gla samplingOn 1 gla numSamples 150 SetGlobalLineoutAttributes gla Lineout 5 8 3 5 8 160 VisIt Python Interface Manual SetInteractorAttributes SetInteractorAttributes Sets Vislt s interactor attributes Synopsis SetInteractorAttributes
3. material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 SetTimeSliderState 10 DeleteA11Plots DeleteDatabaseCorrelation common CloseDatabase dbs 0 CloseDatabase dbs 1 60 VisIt Python Interface Manual DeleteExpression DeleteExpression Deletes an expression variable from the expression list Synopsis Deletel Arguments Expression variableName variableName The name of the expression variable to be deleted Returns The DeleteExpression function returns 1 on success and 0 on failure Description The DeleteExpression function deletes the definition of an expression The variableName argu ment is a expressio Example string containing the name of the variable expression to be deleted Any plot that uses an n that has been deleted will fail to regenerate if its attributes are changed visit cli OpenDatabase usr gapps visit data globe silo DefineScalarExpression myvar sin u cos w AddPlot Pseudocolor myvar Plot the expression variable DrawPlots DeleteExpression myvar Delete the expression variable myvar VisIt Python Interface Manual 61 DeletePlotDatabaseKeyframe DeletePlotDatabaseKeyframe Deletes a database keyframe for a plot Synopsis DeletePlotDatabaseKeyframe plotIndex frame Arguments plotIndex A zero based integer value corresponding to a plot
4. whenToCreate An integer that tells VisIt when to automatically create database correlations Returns SetDatabaseCorrelationOptions returns 1 on success and 0 on failure Description VisIt provides functions to explicitly create and alter database correlations but there are also a number of occasions where VisIt can automatically create a database correlation The SetData baseCorrelationOptions function allows you to tell VisIt the default correlation method to use when automatically creating a new database correlation and it also allows you to tell VisIt when database correlations can be automatically created method Description 0 IndexForIndexCorrelation 1 StretchedIndexCorrelation 2 TimeCorrelation 3 CycleCorrelation whenToCreate Description 0 Always create database cor relation 1 Never create database corre lation 2 Create database correlation only if the new time varying database has the same length as another time varying data base already being used in a plot Example 158 VisIt Python Interface Manual SetDatabaseCorrelationOptions visit cli OpenDatabase usr gapps visit data dbA00 pdb AddPlot FilledBoundary material mesh DrawPlots Always create a stretched index correlation SetDatabaseCorrelationOptions 1 0 OpenDatabase usr gapps visit data dbB00 pdb AddPlot FilledBoundary material mesh
5. Pseudocolor myvar DrawPlots Plot a vector expression variable DefineVectorExpression myvec u v w AddPlot Vector myvec DrawPlots VisIt Python Interface Manual 57 DelconifyAllWindows DeIconifyA11Windows Unhides all of the hidden visualization windows Synopsis Del Returns conifyAllWindows The DelconifyAllWindows function does not return a value Description The DelconifyAllWindows function unhides all of the hidden visualization windows This func tion is usually called after Iconify Al Windows as a way of making all of the hidden visualization windows visible Example visit cli SetWindowLayout 4 Have 4 windows IconifyAllWindows DeIconifyAllWindows 38 VisIt Python Interface Manual Delete DeleteP lot s Deletes plots from the active window s plot list Synopsis DeleteActivePlots gt integer DeleteAllPlots gt integer Returns The Delete functions return an integer value of 1 for success and 0 for failure Description The Delete functions delete plots from the active window s plot list The Delete ActivePlots func tion deletes all of the active plots from the plot list There is no way to retrieve a plot once it has been deleted from the plot list The active plots are set using the SetActivePlots function The DeleteAllPlots function deletes all plots from the active window s
6. SetRenderingAttributes SetRenderingAttributes Sets global rendering attributes that control the look and feel of the plots Synopsis SetRenderingAttributes atts gt integer Arguments atts A RenderingAttributes object that contains the rendering attributes that we want to make VisIt use Returns The SetRenderingAttributes function returns 1 on success and 0 on failure Description The SetRenderingAttributes makes VisIt use the rendering attributes stored in the specified Ren deringAttributes object The RenderingAttributes object stores rendering attributes such as scal able rendering options shadows specular highlights display lists etc Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Surface hgslice DrawPlots GetView2D viewNormal 0 215934 0 454611 0 864119 viewUp 0 973938 0 163188 0 157523 imageZoom 1 64765 SetView3D v v v v v light GetLight 0 light direction 0 1 1 SetLight 0 light r GetRenderingAttributes print r r scalableActivationMode r Always r doShadowing 1 SetRenderingAttributes r 174 VisIt Python Interface Manual SetSave WindowAttributes SetSaveWindowAttributes Set the attributes used to save windows Synopsis SetSaveWindowAttributes atts Arguments atts A SaveWindowAttributes object Returns The SetSaveWindowAttributes object does not return a value
7. The CylinderAttributes function returns a CylinderAttributes object Object definition Field Type Default value pointl tuple of 0 0 0 0 0 0 float point2 tuple of 1 0 0 0 0 0 float radius float 1 0 Description The CylinderAttributes function is used to create CylinderAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Cylinder operators VisIt Python Interface Manual 247 DisplaceAttributes DisplaceAttributes DisplaceAttributes function and object Synopsis DisplaceAttributes gt DisplaceAttributes object Returns The DisplaceAttributes function returns a DisplaceAttributes object Object definition Field Type Default value factor float 1 0 variable string DISPL Description The DisplaceAttributes function is used to create DisplaceAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Displace operators 248 VisIt Python Interface Manual IndexSelectAttributes IndexSelectAttributes lIndexSelectAttributes function and object Synopsis IndexSelectAttributes gt IndexSelectAttributes object Returns The IndexSelectAttributes function returns an IndexSelectAttributes object Object definition Field Type Default value dim int 1 domainIndex int 0 groupIndex int 0 whichData int 0 xIncr int 1 xMax int 1
8. The EnableTool function returns 1 on success and 0 on failure Description The EnableTool function is used to set the enabled state of an interactive tool in the active visual ization window The toolIndex argument is an integer index that corresponds to a certain tool The activeFlag argument is an integer value 0 or 1 that indicates whether to turn the tool on or off Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots EnableToo1 0 1 Turn on the line tool EnableTool1 1 1 Turn on the plane tool EnableTool1l 2 1 Turn on the sphere tool EnableTool1l 2 0 Turn off the sphere tool 70 VisIt Python Interface Manual EvalCubic EvalCubic Interpolates between four values using a cubic polynomial Synopsis Arguments t co el c2 E3 Returns EvalCubic t c0 cl c2 c3 gt t A floating point number in the range 0 1 that represents the distance from c0 to c3 The first control point f 0 c0 Any object that can be used in an arithmetic expression can be passed for cO The second control point Any object that can be used in an arithmetic expression can be passed for cl The third control point Any object that can be used in an arithmetic expression can be passed for c2 The last control point f 1 c3 Any object that can be used in an arithmetic expression can be passed for c3 T
9. Sets a database keyframe for a specific plot Synopsis SetPlotDatabaseState index frame state Arguments index A zero based integer index that is the plot s location in the plot list frame A zero baed integer index representing the animation frame for which we re going to add a database keyframe state A zero based integer index representating the database time state that we re going to use at the specified animation frame Returns The SetPlotDatabaseState function does not return a value Description The SetPlotDatabaseState function is used when VisIt is in keyframing mode to add a database keyframe for a specific plot VisIt uses database keyframes to determine which database state is to be used for a given animation frame Database keyframes can be used to stop database time while animation time continues forward and they can also be used to make database time go in reverse etc Example visit cli OpenDatabase usr gapps visit data wave visit k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFramesWasUserSet 1 nFrames 1 SetKeyframeAttributes k AddPlot Pseudocolor pressure AddPlot Mesh quadmesh DrawPlots Make database time for the Pseudocolor plot go in reverse SetPlotDatabaseState 0 0 70 SetPlotDatabaseState 0 nFrames 1 0 Animate through the animation frames since the Keyframe animation time sli
10. The GetMaterialAttributes function returns a MaterialAttributes object that contains VisIt s current material interface reconstruction settings You can set properties on the MaterialAttributes object and then pass it to SetMaterialAttributes to make VisIt use the new material attributes that you ve specified Example visit cli OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar p PseudocolorAttributes p min p minFlag 4 0 1 p max p maxFlag 13 0 1 SetPlotOptions p DrawPlots Tell VisIt to always do material interface reconstruction m GetMaterialAttributes m forceMIR 1 SetMaterialAttributes m ClearWindow Redraw the plot forcing VisIt to use the mixed variable information DrawPlots 92 VisIt Python Interface Manual GetMaterials GetMaterials Returns a string tuple of material names for the current plot s database Synopsis GetMaterials gt tuple of strings Returns The GetMaterials function returns a tuple of strings Description The GetMaterials function returns a tuple of strings containing the names of the available materials for the current plot s database Note that the active plot s database must have materials for this function to return a tuple that has any string objects in it Also you must have at least one plot You can use the materials returned by the GetMaterials function for a varie
11. The GetSaveWindowAttributes function returns a SaveWindowAttributes object that is a structure containing several fields which determine how windows are saved to files The object that us returned can be modified and used to set the save window attributes Example visit cli s GetSaveWindowAttributes print s s width 600 s height 600 s format s FILEFORMAT_RGB print s VisIt Python Interface Manual 101 GetTimeSliders Get TimeS1liders Returns a tuple containing the names of all of the available time Synopsis Returns sliders GetTimeSliders gt tuple of strings GetTimeSliders returns a tuple of strings Description The GetTimeSliders function returns a tuple of strings containing the names of each of the avail able time sliders The list of time sliders contains the names of any open time varying database all database correlations and the keyframing time slider if VisIt is in keyframing mode Example visit cli path usr gapps visit data dbs path dbA00 pdb path dbB00 pdb path dbC00 pdb for db in dbs OpenDatabase db AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 print The list of time sliders is GetTimeSliders 102 VisIt Python Interface Manual GetView Get View Return an object containing the current view
12. Z ZonePick 126 272
13. cli Run with the Command Line Interface gui Run with the Graphical User Interface default movie Run with the Command Line Interface in movie making mode where there is no window You must also provide the sessionfile or s argu ments when movie is specified Program description convert makemili Run the VisIt database conversion tool which can read in a data file in one of VisIt s supported formats and write it back out in another sup ported VisIt database format that supports writing new files through VisIt s plugin interface The convert tool is currently used primarily as a tool to convert non Silo files into Silo files Run the makemili program that creates a mili root file that allows VisIt to read Mili files Command Line Options 263 Appendix A dir lt directory gt Additional programs Program description mpeg_encode Run the mpeg_encode software that is bundled with the UNIX versions of VisIt silex Runs Silex a graphical tool to browse Silo files xmledit Runs XMLEdit which is a graphical tool designed to aid VisIt plugin developers in designing the state objects etc required for creating Vislt plot operator and database plugins xml2plugin Runs VisIt s XML plugin generator xmltest Runs VisIt s XML plugin tester xml2atts Runs VisIt s XML plugin attribute generator which produces C code from an XML description of
14. coordinates and print the value Reset View ChooseCenterOfRotation 0 5 0 3 print The new center of rotation is GetView3D centerOfRotation VisIt Python Interface Manual 43 ClearCache ClearCache Clears the compute engine s network cache Synopsis ClearCache host gt integer ClearCache host simulation gt integer ClearCacheForAllEngines gt integer Arguments host The name of the computer where the compute engine is running simulation The name of the simulation being processed by the compute engine Returns The ClearCache and ClearCacheForAllEngines functions return 1 on success and 0 on failure Description Sometimes during extended Vislt runs you might want to periodically clear the compute engine s network cache to reduce the amount of memory being used by the compute engine Clearing the network cache is also useful when you want to change what the compute engine is working on For example you might process a large database and then decide to process another large database Clearing the network cache beforehand will free up more resources for the compute engine so it can more efficiently process the new database The host argument is a string object containing the name of the computer on which the compute engine is running The simulation argument is optional and only applies to when you want to instruct a simulation that is acting as a VisIt com pute engine to clear its netwo
15. gt integer CopyLightingToWindow source dest gt integer CopyViewTowindow source dest gt integer CopyPlotsToWindow source dest gt integer Arguments source The index an integer from 1 to 16 of the source window dest The index an integer from 1 to 16 of the destination window Returns The Copy functions return an integer value of 1 for success and 0 for failure Description The Copy functions copy attributes from one visualization window to another visualization win dow The CopyAnnotationsToWindow function copies the annotations from a source visualization window to a destination visualization window while the CopyLightingAttributes function copies lighting and the Copy ViewToWindow function copies the view The CopyPlotsToWindow func tion copies the plots from one visualization window to another visualization window but does not also force plots to generate so after copying plots with the CopyPlotsToWindow function you should also call the DrawPlots function Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots AddWindow SetActiveWindow 2 OpenDatabase usr gapps visit data globe silo AddPlot Mesh mesh1 Copy window 1 s Pseudocolor plot to window 2 CopyPlotsToWindow 1 2 DrawPlots Window 2 will have 2 plots Spin the plots around in window 2 using the mouse CopyViewToWindow 2 1 Copy window
16. s CLI then you can skip to page 36 to see the first function that is not associated with setting properties for the VisIt module VisIt Python Interface Manual 29 AddArgument AddArgument Add an argument to the viewer s command line argument list Synopsis AddArgument argument Arguments argument A string object that is added to the viewer s command line argument list Returns AddArgument does not return a value Description The AddArgument function is used to add extra command line arguments to VisIt s viewer This is only useful when VisIt s Python interface is imported into a stand alone Python interpreter because the AddArgument function must be called before the viewer is launched The AddArgu ment function has no effect when used in VisIt s cli program because the viewer is automatically launched before any commands are processed Example import visit visit AddArgument nowin Add the nowin argument to the viewer 30 VisIt Python Interface Manual Close Close Closes the viewer Synopsis Close Arguments none Returns The Close function does not return a value Description The Close function terminates VisIt s viewer This is useful for Python scripts that only need access to VisIt s capabilties for a short time before closing VisIt Example import visit visit Launch visit Close Close the viewer VisIt Python Interface Manual 31 L
17. visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor w p PseudocolorAttributes p colorTableName xray SetPlotOptions p DrawPlots InvertBackgroundColor light GetLight 0 print light light enabledFlag 1 light direction 0 1 0 light color 255 0 0 255 SetLight 0 light light color light direction 0 255 0 255 1 0 0 SetLight 1 light 90 VisIt Python Interface Manual GetLocal Get LocalName Gets the local user or host name Synopsis GetLocalHostName gt string GetLocalUserName gt string Returns Both functions return a string Description These functions are useful for determining the name of the local computer or the account name of the user running VisIt The GetLocalHostName function returns a string that contains the name of the local computer The GetLocalUserName function returns a string containing the name of the user running VisIt Example visit cli print Local machine name is s GetLocalHostName print My username s GetLocalUserName VisIt Python Interface Manual 9 GetMaterialAttributes GetMaterialAttributes Returns a MaterialAttributes object containing VisIt s Synopsis Returns current material interface reconstruction settings GetMaterialAttributes gt MaterialAttributes object Returns a MaterialAttributes object Description
18. 131 Plots in the error state 17 Plotting materials 15 PrinterAttributes 204 PrintWindow 132 ProjectAttributes 255 PromoteOperator 133 PseudocolorAttributes 231 Q Queries 134 QueriesOverTime 135 Query 136 QueryOverTime 137 R rAttributes 232 RecenterView 138 RedrawWindow 139 ReflectAttributes 256 RemoveAllOperators 140 RemoveLastOperator 140 RemoveOperator 140 RenderingAttributes 205 ReOpenDatabase 141 ReplaceDatabase 142 ResetLineoutColor 143 ResetOperatorOptions 144 ResetPickAttributes 166 ResetPickLetter 145 ResetPlotOptions 146 ResetQueryOverTimeAttributes 173 ResetView 147 RestoreSession 148 RestoreSesssion 11 RevolveAttributes 257 S SaveSession 149 SaveWindow 13 150 175 SaveWindowAttributes 13 207 Saving an image 13 SetActiveContinuousColorTable 151 SetActiveDiscreteColorTable 151 SetActivePlots 16 152 SetActiveTimeSlider 153 SetActiveWindow 154 SetAnnotationAttributes 156 SetCenterOfRotation 157 SetDatabaseCorrelationOptions 158 SetDebugLevel 34 SetDefaultAnnotationAttributes 156 SetDefaultInteractorAttributes 161 SetDefaultMaterialAttributes 164 SetDefaultOperatorOptions 165 SetDefaultPickAttributes 166 SetDefaultPlotOptions 170 SetDefaultQueryOverTimeAttributes 173 SetGlobalLineoutAttributes 160 SetInteractorAttributes 161 SetKeyframeAttributes 162 SetLight 163 SetMaterialAttributes 164 SetOperatorOptions 18 165 SetPickAttributes 166 SetPlotDatabaseState 168 SetPlotFrameRange
19. 255 0 0 255 slider endColor 255 255 0 255 54 VisIt Python Interface Manual CreateDatabaseCorrelation CreateDatabaseCorrelation Creates a database correlation Synopsis CreateDatabaseCorrelation name databases method gt integer Arguments name String object containing the name of the database correlation to be created databases Tuple or list of string objects containing the names of the databases to involve in the database correlation method An integer in the range 0 3 that determines the correlation method Returns The CreateDatabaseCorrelation function returns on success and O on failure Description The CreateDatabaseCorrelation function creates a database correlation which is a VisIt construct that relates the time states for two or more databases in some way You would use the CreateData baseCorrelation function if you wanted to put plots from more than one time varying database in the same vis window and then move them both through time in some synchronized way The name argument is a string that is the name of the database correlation to be created You will use the name of the database correlation to set the active time slider later so that you can change time states The databases argument is a list or tuple of string objects containing the fully qualified host path filename names of the databases to be involved in the database query The method argument allows you to specify a database correlat
20. Description The RedrawWindow function allows a visualization window to redraw itself and then forces the window to redraw This function does the opposite of the DisableRedraw function and is used to recover from it Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Contour u AddPlot Pseudocolor w DrawPlots DisableRedraw AddOperator Slice Set the slice operator attributes Redraw now that the operator attributes are set This will prevent 1 redraw RedrawWindow VisIt Python Interface Manual 139 RemoveOperator RemoveOperator Removes operators from plots Synopsis RemoveAllOperators gt integer RemoveAllOperators all gt integer RemoveLastOperator gt integer RemoveLastOperator all gt integer Remove0Operator index gt integer Remove0Operator index all gt integer Arguments all An optional integer argument that tells the function to ignore the selected plots and use all plots in the plot list if the value of the argument is non zero index The zero based integer index into a plot s operator list that specifies which operator is to be deleted Returns All functions return an integer value of 1 for success and 0 for failure Description The RemoveOperator functions allow operators to be removed from plots The RemoveLastOpera tor function removes the
21. Tell VisIt to always do material interface reconstruction m GetMaterialAttributes m forceMIR 1 SetMaterialAttributes m ClearWindow DrawPlots VisIt Python Interface Manual 203 PrinterAttributes PrinterAttributes PrinterAttributes function and object Synopsis PrinterAttributes gt PrinterAttributes object Returns The PrinterAttributes function returns a PrinterAttributes object Object definition Field Type Default value creator string m documentName string untitled numCopies int 1 outputToFile int 0 outputToFileName string untitled pageSize int 2 portrait int 1 printColor int 1 printProgram string Ipr printerName string Di Description The PrinterAttributes function is used to create PrinterAttributes objects 204 VisIt Python Interface Manual RenderingAttributes RenderingAttributes RenderingAttributes function and object Synopsis RenderingAttributes gt RenderingAttributes object Description The RenderingAttributes function returns a RenderingAttributes object Object definition Field Type Default value antialiasing int 0 geometryRepresentation int Surfaces Possible values Surfaces Wireframe Points displayListMode int Auto Possible values Never Always Auto stereoRendering int 0 stereoType int CrystalEyes Possible values RedBlue Interlaced CrystalEyes notify
22. end A 2 or 3 item tuple containing the coordinates of the end point variables A tuple of strings containing the names of the variables for which lineouts should be created samples An integer value containing the number of sample points along the lineout Returns The Lineout function returns 1 on success and O on failure Description The Lineout function extracts data along a given line segment and creates curves from it in a new visualization window The start argument is a tuple of numbers that make up the coordinate of the lineout s starting location The end argument is a tuple of numbers that make up the coordinate of the lineout s ending location The optional variables argument is a tuple of strings that contain the variables that should be sampled to create lineouts The optional samples argument is used to determine the number of sample points that should be taken along the specified line If the samples argument is not provided then VisIt will sample the mesh where it intersects the specified line instead of using the number of samples to compute a list of points to sample Example visit cli OpenDatabase usr gapps visit data rect2d silo AddPlot Pseudocolor ascii DrawPlots Lineout 0 2 0 2 0 8 1 2 Lineout 0 2 1 2 0 8 0 2 default d u Lineout 0 6 0 1 0 6 1 2 100 VisIt Python Interface Manual 109 Lineout List Lists the members of a
23. quadmesh DrawPlots 36 VisIt Python Interface Manual AddOperator AddOperator Adds the named operator to the selected plots Synopsis AddOperator operator gt integer AddOperator operator all gt integer Arguments operator This is a string containing the name of the operator to be applied all This is an optional integer argument that applies the operator to all plots if the value of the argument is not zero Returns The AddOperator function returns an integer value of 1 for success and O for failure Description The AddOperator function adds a VisIt operator to the selected plots The operator argument is a string containing the name of the operator to be added to the selected plots The operatore name must be a valid operator plugin name that is a member of the tuple returned by the OperatorPlugins function see page 124 The all argument is an integer that determines whether or not the operator is applied to all plots If the all argument is not provided the operator is only added to selected plots Once the AddOperator function is called the desired operator is added to all selected plots unless the all argument is a non zero value When the all argument is a non zero value the opera tor is applied to all plots regardless of whether or not they are selected Operator attributes are set through the SetOperatorOptions function Example visit cli OpenDatabase usr gapps visit data gl
24. s current rendering settings Synopsis GetRenderingAttributes gt RenderingAttributes object Returns Returns a RenderingAttributes object Description The GetRenderingAttributes function returns a RenderingAttributes object that contains the ren dering settings that VisIt currently uses The RenderingAttributes object contains information related to rendering such as whether or not specular highlights or shadows are enabled The Ren deringAttributes object also contains information scalable rendering such as whether or not it is currently in use and the scalable rendering threshold Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Surface hgslice DrawPlots GetView3D viewNormal 0 215934 0 454611 0 864119 viewUp 0 973938 0 163188 0 157523 imageZoom 1 64765 SetView3D v v v v v light GetLight 0 light direction 0 1 1 SetLight 0 light r GetRenderingAttributes r scalableActivationMode r Always r doShadowing 1 SetRenderingAttributes r 100 VisIt Python Interface Manual GetSave WindowAttributes Get SaveWindowAttributes Returns an object that contains the attributes used to save windows Synopsis GetSaveWindowAttributes gt SaveWindowAttributes object Returns This function returns a VisIt SaveWindowAttributes object that contains the attributes used in sav ing windows Description
25. s index in the plot list frame A zero based integer value corresponding to a database keyframe at a particular animation frame Returns DeletePlotDatabaseKeyframe does not return a value Description The DeletePlotDatabaseKeyframe function removes a database keyframe from a specific plot A database keyframe represents the database time state that will be used at a given animation frame when VisIt s keyframing mode is enabled The plotIndex argument is a zero based integer that is used to identify a plot in the plot list The frame argument is a zero based integer that is used to identify the frame at which a database keyframe is to be removed for the specified plot Example visit cli OpenDatabase usr gapps visit data wave visit k GetKeyframeAttributes k enabled k nFrames k nFramesWasUserSet 1 20 1 SetKeyframeAttributes k AddPlot Pseudocolor pressure SetPlotDatabaseState 0 0 60 Repeat time state 60 for the first few animation frames by adding a keyframe at frame 3 SetPlotDatabaseState 0 3 60 SetPlotDatabaseState 0 19 0 DrawPlots ListPlots Delete the database keyframe at frame 3 DeletePlotDatabaseKeyframe 0 3 ListPlots 62 VisIt Python Interface Manual DeletePlotKeyframe DeletePlotKeyframe Deletes a plot keyframe at a specified frame Synopsis DeletePlotKeyframe plotIndex frame Arguments plotIndex A zero based integer value corr
26. timeSliders tuple of 0 string timeSliderCurrentStates tuple of int O animationMode int 2 windowMode int 1 boundingBoxNavigate int 1 spin int 0 fullFrame int 0 perspective int 1 lock View int 0 lockTools int 0 lockTime int 0 viewExtentsType int 0 viewDimension int 2 viewKeyframes tuple of int O camera View Mode int 0 usingScalableRendering int 0 lastRenderMin float 0 0 216 VisIt Python Interface Manual WindowInformation Field Type Default value lastRenderAvg float 0 0 lastRenderMax float 0 0 numTriangles int 0 extents tuple of FLTMAX FLTMAX FLTMAX FLT float MAX FLTMAX FLTMAX Description The WindowInformation function is used to create WindowInformation objects For an initialized WindowInformation object use the GetWindowInformation function WindowInformation objects allow you to inspect some of VIsIt s state for the active window and you can use this state informa tion to influence the control flow of your scripts Example 1 visit cli path usr gapps visit data dbs path dbA00 pdb path dbB00 pdb path dbC00 pdb for db in dbs OpenDatabase db AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 Use the WindowInformation to get the list of time sliders tsNames GetWindowInformation timeSliders for ts in tsNames SetActiveTimeSlider ts fo
27. tions is to animate the view to produce simple animations where the camera appears to fly around the plots in the visualization window Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor v DrawPlots v0 Get View3D vl GetView3D vl camera vl viewUp 1 1 1 1 1 1 vl parallelScale 10 for i in range 0 20 t float i 19 v2 1 t vO t v1 SetView3D v2 Animate the view VisIt Python Interface Manual 177 SetViewExtentsType SetViewExtentsType Tells VisIt how to use extents when computing the view Synopsis SetViewExtentsType type gt integer Arguments type An integer 0 1 or one of the strings original actual Returns SetViewExtentsType returns 1 on success and 0 on failure Description VisIt can use a plot s spatial extents in two ways when computing the view The first way of using the extents is to use the original extents which are the spatial extents before any modifications such as subset selection have been made to the plot This ensures that the view will remain rela tively constant for a plot Alternatively you can use the actual extents which are the spatial extents of the pieces of the plot that remain after operations such as subset selection Example visit cli OpenDatabase usr gapps visit data globe silo SetViewExtentsType actual AddP
28. visit cli OpenDatabase usr gapps visit data wave visit k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFramesWasUserSet 1 nFrames 1 AddPlot Pseudocolor pressure SetPlotFrameRange 0 0 nFrames 1 SetPlotDatabaseKeyframe 0 0 70 SetPlotDatabaseKeyframe 0 nFrames 2 35 SetPlotDatabaseKeyframe 0 nFrames 1 0 DrawPlots for state in list range TimeSliderGetNStates 0 SetTimeSliderState state MovePlotDatabaseKeyframe 0 nFrames 2 nFrames 4 for state in list range TimeSliderGetNStates 0 SetTimeSliderState state Visit Python Interface Manual 113 MovePlotKeyframe MovePlotKeyframe Moves a keyframe for a plot Synopsis MovePlotKeyframe index oldFrame newFrame Arguments index An integer representing the index of the plof in the plot list oldFrame The old animation frame where the keyframe is located newF rame The new animation frame where the keyframe will be moved Returns MovePlotKeyframe does not return a value Description MovePlotKeyframe moves a keyframe for a specified plot to a new animation frame which changes the plot attributes that are used for each animation frame when VisIt is in keyframing mode Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Contour hgslice DrawPlots k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFrame
29. wireframeFlag int 0 Description The SurfaceAttributes function is used to create SurfaceAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Surface plots VisIt Python Interface Manual 237 TensorAttributes TensorAttributes TensorAttributes function and object Synopsis TensorAttributes gt TensorAttributes object Returns The TensorAttributes function returns a TensorAttributes object Object definition Field Type Default value useStride int 0 stride int 1 nTensors int 400 scale float 0 25 scaleByMagnitude int 1 autoScale int 1 colorByEigenvalues int 1 useLegend int 1 tensorColor tuple of int 0 0 0 255 colorTableName string Default Description The TensorAttributes function is used to create TensorAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Tensor plots 238 VisIt Python Interface Manual VectorAttributes VectorAttributes VectorAttributes function and object Synopsis VectorAttributes gt VectorAttributes object Returns The VectorAttributes function returns a VectorAttributes object Object definition Field Type Default value useStride int 0 stride int 1 nVectors int 400 lineStyle int 0 lineWidth int 0 scale float 0 25 scaleByMagnitude int 1 autoScale int 1 headSize float 0 25 headOn int 1
30. 0 float plane 1 Origin tuple of 0 0 0 0 0 0 float plane 1 Status int 1 plane2Normal tuple of 0 0 1 0 0 0 float plane2Origin tuple of 0 0 0 0 0 0 float plane2Status int 0 plane3Normal tuple of 0 0 0 0 1 0 float plane3Origin tuple of 0 0 0 0 0 0 float plane3Status int 0 planeInverse int 0 radius float 1 0 sphereInverse int 0 Description The ClipAttributes function is used to create ClipAttributes objects that can be fed to the SetOper atorOptions function in order to set the attributes for Clip operators VisIt Python Interface Manual 245 ConeAttributes ConeAttributes ConedAttributes function and object Synopsis ConeAttributes gt ConeAttributes object Returns The ConeAttributes function returns a ConeAttributes object Object definition Field Type Default value angle float 45 0 cutByLength int 0 length float 1 0 normal tuple of 0 0 0 0 1 0 float origin tuple of 0 0 0 0 0 0 float representation int 1 upAxis tuple of 0 0 1 0 0 0 float Description The ConeAttributes function is used to create ConeAttributes objects that can be fed to the SetOp eratorOptions function in order to set the attributes for Cone operators 246 VisIt Python Interface Manual CylinderAttributes CylinderAttributes CylinderAttributes function and object Synopsis CylinderAttributes gt CylinderAttributes object Returns
31. 0 0 0 0 0 0 float radius float 1 0 Description The SphereSliceAttributes function is used to create SphereSliceAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for SphereSlice operators VisIt Python Interface Manual 259 ThreeSliceAttributes ThreeSliceAttributes ThreeSliceAttributes function and object Synopsis ThreeSliceAttributes gt ThreeSliceAttributes object Returns The ThreeSliceAttributes function returns a ThreeSliceAttributes object Object definition Field Type Default value interactive int 1 x float 0 0 y float 0 0 Z float 0 0 Description The ThreeSliceAttributes function is used to create ThreeSliceAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for ThreeSlice operators 260 VisIt Python Interface Manual ThresholdAttributes ThresholdAttributes tThresholdAttributes function and object Synopsis ThresholdAttributes gt ThresholdAttributes object Returns The ThresholdAttributes function returns a ThresholdAttributes object Object definition Field Type Default value amount int 0 Ibound float le 37 ubound float 1e 37 variable string default Description The ThresholdAttributes function is used to create ThresholdAttributes objects that can be fed to the SetOperatorOptions function in order to s
32. 02 50620 dee RO dk ee bree de eae dw ees 167 SetPlotDatabaseS tate a ii cs ex Siew a we Sal ts 168 SetPlotFrameR aNg ens pu Siete cates eel epee Ae Ole oe ee ieee 169 SERIO COPOS yes Gr axa eke AAA Ae Se a ee Oe ee 170 SetPlotSILRestriction 0 0 0 eee eee e eens 171 SetPrinterA tributes sss ees GA ee a a ei eas A As 172 SetQueryOverTimeAttributes ey ead be A 173 SetRenderingAttributes voii nhs dbo A di eee 174 SetSaveWindowAttributes o o oooooooo te eee teen eens 175 SetTimeSliderState siessen ooo 176 viii ECM WS it Melina A LAS i ete Likes ts oes fd is 177 Set ViCWEXIenis Type 1 4 toc cee As 178 SECVIOW Wey MAIC ose ds a aE Ba ted o E a ed La 179 Set W indowArea e eurer A he EE a ORES BEES 180 SetW IndOw avout oraes DAS Eu les be ee CEE iS hPa 181 SetWindowMode iia be PAS heed ae a Gao base aa athe ae eae 182 SHOWA Winido WS s sc5 sot ao Sites GOs SAR ah Ee HS BN ate BP Ge 183 Show oolbars e cs 354 cust a sis k SA net teas 184 SOULCE eS phic de te bles ea A aida enn Ona ai 185 TimeSliderGetNStates ea a E aa e ce eee nee ees 186 TimeSliderNextState 2 00 cence een eens 187 TimeSliderPrevState ooo 188 ToggleMode miooo ta Lona iaia e Ab a de tne tees 189 UA A A O tia Add 191 UNdOVIE WSL A ia A AS es San 192 Write Conte Pile gt Ad BERR ee AR 193 Object Reference I Functions and Objects 0 0 195 AnnotationAttributes 2 0 00 o 196 GlobalAttributes s 05 cscs Se ee is DSA
33. 169 SetPlotOptions 16 170 SetPlotSILRestriction 171 SetPrinterAttributes 172 SetQueryOverTimeAttributes 173 SetRenderingAttributes 174 SetSaveWindowAttributes 150 SetTimeSliderState 176 Setting operator attributes 18 Setting plot attributes 16 Setting the 2D view 22 Setting the 3D view 22 Setting the output image characteristics 12 SetView2D 177 SetView3D 177 SetViewExtentsType 178 SetViewKeyframe 179 SetWindowArea 180 SetWindowMode 182 ShowAllWindows 183 ShowToolbars 184 SILRestriction 209 SliceAttributes 258 Source 185 SphereSliceAttributes 259 StreamlineAttributes 234 Strings 6 SubsetAttributes 236 SurfaceAttributes 237 T TensorAttributes 238 ThreeSliceAttributes 260 ThresholdAttributes 261 TimeSliderGetNStates 186 TimeSliderNextState 187 TimeSliderPreviousState 188 ToggleBoundingBoxMode 189 ToggleCameraViewMode 189 ToggleFullFrameMode 189 ToggleLockTime 189 ToggleLockViewMode 189 ToggleMaintainDataMode 189 ToggleMaintainViewMode 189 ToggleSpinMode 189 TransformAttributes 262 Tuples 6 TurnDomainsOff 21 191 TurnDomainsOn 21 191 Turning off domains 21 Turning off materials 21 TurnMaterialsOff 21 191 TurnMaterialsOn 21 191 U UndoView 192 Using session files 11 V VectorAttributes 239 Version 35 View2DAttributes 213 View3DAttributes 214 ViewCurveAttributes 212 VolumeAttributes 241 W While loop 9 WindowInformation 216 Working with multiple plots 16 WriteConfigFile 193
34. ColorTableNames 52 ConeAttributes 246 ContourAttributes 222 Control flow 7 CopyAnnotationsToWindow 53 CopyLightingToWindow 53 CopyPlotsToWindow 53 CopyViewTowindow 33 CreateAnnotationObject 54 CreateDatabaseCorrelation 55 Creating a plot 15 CurveAttributes 224 CylinderAttributes 247 D DefineMaterialExpression 57 DefineMeshExpression 57 DefineScalarExpression 19 57 DefineSpeciesExpression 57 DefineVectorExpression 57 Defining expressions 19 Defining functions 9 DelconifyAllWindows 58 Delete ActivePlots 59 Delete AllPlots 59 DeleteDatabaseCorrelation 60 DeleteExpression 61 DeletePlotDatabaseKeyframe 62 DeletePlotKeyframe 63 Delete ViewKeyframe 65 DeleteWindow 66 DemoteOperator 67 Dictionaries 7 DisableRedraw 68 DisplaceAttributes 248 DrawPlots 17 69 E EnabledTool 70 EvalCubic 71 EvalCubicSpline 23 72 EvalLinear 73 EvalQuadratic 74 Expressions 75 F FilledBoundaryAttributes 225 Finding the min and the max 20 Flying around plots 23 For loop 8 G GetActiveContinuousColorTable 76 GetActiveDiscreteColorTable 76 GetActiveTimeSlider 77 GetAnimationNumStates 79 GetAnnotationAttributes 80 GetAnnotationObject 81 GetDatabaseNStates 82 GetDebugLevel 34 GetDomains 83 GetEngineList 84 GetGlobalAttributes 85 GetGlobalLineoutAttributes 86 GetInteractorAttributes 87 GetKeyframeAttributes 88 GetLastError 89 GetLight 90 GetLocalHostName 91 GetLocalUserName 91 GetMaterialAttributes 92 GetMate
35. ForEachRender int 0 scalableActivationMode int Auto Possible values Never Always Auto scalableAutoThreshold int 2000000 specularFlag int 0 specularCoeff float 0 6 specularPower float 10 0 specularColor tuple of int 255 255 255 255 doShadowing int 0 shadowStrength float 0 5 Description The RenderingAttributes function is used to create RenderingAttributes objects that can be passed to the SetRenderingAttributes function see page 174 to set VisIt s rendering options Example visit cli VisIt Python Interface Manual 205 RenderingAttributes OpenDatabase usr gapps visit data noise silo AddPlot Surface hgslice DrawPlots Set up the view GetView3D viewNormal 0 215934 0 454611 0 864119 viewUp 0 973938 0 163188 0 157523 imageZoom 1 64765 SetView3D v lt lt lt lt Set up the light light GetLight 0 light direction 0 1 1 SetLight 0 light Turn on shadows r GetRenderingAttributes print r r scalableActivationMode r Always r doShadowing 1 SetRenderingAttributes r 206 VisIt Python Interface Manual Save WindowAttributes SaveWindowAttributes SaveWindowAttributes function and object Synopsis SaveWindowAttributes gt SaveWindowAttributes object Returns The Save WindowAttributes function returns a SaveWindowAttributes object Object
36. None var3 string default var3MinFlag int 0 232 VisIt Python Interface Manual ScatterAttributes Description Field Type Default value var3MaxFlag int 0 var3Min float 0 0 var3Max float 1 0 var3Scaling int Linear Possible values Linear Log Skew var3SkewFactor float 1 0 var4Role int None Possible values CoordinateO Coordinate1 Coordinate2 Color None var4 string default var4MinFlag int 0 var4MaxFlag int 0 var4Min float 0 0 var4Max float 1 0 var4Scaling int Linear Possible values Linear Log Skew var4SkewFactor float 1 0 pointSize float 0 05 pointType int Point Possible values Box Axis Icosahedron Point scaleCube int 1 colorTableName string hot singleColor tuple of int 255 0 0 255 foregroundFlag int 1 legendFlag int 1 The ScatterAttributes function is used to create ScatterAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Scatter plots VisIt Python Interface Manual 233 StreamlineAttributes StreamlineAttributes StreamlineAttributes function and object Synopsis StreamlineAttributes gt StreamlineAttributes object Returns The StreamlineAttributes function returns a StreamlineAttributes object Object definition Field Type Default value sourceType int SpecifiedPoint Possible values SpecifiedPoint Speci fiedLine SpecifiedPlan
37. Possible values Linear Log singleColor tuple of int 255 0 0 255 wireframe int 0 222 VisIt Python Interface Manual ContourAttributes Description The ContourAttributes function is used to create ContourAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Contour plots VisIt Python Interface Manual 223 CurveAttributes CurveAttributes CurveAttributes function and object Synopsis CurveAttributes gt CurveAttributes object Returns The CurveAttributes function returns a CurveAttributes object Object definition Field Type Default value color tuple ofint 0 0 0 255 lineStyle int 0 line Width int 0 pointSize float 5 0 showLabels int 1 showPoints int 0 Description The CurveAttributes function is used to create CurveAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Curve plots 224 VisIt Python Interface Manual FilledBoundaryAttributes FilledBoundaryAttributes FilledBoundaryAttributes function and object Synopsis FilledBoundaryAttributes gt FilledBoundaryAttributes object Returns The FilledBoundaryAttributes function returns a FilledBoundary Attributes object Object definition Field Type Default value colorType int ColorByMultipleColors Possible values ColorBySingleColor ColorByMultipleColors ColorByColor
38. Skew limitsMode int 0 min float 0 0 max float 1 0 pointSize float 0 05 pointType int Box Possible values Box Axis Icosahedron Point skewFactor float 1 0 opacity float 1 0 colorTableName string hot smoothingLevel float 0 pointSize VarEnabled int 0 pointSize Var string default Description The PseudocolorAttributes function is used to create PseudocolorAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Pseudocolor plots VisIt Python Interface Manual 231 ScatterAttributes ScatterAttributesScatterAttributes function and object Synopsis ScatterAttributes gt ScatterAttributes object Returns The ScatterAttributes function returns a ScatterAttributes object Object definition Field Type Default value var 1Role int CoordinateO Possible values CoordinateO Coordinate1 Coordinate2 Color None var 1 MinFlag int 0 var 1 MaxFlag int 0 var 1 Min float 0 0 varl Max float 0 0 var 1 Scaling int Linear Possible values Linear Log Skew var 1SkewFactor float 1 0 var2Role int Coordinate Possible values CoordinateO Coordinate1 Coordinate2 Color None var2 string default var2MinFlag int 0 var2MaxFlag int 0 var2Min float 0 0 var2Max float 1 0 var2Scaling int Linear Possible values Linear Log Skew var2SkewFactor float 1 0 var3Role int None Possible values CoordinateO Coordinate1 Coordinate2 Color
39. Synopsis DefineMaterialExpression variableName xpression DefineMeshExpression variableName xpression DefineScalarExpression variableName xpression DefineSpeciesExpression variableName expression DefineVectorExpression variableName xpression Arguments variableName The name of the variable to be created expression The expression definition Returns The DefineExpression functions do not return a value Description The DefineScalarExpression function creates a new scalar variable based on other variables from the open database Likewise the DefineMaterialExpression function creates new material vari ables DefineMeshExpression creates new mesh variables DefineSpeciesExpression creates new species variables and Define VectorExpression creates new vector variables Expression variables can be plotted like any other variable The variableName argument is a string that contains the name of the new variable The expression argument is a string that contains the definition of the new variable in terms of math operators and pre existing variable names Reference the Vis t User s Manual if you want more information on creating expressions such as expression syntax or a list of built in expression functions Example visit cli OpenDatabase usr gapps visit data globe silo DefineScalarExpression myvar sin u cos w Plot the scalar expression variable AddPlot
40. Synopsis GetView2D gt View2DAttributes object GetView3D gt View3DAttributes object GetViewCurve gt ViewCurveAttributes object Returns Both functions return objects that represent the curve 2D or 3D view information Description The GetView functions return ViewAttributes objects which describe the current camera location The GetView2D function should be called if the active visualization window contains 2D plots The GetView3D function should be called to get the view if the active visualization window con tains 3D plots The GetViewCurve function should be called if the active visualization window contains 1D curve plots Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots Change the view interactively using the mouse v0 GetView3D Change the view again using the mouse vl GetView3D print v0 for i in range 0 20 t float i 19 v2 1 t vl t vO SetView3D v2 Animate the view back to the first view VisIt Python Interface Manual 103 GetWindowInformation GetWindowInformation Returns a WindowInformation object that contains information about the active visualization window Synopsis GetWindowInformation gt WindowInformation object Returns The GetWindowInformation object returns a WindowInformation object Description The GetWindowInformation object returns a
41. This allows you to turn off any of the subsets that make up a plot The SILRestriction object is a little different from other objects provided by the VisIt Python Interface in that is relies more on methods than the ability to set properties This makes it more like an actual Python class If you want an easier way to turn domains and materials on or off refer to the functions on page 191 If you have more exotic types of subsets use the SILRestriction function to create a SIL restriction and then call the SetPlotSIL Restriction function on page 171 to make the plot use the SIL restriction Object definition Method Description Categories gt tuple of string Returns a tuple of strings containing the names of all of the subset categories con tained in the SIL NumCategories gt int Returns an integer containing the number of subset categories in the SIL NumSets gt int SetIndex setname gt int Arguments setname A string containing the name of the set whose index is to be returned Returns an integer containing the number of sets in the SIL The SetIndex method returns the set index of a set that is given by name This makes it easy to look up a set and turn it on or off if you have the name of the set that you want to change SetName setindex gt string Arguments setindex An integer index into the list of sets The SetName method returns the name of a set whe
42. VisIt Python Interface Manual gt GlobalLineoutAttributes object GetInteractorAttributes GetInteractorAttributes Returns an InteractorAttributes object Synopsis GetInteractorAttributes gt InteractorAttributes object Returns Returns an initialized InteractorAttributes object Description The GetInteractorAttributes function returns an initialized InteractorAttributes object The Interac torAttributes object can be used to set certain interactor properties Interactors can be thought of as how mouse clicks and movements are translated into actions in the vis window To set the inter actor attributes first get the interactor attributes using the GetInteractorAttributes function Once you ve set the object s properties call the SetInteractorAttributes function to make VisIt use the new interactor attributes Example visit cli ia GetInteractorAttributes print ia ia showGuidelines 0 SetInteractorAttributes ia VisIt Python Interface Manual 87 GetKeyframeAttributes GetKeyframeAttributes Returns an initialized KeyframeAttributes object Synopsis GetKeyframeAttributes gt KeyframeAttributes object Returns GetKeyframeAttributes returns an initialized KeyframeAttributes object Description Use the GetKeyframeAttributes function when you want to examine a KeyframeAttributes object so you can determine VisIt s state when it is in keyframing mode The KeyframeAttrib
43. WindowInformation object that contains information about the active visualization window The WindowInformation object contains the name of the active source the active time slider index the list of available time sliders and their current states as well as certain window flags that determine whether a window s view is locked etc Use the WindowInformation object if you need to query any of these types of information in your script to influence how it behaves Example path usr gapps visit data dbs path dbA00 pdb path dbB00 pdb path dbC00 pdb for db in dbs OpenDatabase db AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 Get the list of available time sliders tsList GetWindowInformation timeSliders Iterate through time on each time slider for ts in tsList SetActiveTimeSlider ts for state in range TimeSliderGetNStates SetTimeSliderState state Print the window information to examine the other attributes that are available GetWindowInformation 104 VisIt Python Interface Manual HideActivePlots HideActiveP1lots Hides the active plots in the active visualization window Synopsis HideActivePlots gt integer Returns The HideActivePlots function returns an integer value of 1 for success and O for failure Description The HideActivePlots function tells the viewer to
44. a state object xml2avt Runs VisIt s XML plugin code generator for AVT components xml2info Runs VisIt s XML plugin code generator for plugin skeleton C code xml2java Runs VisIt s XML plugin attribute generator which produces Java code from an XML description of a state object xml2makefile Runs VisIt s XML plugin Makefile generator xml2projectfile Runs VisIt s XML plugin MSVC 6 0 project file generator This com ponent is only distributed in the MS Windows version of VisIt xml2python Runs VisIt s XML plugin attribute generator which produces Python code from an XML description of a state object xml2window Runs VisIt s XML plugin GUI window generator for plot and operator attribute windows Version options beta Run the current beta version Run the version in the given directory For example di r usr gapps visit 1 3 2 sgi irix6 mips2 would run the sgi 1 3 2 version of visit The dir option is usually specified in a Host profile so the visit command does not have to be in your path on a remote computer when you run in distributed mode y lt version gt Run the specified version Parallel options b lt bank gt Bank from which to draw resources Only applies when using a launch program that operates in a batch environment 264 Command Line Options Appendix A Parallel options expedite Makes psub and other launch programs give priority to
45. a window set up like you want and then want to do the same thing in another window using a different database You can first clone the window and then replace the database Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots ViewAttributes camera 0 505893 0 32034 0 800909 viewUp 0 1314 0 946269 0 295482 parallelScale 14 5472 nearPlane 34 641 farPlane 34 641 perspective 1 SetView3D Set the view q 49a4d4 a AnnotationAttributes a backgroundColor 0 0 255 255 SetAnnotationAttributes a Set the annotation properties CloneWindow Create a clone of the active window DrawPlots Make the new window draw its plots VisIt Python Interface Manual 49 CloseComputeEngine CloseComputeEngine Closes the compute engine running on a specified host Synopsis CloseComputeEngine gt integer CloseComputeEngine hostName gt integer CloseComputeEngine hostName simulation gt integer Arguments hostName Optional name of the computer on which the compute engine is running simulation Optional name of a simulation Returns The CloseComputeEngine function returns an integer value of 1 for success and 0 for failure Description The CloseComputeEngine function tells the viewer to close the compute engine running a speci fied host The hostName argument is a string that contain
46. atts gt integer SetDefaultInteractorAttributes atts gt integer Arguments atts An InteractorAttributes object that contains the new interactor attributes that you want to use Returns SetInteractorAttributes returns 1 on success and 0 on failure Description The SetInteractorAttributes function is used to set certain interactor properties Interactors can be thought of as how mouse clicks and movements are translated into actions in the vis window To set the interactor attributes first get the interactor attributes using the GetInteractorAttributes func tion see page 87 Once you ve set the object s properties call the SetInteractorAttributes function to make VisIt use the new interactor attributes The SetDefaultInteractorAttributes function sets the default interactor attributes which are used for new visualization windows The default interactor attributes can also be saved to the VisIt con figuration file to ensure that future VisIt sessions have the right default interactor attributes Example visit cli ia GetInteractorAttributes print ia ia showGuidelines 0 SetInteractorAttributes ia VisIt Python Interface Manual 161 SetKeyframeAttributes SetKeyframeAttributes Sets Vislt s keyframing attributes Synopsis SetKeyframeAttributes kfAtts gt integer Arguments kfAtts A KeyframeAttributes object that contains the new keyframing attributes to use Returns SetKeyfra
47. been calculated you can use the GetPick Output function to retrieve the printed pick output as a string which can be used for other purposes Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots Perform node pick in screen space NodePick 300 300 Perform node pick in world space NodePick 5 0 5 0 VisIt Python Interface Manual 117 NumColorTableNames NumColorTableNames Returns the number of color tables that have been defined Synopsis NumColorTableNames gt integer Returns The NumColorTableNames function return an integer Description The NumColorTableNames function returns the number of color tables that have been defined Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u p PseudocolorAttributes p colorTableName default SetPlotOptions p DrawPlots print There are d color tables NumColorTableNames for ct in ColorTableNames SetActiveContinuousColorTable ct SaveWindow 118 VisIt Python Interface Manual NumOperatorPlugins NumOperatorP1lugins Returns the number of available operator plugins Synopsis NumOperatorPlugins gt integer Returns The NumOperatorPlugins function returns an integer Description The NumOperatorPlugins function returns the number of available operator plug
48. chapter There are many functions in the VisIt Python Interface because VisIt provides a lot of capabilities for visualizing data Each function is described in detail so you will know what each function does and also what arguments to pass Most functions also include a brief Python script that demonstrates how to use the function in context VisIt s Python Interface is implemented as a Python extension module which is a library that can be loaded by the Python interpreter at runtime All of the functions in this chapter are part of the visit module namespace since modules all have their own namespace If you use the Python import directive to import the VisIt module into a Python interpreter you must preface each call to a VisIt function with the module name For example if you wanted to call the OpenDatabase function you would type visit OpenDatabase mydatabase If you use the VisIt Command Line Interface CLI which can be invoked by typing visit cli on the command line all of the functions are added to the global namespace and prefacing functions with the name of the visit module is not necessary The first functions descibed in this chapter are most directly related to importing the VisIt module into a Python interpreter The functions allow you to specify the debug level add arguments launch and close the module s connection to VisIt s viewer If you intend to always use VisIt functions from within VisIt
49. colorByMag int 1 useLegend int 1 vectorColor tuple of int 0 O 0 255 colorTableName string Default vectorOrigin int Tail Possible values Head Middle Tail minFlag int 0 maxFlag int 0 limitsMode int OriginalData Possible values OriginalData Current Plot min float 0 0 max float 1 0 VisIt Python Interface Manual 239 VectorAttributes Description The VectorAttributes function is used to create VectorAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Vector plots 240 VisIt Python Interface Manual VolumeAttributes VolumeAttributes VolumeAttributes function and object Synopsis VolumeAttributes gt VolumeAttributes object Returns The VolumeAttributes function returns a VolumeAttributes object Object definition Field Type Default value legendFlag int 1 lightingFlag int 1 opacity Attenuation float 1 0 freeformFlag int 1 resampleTarget int 50000 opacity Variable string default freeformOpacity tuple of int 255 integers in a tuple 0 1 2 3 4 5 6 7 8 9 10 11 useColorVarMin int 0 colorVarMin float 0 0 useColorVarMax int 0 colorVarMax float 1 0 useOpacity VarMin int 0 opacity VarMin float 0 0 useOpacity VarMax int 0 opacity VarMax float 0 0 smoothData int 0 samplesPerRay int 500 rendererType int Splatting Possible values Splatting Texture3D RayCasting
50. definition Field Type Default value outputToCurrentDirectory int 1 outputDirectory string pl fileName string visit family int 1 format int TIFF Possible values BMP CURVE JPEG OBJ PNG POSTSCRIPT PPM RGB STL TIFF ULTRA VTK maintainAspect int 1 width int 1024 height int 1024 screenCapture int 1 saveTiled int 0 quality int 80 progressive int 0 binary int 0 stereo int 0 compression int 1 Description The Save WindowAttributes function is used to create SaveWindowAttributes objects so that you can pass them to the SetSaveWindowAttributes function to set options that are used when Vislt saves an image Example OpenDatabase usr gapps visit data noise silo AddPlot Contour hardyglobal VisIt Python Interface Manual 207 SaveWindowAttributes DrawPlots Hava HAD DH H 3H Set the save window options SaveWindowAttributes fileName mycontour jpeg format s JPEG family 0 progressive 1 quality 90 SetSaveWindowOptions s Save the image in the active vis window SaveWindow 208 VisIt Python Interface Manual SILRestriction SILRestriction SilRestriction function and object Synopsis SILRestriction gt SILRestriction object Returns The SILRestriction function returns a SILRestriction object Notes The SILRestriction object is used to specify a SIL restriction for a plot
51. ee 105 Hide Veolbats ida badd iS 106 Leoni fy AlLW Ind OWS 2 is Ad erases 107 InvertBacksroundColor 2 052 0 cs0 e cient res eee ta yee rie eevee ie tad 108 LINC OUI g cectei to oraepe ict ee peat he ate en ved ee eek ee ee eee 109 TIS bite oo a e et lo Aa oe or a dae ee A doe O a 110 A ateee the a a a a ties ee Sete ee a aa eae eee 111 Long FileName scx ii a A teed tee Cee eee 112 MovePlotDatabaseKeyframe 0 eee eee eee 113 MOVEPIOURC VITA a E A eee Sew ale beers 114 MoveViewKeylrame s i v3 eine bend cated veep es a ween bs 116 Node PICK ope oie air A eee ee ee 117 NumColorLable Names x4 tardo sas atte ll re pat Dd da tan ll hg 118 NumOperatorPlugins tii tE te li ada 119 NUmMPIOLPIIGINS idad ae 120 O A ON 121 OpenComputeEngimes erase dead 121 Open Database 25 tise pees OD AD AE ta a 122 Open MOS ta AAA A Maken 123 di A AR Rud de NC 124 Overlay Database 0 AA AAA ES 125 O pb atu dee wk pete dee aha pee 8 126 PickByGlobalNode s csicsa snes geo barr ea a dd 127 PrekByGlobalZone 200 ib peed ie eee ea a a ae See 128 PICK BVINOGGE 200 A A deen eee eee 129 vii PickKBYZONG op tesnia A i ska hee dak Pelee Aged 130 PIOUPNISINS ita 131 Print Windows 4252 Anse htt o ol EE Baste E Aa EE 7 alt La 132 Promote Operator dable Beek Hees eter ee eee 133 OU an renna td tee Sys abst Rese cs tanto he Eyota tin atest ia tii Geese gas 134 QOueriesOver TM is his Pe PAS hed ae a SAL Dee aa ee ae ea 135 QUERY saya Gus SE ae EAS GER E
52. engines are launched This allows compute engines to be easily launched in parallel Since the VisIt Python Interface does not expose VisIt s host profiles it provides the OpenComputeEngine function to allow users to launch compute engines The OpenComputeEngine function must be called before opening a database in order to prevent any latent host profiles from taking precedence A complete list of VisIt s command line arguments is listed in Appendix A on page 263 Example visit cli Launch parallel compute engine remotely args np 7 16 Y nn F va OpenComputeEngine thunder args OpenDatabase thunder usr gapps visit data multi_ucd3d silo AddPlot Pseudocolor d DrawPlots VisIt Python Interface Manual 121 OpenDatabase OpenDatabase Opens a database for plotting Synopsis OpenDatabase databaseName gt integer OpenDatabase databaseName timelndex gt integer Arguments databaseName A string containing the name of the database to open timeIndex This is an optional integer argument indicating the time index at which to open the database If it is not specified a time index of zero is assumed Returns The OpenDatabase function returns an integer value of 1 for success and 0 for failure Description The OpenDatabase function is one of the most important functions in the VisIt Python Interface because it opens a database so it can be plotted The dat
53. float 0 0 zMajorTickMinimum float 0 0 xMajorTickMaximum float 1 0 yMajorTickMaximum float 1 0 zMajorTickMaximum float 1 0 xMajorTickSpacing float 0 2 yMajorTickSpacing float 0 2 zMajorTickSpacing float 0 2 xMinorTickS pacing float 0 02 yMinorTickS pacing float 0 02 VisIt Python Interface Manual 197 AnnotationAttributes Field Type Default value zMinorTickSpacing float 0 02 xLabelFontHeight float 0 02 yLabelFontHeight float 0 02 zLabelFontHeight float 0 02 xTitleFontHeight float 0 02 yTitleFontHeight float 0 02 zTitleFontHeight float 0 02 xLabelScaling int 0 yLabelScaling int 0 zLabelScaling int 0 axesTickLocation int 0 axes Type int ClosestTriad Possible values ClosestTriad Furthest Triad OutsideEdges StaticTriad Stati cEdges triadFlag int 1 bboxFlag int 1 backgroundColor tuple of int 255 255 255 255 foregroundColor tuple of int 0 O 0 255 gradientBackgroundStyle int Radial Possible values TopToBottom Bottom ToTop LeftToRight RightToLeft Radial gradientColorl tuple of int 0 0 255 255 gradientColor2 tuple of int 0 0 0 255 backgroundMode int Solid Possible values Solid Gradient userInfoFlag int 1 databaseInfoFlag int 1 legendInfoFlag int 1 Description The AnnotationAttributes function is used to create AnnotationAttributes objects that can be passed to the SetAnnotationAttributes function once their attrib
54. gradientType int SobelOperator Possible values CenteredDifferences SobelOperator num3DSlices int 200 VisIt Python Interface Manual 24 VolumeAttributes Description The VolumeAttributes function is used to create VolumeAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Volume plots 242 VisIt Python Interface Manual Chapter 7 Operator Plugin Object 1 0 2 0 Reference Overview VisIt s Python Interface contains many objects that allow operator plugin attributes to be set programmatically These objects are new Python types that contain groups of attributes that are used by operators to control how they process data Operator objects which are covered in this chapter are used to simplify the interface to the functions in the VisIt Python Interface and they also make convenient return values for functions that return information about VisIt s operators Functions and Objects The objects described in this reference all have constructor functions which return a new instance of the specific object type The reference page for each object gives both a synopsis of how to use the constructor function and a description of all of the fields and methods that are part of the object Most objects can be modified using a simple assigment of an appropriate Python object into any of its fields When an incompatible value is assigned into one of an object s
55. hide the active plots in the active visualization window Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddPlot Mesh mesh1 DrawPlots SetActivePlots 0 HideActivePlots AddPlot FilledBoundary mat1 DrawPlots VisIt Python Interface Manual 105 HideToolbars HideToolbars Hides the visualization window s toolbars Synopsis HideToolbars gt integer HideToolbars allWindows gt integer Arguments allWindows An integer value that tells VisIt to hide the toolbars for all windows when it is non zero Returns The HideToolbars function returns on success and O on failure Description The HideToolbars function tells VisIt to hide the toolbars for the active visualization window or for all visualization windows when the optional allWindows argument is provided and is set to a non zero value Example visit cli SetWindowLayout 4 HideToolbars ShowToolbars Hide the toolbars for all windows HideToolbars 1 106 VisIt Python Interface Manual IconifyAllWindows IconifyAllWindows Minimizes all of the visualization windows Synopsis IconifyAllWindows Returns The IconifyAllWindows function does not return a value Description The IconifyAllWindows function minimizes all of the hidden visualization windows to get them out of the way Example vi
56. is saved so you can use that for other purposes in your script Save images of all time steps and add each image filename to a list names for state in range TimeSliderGetNStates SetTimeSliderState state Save the image n SaveWindow names names n print names Working with databases VisIt allows you to open a wide array of databases both in terms of supported file formats and in terms how databases treat time Databases can have a single time state or can have multiple time states Databases can natively support multiple time states or sets of single time states files can be grouped into time varying databases using visit files or using virtual databases Working with databases gets even trickier if you are using Visit to visualize a database that is still being generated by a simulation This section describes how to interact with databases 4 1 Opening a database Opening a database is a relatively simple operation most complexities arise in how the database treats time If you only want to visualize a single time state or 1f your database format natively supports multiple time states per file then opening a database requires just a single call to the OpenDatabase function Open a database at time state 0 OpenDatabase usr gapps visit data allinone00 pdb VisIt Python Interface Manual 13 Quick Recipes 4 2 Opening a database at late time Opening a database at a later time state is done j
57. must specify parallel options etc in batch mode where there is no Engine Chooser Window then you have few options other than to open a compute engine before opening a database To open a compute engine use the OpenComputeEngine function You can pass the name of the host on which to run the compute engine and any arguments that must be used to launch the engine such as the number of processors Open a remote parallel compute engine before opening a database OpenComputeEngine mcr np 4 nn 2 OpenDatabase mcr usr gapps visit data multi_ucd3d silo Working with plots Plots are viewable objects created from a database that can be displayed in a visualization window VisIt provides several types of plots and each plot allows you to view data using different visualization techniques For example the Pseudocolor plot allows you to see the general shape of a simulated object while painting colors on it according to the values stored in a variable s scalar field The most important functions for interacting with plots are covered in this section 5 1 Creating a plot The function for adding a plot in VisIt is AddPlot The AddPlot function takes the name of a plot type and the name of a variable that is to be plotted and creates a new plot and adds it to the plot list The name of the plot to be created corresponds to the name of one of VisIt s plot plugins which can be queried using the PlotPlug
58. oa ee ects ted 200 LIghtAttribUles derrita A wo tite 202 MaterialAttributes eee ees 203 Printer AID Dai A AA ae Bee eos 204 Rendering Attributes de do e e ed o Ne 205 Save WinhdowAttrIbutes o o o o o nee nes 207 ST RESCH ONY it a 209 Vie WCUTVEAMEDULES i 24h o ita id 212 View2ZDAttributes omite rd le A a HE a he 5 E 213 View3DAttributes 33 32 65 2 GSS sens UR Gas EAN Cad Re S a eR ae 214 WindowInformation 0 0 00 eens 216 Plot Plugin Object Reference Functions and ODectSi4 c04 4244800 sccaeeever tenes 219 Boundary Attributes sC 4 4 a eae dws poe aia in tae Gece tea nba Leeds 220 ContourAttributes sao ee ash ee a Ne Eee Sot Lo oe hh Bas a O 222 Curve Attributes oriol ria het bes oe hee Oi ER eT Sa Ee 224 FilledBoundaryAttributes ceeds Di Poe ad See Ee 225 HistogramAttributes 2600000 praia a Geel eee eew Bbw aes 227 Eab elA tri bites isc 35 3 ts iS a es 228 MeshAttributes ios 3 cesnub skeet coach eles dtc A TAU heed cascades 230 PseudocolorAttributes 0 cece E eens 231 ScatterA ttriBUtesis 2 lt 6 ls aes e od ty O are e a O Poudre ad 232 StreamlineAttributes esni eee eee eee eee 234 SUBSEA CHIBULES res eeoce teh oid ae ered bch yaw an 236 SurfaceA tributes lt A tae here ies Pelee ks 237 T nsorAttributes d 344 3 os area A is 238 Vector Atri DULES 2 lt afoul fers Se O de os TA A e Seth DI 239 Volume Attributes ninia eed eh eRe RS 8 ORG Be PEERS ORE ER ES 241 Operator Pl
59. of ways domains materials etc This section provides some details on how to remove materials and domains from your visualization 8 1 Turning off domains VisIt s Python Interface provides the TurnDomainsOn and TurnDomainsOff functions to make it easy to turn domains on and off OpenDatabase usr gapps visit data multi_rect2d silo AddPlot Pseudocolor d DrawPlots Turning off all but the last domain d GetDomains for dom in d 1 TurnDomainsOff dom Turn all domains off TurnDomainsOff Turn on domains 3 5 7 TurnDomainsOn d 3 d 5 d 7 8 2 Turning off materials VisIt s Python Interface provides the TurnMaterialsOn and TurnMaterialsOff functions to make it easy to turn materials on and off OpenDatabase usr gapps visit data multi_rect2d silo AddPlot FilledBoundary mat1 DrawPlots Print the materials are GetMaterials Turn off material 2 VisIt Python Interface Manual 21 Quick Recipes 9 0 TurnMaterialsOff 2 View Setting up the view in your Python script is one of the most important things you can do to ensure the quality of your visualization because the view concentrates attention on an object or inferest VisIt provides different methods for setting the view depending on the dimensionality of the plots in the visualization window but despite differences in how the view is set the general procedure is basical
60. processing the rest of the Python script Example visit cli print We are running VisIt version s Version VisIt Python Interface Manual 35 ActivateDatabase ActivateDatabase Activates a database that has been previously opened Synopsis ActivateDatabase argument gt integer Arguments argument A string object containing the name of the database to be activated Returns ActivateDatabase returns 1 on success and 0 on failure Description The ActivateDatabase function is used to set the active database to a database that has been previ ously opened The ActivateDatabase function only works when you are using it to activate a data base that you have previously opened You do not need to use this function unless you frequently toggle between more than one database when making plots or changing time states While the OpenDatabase function on page 121 can also be used to set the active database the ActivateData base function does not have any side effects that would cause the time state for the new active data base to be changed Example visit cli dbs usr gapps visit data wave visit usr gapps visit data curv3d silo OpenDatabase dbs 0 17 AddPlot Pseudocolor u DrawPlots OpenDatabase dbs 1 AddPlot Pseudocolor u DrawPlots Let s add another plot from the first database ActivateDatabase dbs 0 AddPlot Mesh
61. specified database it also removes all references to the specified database from tables of cached metadata etc Note that the CloseDatabase function will fail and the database will not be closed if any plots reference the specified database Example visit cli db usr gapps visit data globe silo OpenDatabase db AddPlot Pseudocolor u DrawPlots print This won t work retval d CloseDatabase db DeleteAllPlots print Now it works retval d CloseDatabase db VisIt Python Interface Manual 5I ColorTableNames ColorTableNames Returns a tuple of color table names Synopsis ColorTableNames gt tuple Returns The ColorTableNames function returns a tuple of strings containing the names of the color tables that have been defined Description The ColorTableNames function returns a tuple of strings containing the names of the color tables that have been defined This method can be used in case you want to iterate over several color tables Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor u DrawPlots for ct in ColorTableNames p PseudocolorAttributes p colorTableName ct SetPlotOptions p 32 VisIt Python Interface Manual Copy Copy Copies attributes from one visualization window to another visualization window Synopsis CopyAnnotationsToWindow source dest
62. that files are being written to the disk visit cli OpenDatabase dynamic silo database AddPlot Pseudocolor var AddPlot Mesh mesh DrawPlots while 1 TimeSliderNextState SaveWindow 188 VisIt Python Interface Manual ToggleMode ToggleMode Toggle a visualization window mode Synopsis ToggleBoundingBoxMode gt integer ToggleCameraViewMode gt integer ToggleFullFrameMode gt integer ToggleLockTime gt integer ToggleLockViewMode gt integer ToggleMaintainDataMode gt integer ToggleMaintainViewMode gt integer ToggleSpinMode gt integer Returns All functions return 1 on success and 0 on failure Description The visualization window has various modes that affect its behavior and the VisIt Python Interface provides a few functions to toggle some of those modes The ToggleBoundingBoxMode function toggles bounding box mode on and off When the visual ization window is in bounding box mode any plots it contains are hidden while the view is being changed so the window redraws faster The ToggleCameraViewMode function toggles camera view mode on and off When the visualiza tion window is in camera view mode the view is updated using any view keyframes that have been defined when VislIt is in keyframing mode The ToggleFullFrameMode function toggles fullframe mode on and off When the visualization wind
63. v viewNormal 0 721721 0 40829 0 558944 v viewUp 0 294696 0 911913 0 285604 SetView3D v SetViewKeyframe Set TimeSliderState nFrames 1 v viewNormal 0 74872 0 423588 0 509894 v viewUp 0 369095 0 905328 0 210117 SetView3D SetViewKeyframe ToggleCameraViewMode for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow VisIt Python Interface Manual 179 SetWindowArea Set WindowArea Set the screen area devoted to visualization windows Synopsis SetWindowArea x y width height Arguments x Left X coordinate in screen pixels y Top Y coordinate in screen pixels width Width of the window area in pixels height Height of the window area in pixels Returns The SetWindowArea function does not return a value Description The SetWindowArea method sets the area of the screen that can be used by VisIt s visualization windows This is useful for making sure windows are a certain size when running a Python script Example import visit visit Launch visit SetWindowArea 0 0 600 600 visit SetWindowLayout 4 180 VisIt Python Interface Manual SetWindowLayout SetWindowLayout Sets the window layout Synopsis SetWindowLayout layout gt integer Arguments layout An integer that specifies the window layout 1 2 4 8 9 16 are valid Returns The SetWindowLayout function returns an integer value of 1 for success and 0
64. value Iterating through a range of numbers 0 N created with range N N 100 for i in range N print i i i VisIt Python Interface Manual Python 6 3 While loop Python provides a while loop that allows you to execute a loop body indefinitely based on some condition The while loop can be used for iteration but can also be used to execute more complex types of loops token get_next_token while token do_something token token get_next_token 7 0 Functions Python comes with many built in functions and modules that implement additional functions Functions can be used to execute bodies of code that are meant to be re used Functions can optionally take arguments and can optionally return values Python provides the def keyword which allows you to define a function The def keyword is followed by the name of the function and its arguments which should appear as a tuple next to the name of the function Define a function with no arguments and no return value def my function print my function prints this Define a function with arguments and a return value def n_to_the_d_power n d value 1 if d gt 0 for i in range d value value n elif d lt 0 value 1 float n_to_the_d_power n d return value VisIt Python Interface Manual 9 Python 10 VisIt Python Interface Manual Chapter 3 Quick Recipes 1 0 2 0 Overview This manual conta
65. xMin int 0 yIncr int 1 yMax int 1 yMin int 0 zIncr int 1 zMax int 1 zMin int 0 Description The IndexSelectAttributes function is used to create IndexSelectAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for IndexSelect operators VisIt Python Interface Manual 249 InverseGhostZoneAttributes InverseGhostZoneAttributes InverseGhostZoneAttributes function and object Synopsis InverseGhostZoneAttributes gt InverseGhostZoneAttributes object Returns The InverseGhostZoneAttributes function returns an InverseGhostZoneAttributes object Object definition Field Type Default value showType int GhostZonesOnly Possible values GhostZonesOnly Ghost ZonesAndRealZones Description The InverseGhostZoneAttributes function is used to create InverseGhostZoneAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for InverseGhost Zone operators 250 VisIt Python Interface Manual IsosurfaceAttributes IsosurfaceAttributes IsosurfaceAttributes function and object Synopsis IsosurfaceAttributes gt IsosurfaceAttributes object Returns The IsosurfaceAttributes function returns an IsosurfaceAttributes object Object definition Field Type Default value contourMethod int Level Possible values Level Value Percent contourNLevels int 10 contourPerc
66. 0 222245 0 97394 0 0452541 c5 viewAngle 30 c5 parallelScale 1 1052 c5 nearPlane 24 1248 c5 farPlane 58 7658 c5 perspective 1 c6 c0 Create a tuple of camera values and x values The x values determine where in 0 1 the control points occur cpts c0 cl c2 c3 c4 c5 c6 x for i in range 7 x x float i float 6 Animate the view using EvalCubicSpline nsteps 100 for i in range nsteps t float i float nsteps 1 c EvalCubicSpline t x cpts c nearPlane 34 461 c farPlane 34 461 SetView3D c 24 VisIt Python Interface Manual Quick Recipes 10 0 Working with annotations Adding annotations to your visualization improve the quality of the final visualization in that you can refine the colors that you use add logos or highlight features of interest in your plots This section provides some recipes for creating annotations using scripting 10 1 Using gradient background colors VisIt s default white background is not necessarily the best looking background color for presentations Adding a gradient background under your plots is an easy way to add a small professional touch to your visualizations VisIt provides a few different styles of gradient background radial top to bottom bottom to top left to right and righ to left The gradient style is set using the gradientBackgroundStyle member of the AnnotationAttributes object The before and after results are sho
67. 2 s view to window 1 VisIt Python Interface Manual 53 CreateAnnotationObject CreateAnnotationOb ject Creates an annotation object that can directly manipulate annotations in the vis window Synopsis CreateAnnotationObject annotType gt annotation object Arguments annot Type A string containing the name of the type of annotation object to create Returns CreateAnnotationObject is a factory function that creates annotation objects of different types The return value if a valid annotation type is provided is an annotation object If the function fails VisItException is raised Description CreateAnnotationObject is a factory function that creates different kinds of annotation objects The annotType argument is a string containing the name of the type of annotation object to create Each type of annotation object has different properties that can be set Setting the different proper ties of an Annotation objects directly modifes annotations in the vis window Currently there are 4 types of annotation objects Annotation type String 2D text annotation Text2D Time slider annotation TimeSlider Image annotation Image 2D line arrow annotation Line2D Example visit cli OpenDatabase usr gapps visit data wave visit 17 AddPlot Pseudocolor pressure DrawPlots slider CreateAnnotationObject TimeSlider print slider slider startColor
68. 255 SetAnnotationAttributes a 80 VisIt Python Interface Manual GetAnnotationObject GetAnnotationOb ject Returns a reference to the annotation object at the specified index in the annotation object list Synopsis GetAnnotationObject index gt Annotation object Arguments index A zero based integer index into the annotation object list Returns GetAnnotationObject returns a reference to an annotation object that was created using the Create AnnotationObject function Description GetAnnotationObject returns a reference to an annotation object that was created using the Create AnnotationObject function see page 54 The index argument is a zero based integer that specifies the index of the object for which we want to return another reference This function is not currently necessary unless the annotation object that you used to create an annotation has gone out of scope and you need to create another reference to the object to set its properties Example visit cli OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots a CreateAnnotationObject TimeSlider ref GetAnnotationObject 0 print ref VisIt Python Interface Manual 8l GetDatabaseNStates GetDatabaseNStates Returns the numberof time states in the active database Synopsis GetDatabaseNStates gt integer Returns Returns the number of time states in
69. 3DAttributes objects which are then passed to the SetView3D function to set the view when the visualization window is in 3D Note that View3DAttributes can be used in arithmetic expressions so you can add views together multiply them by a scale factor etc You can even interpolate views e g viewO 1 t viewl t Example OpenDatabase usr gapps visit data noise silo AddPlot Contour hardyglobal DrawPlots 214 VisIt Python Interface Manual View3DAttributes lt lt 494 lt lt se Get an initialized view object GetView3D viewNormal 0 740314 0 525704 0 419012 viewUp 0 406866 0 846547 0 343247 imageZoom 2 70858 centerOfRotationSet 1 centerOfRotation 9 57689 6 25049 3 18773 SetView3D v VisIt Python Interface Manual 215 WindowInformation WindowInformat ion WindowInformation function and object Synopsis WindowInformation gt WindowInformation object Returns The WindowInformation function returns a WindowInformation object Notes The WindowInformation object like the GlobalAttributes object should be considered to be a read only object that reflects the state of VisIt The difference is that the WindowInformation object contains state information for the active visualization window Object definition Field Type Default value activeSource string notset activeTimeSlider int 1
70. 74 EXPTESSI NS lt 2 ES A A a are 75 GetActiveColorTable 2 0 0 0 eee teen eens 76 GetAchveTimeS der eno a o A ld Ae Dawe ene 77 GetAnimationTimeout nnna 00 unnar aeaee 78 GetAnimationNumStates n o onnaa eenuur 79 GetAnnotationAttributes 0 eee eee eee eens 80 GetAnnotationObject vicario Al e da 81 GetDatabaseNS tates cu sec ised bo ha he es Wa edb ald ee gee Ne ve 82 CGetD manS is A A Gale ogee a ps Dele cen dae Bila cee EN Rites ed 83 vi GetEngin l ists i serai rag AA A eee Peed 84 GetGlobal Attmbules 03 4 0 2 624 sewn o dp 85 GetGlobalL menta tribute ee ate Ee Raa ea a a sg 86 Getlnteractot Attributes 244 a eek ipae e E e E ote ae SELES 87 GetKeyframeAttributes a DA a da a 88 GetLastError roseau sta apa dida a std 89 CALI E EAS EE ss 90 GetlocalName veian o al ao A E a 91 GerMatertal AU rIDU ES data 92 SA A A NA 93 GelNumPlots ra E ea ee A ee NA 94 Ge tPickAttributes seasea Set nee ada eb tae 95 GetPickOutput voor slats Kio daa dt a a a 96 GetPipeline Caching Mode 4 ts il tas las 97 GEES a a 98 GetQueryOver Time AR TIDU ES oia e abe 99 GetRenderint Attributes asta ata dd tes hhh ee A de td al td 100 GetSaveWindowAttributeS o oooocooococrorcncr rr 101 GetlimestderS el Marlee o abe o a odweeah hed eee ee 102 GetView serio hee BU Sed SESE re Cee Bard baw ee eae She es 103 GetWindowlnfornmatony 22 722 24428425 ese ge se eA eee See eee EE 104 HideActivePl ts e tod A Hes Gey TS a ee ee
71. Database func tion Note that ReOpenDatabase is expensive since it causes all plots that use the specified data base to be regenerated If you want to ensure that a time varying database has all of its time states as they are being created by a simulation try the CheckForNewStates function on page 42 instead The databaseName argument is a string containing the full name of the database to be opened The database name is of the form host path filename The host part of the filename can be omitted 1f the database to be reopened resides on the local computer Example visit cli OpenDatabase frost usr gapps visit data wave silo database AddPlot Pseudocolor pressure DrawPlots last TimeSliderGetNStates for state in range last SetTimeSliderState state SaveWindow ReOpenDatabase frost usr gapps visit data wave silo database for state in range last TimeSliderGetNStates SetTimeSliderState state SaveWindow VisIt Python Interface Manual 14 ReplaceDatabase ReplaceDatabase Replaces the database in the current plots with a new database Synopsis ReplaceDatabase databaseName gt integer ReplaceDatabase databaseName timeState gt integer Arguments databaseName A string containing the name of the new database timeState A zero based integer containing the time state that should be made active once the database has been replaced Return
72. Description The SetSave Window Attributes function sets the format and filename that are used to save win dows when the Save Window function is called The contents of the active visualization window can be saved as TIFF JPEG RGB PPM PNG images or they can be saved as curve Alias Wave front Obj or VTK geometry files To set the SaveWindowAttributes create a SaveWindowAt tributes object using the Save Window Attributes function and assign it into a variable Set the fields in the object and pass it to the SetSave Window Attributes function Example visit cli OpenDatabase usr gapps visit data curv3d silo AddPlot Pseudocolor d DrawPlots Set the save window attributes SaveWindowAttributes filename test format s FILEFORMAT_ JPEG progressive 1 fileName test SetSaveWindowAttributes s Hava HA DH DH 3 Save the window SaveWindow VisIt Python Interface Manual 175 SetTimeSliderState Set TimeSliderState Sets the time state for the active time slider Synopsis Arguments Returns SetTimeSliderState state gt integer state A zero based integer containing the time state that we want to make active The SetTimeSliderState function returns 1 on success and O on failure Description The SetTimeSliderState function sets the time state for the active time slider This is the function to use if you want to animate through time or change the cur
73. ES Ie Oe Soe ee a ees 136 QueryOver imei ii eed che hae a bee SW ieee hye eae des 137 Recent VIEW tis dba 4 5 se ne a a Care s diia 138 Redraw Window 225 6 00 ete Re esc dk G or BE as BAS ROE Os 139 REMOVEO PEI Qtr er ci te Ge Mates ti ee he dd 140 ReOpen Databases 4064144007 a pen ewes eee ead pees 141 ReplaceDatabase oir dd a Choa RAE A he ee LAGS 142 R setlineoutColor ans ae ace Wee ie le ee Rela a eh PE a Ma aoe 143 ResetOperatorOptions is oy os is A A OS pew aed 144 R SsetPick ettet ra sbeebs eos OR ey AERA AAA AAAS RA 145 IRESCLP OL PH OHS Sat 04 hele a nens a o dd Le ra A dt ata al a 146 Reset Views ci ld it ti td 147 Restore it a ss Sa 148 SNA A no bie ee ed 149 Save Window 8 eke bk aid dd ii ai eee 150 SetActiveColorTable 0 0 0 0 cece eee e eens 151 SetActivePlots wenn esis a Seis ddd Vas beset Be Das ace Dew eee 152 SetActive MES ld 2 vice nas 153 SetACtive WII W a onei a A eae 154 SetAnimationTimeout 0 0 0 0 ce eee eens 155 SetAnnotationAttributes 0 0 ce eee eee eee 156 SetCenterOfRotation 0 0 0 teen teenies 157 SetDatabaseCorrelationOptions 0 eee 158 SetGlobalLineoutAttributes 0000 ce eee teens 160 Setint ractorAttmbutes sso st da ita 161 SetKeyframeAttributes oscar a ras 162 SAA a ii 163 SetMaterialAttributes oooooooor eee ea ee nes 164 SetOperatorO pons erise dit de toe o 165 SetPlckAttributes iio e cae ROHAN TS OG wa eas 166 SetPipelineCachingMode 2 22
74. GetQueryOutputValue 98 VisIt Python Interface Manual GetQueryOverTimeAttributes GetQueryOverTimeAttributes Returms a QueryOverTimeAttributes object containing the settings that VisIt currently uses for queries over time Synopsis GetQueryOverTimeAttributes gt QueryOverTimeAttributes object Returns GetQueryOverTimeAttributes returns a QueryOverTimeAttributes object Description The GetQueryOverTimeAttributes function returns a QueryOverTimeAttributes object containing the settings that VisIt currently uses for query over time You can use the returned object to change those settings by first setting object properties and then by passing the modified object to the Set QueryOverTimeAttributes function see page 173 Example visit cli SetWindowLayout 4 OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar DrawPlots qot GetQueryOverTimeAttributes print got Make queries over time go to window 4 qot createWindow q windowId 0 4 SetQueryOverTimeAttributes qot QueryOverTime Min Make queries over time only use half of the number of time states qot endTimeFlag qot endTime 1 GetDatabaseNStates 2 SetQueryOverTimeAttributes qot QueryOverTime Min ResetView Visit Python Interface Manual 99 GetRenderingAttributes GetRenderingAttributes Returns a RenderingAttributes object containing VisIt
75. SIL restriction category Synopsis ListDomains ListMaterials Returns The List functions do not return a value Description The List functions ListDomains and List Materials prints a list of the domains and the materials for the selected plots which indicates which domains or materials are on and off The list func tions are used mostly to print the results of restricting the SIL Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots TurnMaterials0ff 4 Turn off material 4 ListMaterials List the materials in the SIL restriction 110 VisIt Python Interface Manual ListPlots ListPlots Lists the plots in the active visualization window s plot list Synopsis ListPlots Returns The ListPlots function does not return a value Description Sometimes it is difficult to remember the order of the plots in the active visualization window s plot list The ListPlots function prints the contents of the plot list to the output console Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor u AddPlot Contour d DrawPlots ListPlots Visit Python Interface Manual 111 LongFileName LongFileName Returns the long filename for a short WIN32 filename Synopsis LongFileName filename gt string Arguments filename A stri
76. T able colorTableName string Default filledFlag int 1 legendFlag int 1 lineStyle int 0 lineWidth int 0 singleColor tuple of int 0 0 0 255 boundaryType int Unknown Possible values Domain Group Mate rial Unknown opacity float 1 0 wireframe int 0 drawInternal int 0 smoothingLevel int 0 cleanZonesOnly int 0 mixedColor tuple of int 255 255 255 255 pointSize float 0 05 pointType int Box Possible values Box Axis Icosahedron Point pointSize VarEnabled int 0 pointSize Var string default VisIt Python Interface Manual 225 FilledBoundaryAttributes Description The FilledBoundary Attributes function is used to create FilledBoundaryAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for FilledBoundary plots 226 VisIt Python Interface Manual HistogramAttributes HistogramAttributes HistogramAttributes function and object Synopsis HistogramAttributes gt HistogramAttributes object Returns The HistogramAttributes function returns an HistogramAttributes object Object definition Field Type Default value specifyRange int 0 min float 0 0 max float 1 0 outputType int Block Possible values Curve Block numBins int 32 twoDAmount int Revolved Volume Possible values Area Revolved Volume lineStyle int 0 lineWidth int 0 color tuple of int 0 O 0 255 Description The HistogramA
77. UCRL SM 209589 VisIt Python Interface Manual May 2006 Version 1 5 3 ii DISCLAIMER This document was prepared as an account of work sponsored by an agency of the United States Government Neither the United States Government nor the University of California nor any of their employees makes any warranty express or implied or assumes any legal liability or responsibility for the accuracy completeness or usefulness of any information apparatus product or process disclosed or represents that its use would not infringe privately owned rights Reference herein to any specific commercial product process or service by trade name trademark manufacturer or otherwise does not necessarily constitute or imply its endorsement recommendation or favoring by the United States Government or the University of California The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California and shall not be used for advertising or product endorsement purposes Work performed under the auspices of the U S Department of Energy by Lawrence Livermore National Laboratory under Contract W 7405 ENG 48 lil iv Introduction to VisIt Manual Chapters isi kac di dk deere ie ha eed 1 Understanding how VisIt workS 2 SUG Visit a hae ta la he ata Bae ha eee 3 Getting Started ees penr dan ad MEE Esa baaa 4 Python A irate detested ce a ame
78. You can create tuples by enclosing a comma separated list of objects in parenthesis Create a tuple a 1 2 3 4 5 print The first value in a is a 0 See if 3 is in a using the in operator print 3 is in a 3 ina Create another tuple and add it to the first one to create c b 6 7 8 9 c atb Iterate over the items in the tuple for value in c print value is value 5 3 Lists Lists are just like tuples except they are not read only and they use square brackets to enclose the items in the list instead of using parenthesis Start with an empty list L for i in range 10 Add i to the list L L L i print L Assign a value into element 6 L 5 1000 print L 5 4 Dictionaries Dictionaries are Python containers that allow you to store a value that is associated with a key Dictionaries are convenient for mapping 1 set to another set since they allow you to perform easy lookups of values Dictionaries are declared using curly braces and each item in the dictionary consists of a key value pair with the key and values being separated by acolon To perform a lookup using a dictionary provide the key whose value you want to look up to the subscript operator colors red rouge orange orange yellow jaune green vert blue bleu Perform lookups using the keys for c in colors keys print s i
79. abaseName argument is a string containing the full name of the database to be opened The database name is of the form computer path file name The computer part of the filename can be omitted if the database to be opened resides on the local computer Example visit cli OpenDatabase usr gapps visit data globe silo OpenDatabase mcr usr gapps visit data multi_ucd3d silo OpenDatabase file visit OpenDatabase file visit 4 122 VisIt Python Interface Manual OpenMDServer OpenMDServer Explicitly opens a metadata server Synopsis OpenMDServer gt integer OpenMDServer host gt integer OpenMDServer host args gt integer Arguments host The optional host argument determines the host on which the metadata server is to be launched If this argument is not provided localhost is assumed args A tuple of strings containing command line flags for the metadata server Returns The OpenMDServer function returns 1 on success and 0 on failure Description The OpenMDServer explicitly launches a metadata server on a specified host This allows you to provide command line options that influence how the metadata server will run Argument Description debug The debug argument allows you to specify a debug level in the range 1 5 that VisIt uses to write debug logs to disk dir visitdir The dir argument allows you to specify where Vislt is located on a remo
80. al SetQueryOverTimeAttributes SetQueryOverTimeAttributes Changes the settings that VisIt uses for queries over time Synopsis SetQueryOverTimeAttributes atts gt integer SetDefaultQueryOverTimeAttributes atts gt integer ResetQueryOverTimeAttributes gt integer Arguments atts A QueryOverTimeAttributes object containing the new settings to use for queries over time Returns All functions return 1 on success and 0 on failure Description The SetQueryOverTimeAttributes function changes the settings that VisIt uses for query over time The SetDefaultQueryOverTimeAttributes function changes the settings that new visualiza tion windows inherit for doing query over time Finally the ResetQueryOverTimeAttributes func tion forces VisIt to use the stored default query over time attributes instead of the previous settings Example visit cli SetWindowLayout 4 OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar DrawPlots qot GetQueryOverTimeAttributes Make queries over time go to window 4 qot createWindow q windowId 0 4 SetQueryOverTimeAttributes qot QueryOverTime Min Make queries over time only use half of the number of time states qot endTimeFlag qot endTime 1 GetDatabaseNStates 2 SetQueryOverTimeAttributes qot QueryOverTime Min ResetView VisIt Python Interface Manual 173
81. ances of a certain plot are initialized with the new default values Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u p PseudocolorAttributes p colorTableName calewhite p minFlag p maxFlag 1 1 p min p max 5 0 8 0 SetPlotOptions p DrawPlots 170 VisIt Python Interface Manual SetPlotSILRestriction SetPlotSILRestriction Set the SIL restriction for the selected plots Synopsis SetPlotSILRestriction silr gt integer SetPlotSILRestriction silr all gt integer Arguments silr A SIL restriction object all An optional argument that tells the function if the SIL restriction should be applied to all plots in the plot list Returns The SetPlotSILRestriction function returns an integer value of 1 for success and 0 for failure Description VisIt allows the user to select subsets of databases The description of the subset is called a Subset Inclusion Lattice Restriction or SIL restriction The SIL restriction allows databases to be subse lected in several different ways The VisIt Python Interface provides the SetPlotSILRestriction function to allow Python scripts to turn off portions of the plotted database The SetPlotSILRe striction function accepts a SILRestriction object that contains the SIL restriction for the selected plots The optional all argument is an integer that tells
82. atabase OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hardyglobal DrawPlots Query NumNodes print The float value is g GetQueryOutputValue Query NumNodes 7 5 Finding the min and the max A common operation in debugging a simulation code is examining the min and max values Here is a pattern that allows you to print out the min and the max values and their locations in the database and also see them visually Define a helper function to get the id s of the MinMax query def GetMinMaxlds Query MinMax import string s string split GetQueryOutputString retval nextGood 0 idType 0 for token in s if token zone or token cell idType 1 nextGood 1 continue elif token node idType 0 nextGood 1 continue if nextGood nextGood 0 retval retval idType int token return retval 20 VisIt Python Interface Manual Quick Recipes 8 0 Set up a plot OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots Do picks on the ids that were returned by MinMax for ids in GetMinMaxIds idType ids 0 id ids 1 if idType PickByNode id else PickByZone id Subsetting VisIt allows the user to turn off subsets of the visualization using a number of different methods Databases can be divided up any number
83. aunch Launch Launches VislIt s viewer Synopsis Launch LaunchNowin Arguments none Returns The Launch functions do not return a value Description The Launch function is used to launch VisIt s viewer when the VisIt module is imported into a stand alone Python interpreter The Launch function has no effect when a viewer already exists The difference between Launch and LaunchNowin is that LaunchNowin prevents the viewer from ever creating onscreen visualization windows The LaunchNowin function is primarily used in Python scripts that want to generate visualizations using VisIt without the use of a display such as when generating movies Example 1 import visit visit AddArgument geometry visit AddArgument 1024x1024 visit LaunchNowin Example 2 import visit visit AddArgument nowin visit Launch 32 VisIt Python Interface Manual LocalNamespace LocalNamespace Tells the VisIt module to import plugins into the global namespace Synopsis LocalNamespace Arguments none Returns The LocalNamespace function does not return a value Description The LocalNamespace function tells the VisIt module to add plugin functions to the global namespace when the VisIt module is imported into a stand alone Python interpreter This is the default behavior when using VisIt s cli program Example import visit visit LocalNamespace visit Launch VisIt Py
84. ause you can design a Visit session file which is an XML file that describes exactly how plots are set up using the VisIt GUI and then use that same session file in the CLI to generate movies in batch The RestoreSession function takes 2 arguments The first argument specifies the filename that contains the VisIt session to be restored The second argument determines whether the session file is assumed to be in the user s VisIt directory If the visitDir argument is set to O then the filename argument must contain the absolute path to the session file Example visit cli Restore my session file for a time varying database from my visit directory RestoreSessionFile visit session 1 for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow 148 VisIt Python Interface Manual SaveSession SaveSession tTells VisIt to save a session file describing the current visualization Synopsis SaveSession filename gt integer Arguments filename The filename argument is the filename that is used to save the session file The filename is relative to the current working directory Returns The SaveSession function returns 1 on success and O on failure Description The SaveSession function tells VisIt to save an XML session file that describes everything about the current visualization Session files are very useful for creating movies and also as shortcuts for setting up complex visualizati
85. be active ListPlots Draw the plots DrawPlots Hide the first plot SetActivePlots 0 16 VisIt Python Interface Manual Quick Recipes 6 0 HideActivePlots Set both plots color table to hot p PseudocolorAttributes p colorTableName hot SetActivePlots 0 1 SetPlotOptions p Show the first plot again SetActivePlots 0 HideActivePlots Delete the second plot SetActivePlots 1 DeleteActivePlots ListPlots 5 5 Plots in the error state When VisIt s compute engine cannot process a plot the plot is put into the error state Once a plot is in the error state it no longer is displayed in the visualization window If you are generating a movie plots entering the error state can be a serious problem because you most often want all of the plots that you have created to animate through time and not disappear in the middle of the animation You can add extra code to your script to prevent plots from disappearing most of the time due to error conditions by adding a call to the DrawPlots function Save an image and take care of plots that entered the error state drawThePlots 0 for state in range TimeSliderGetNStates if SetTimeSliderState state drawThePlots 1 if drawThePlots 1 if DrawPlots 0 print VisIt could not draw plots for state d state else drawThePlots 0 SaveWindow Operators Operators are filters that are applied
86. ct con tains read only information about the list of sources the list of windows and various flags that can be queried Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots g GetGlobalAttributes print g Visit Python Interface Manual 85 GetGlobalLineoutAttributes GetGlobalLineoutAttributes Returns a GlobalLineoutAttributes object Synopsis Returns GetGlobalLineoutAttributes Returns an initialized GlobalLineoutAttributes object Description The GetGlobalLineoutAttributes function returns an initialized GlobalLineoutAttributes object The GlobalLineoutAttributes as suggested by its name contains global properties that apply to all lineouts You can use the GlobalLineoutAttributes object to turn on lineout sampling specify the destination window etc for curve plots created as a result of performing lineouts Once you make changes to the object by setting its properties use the SetGlobalLineoutAttributes function to make VisIt use the modified global lineout attributes Example visit cli SetWindowLayout 4 OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor d DrawPlots g GetGlobalLineoutAttributes print g g samplingOn 1 g windowId 4 g createWindow 0 g numSamples 100 SetGlobalLineoutAttributes g Lineout 3 2 3 3 default 86
87. cute any of VisIt s predefined queries Since queries can take a wide array of arguments the Query function has a wide variety of possible arguments The list of queries can be found in the Vis t User s Manual in the Quantitative Analysis chapter You can get also get a list of queries that can be executed over time using the Queries function Example visit cli OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots Query Volume 136 VisIt Python Interface Manual QueryOverTime QueryOverTime Executes one of VisIt s queries over time to produce a curve Synopsis QueryOverTime name gt integer QueryOverTime name variables gt integer QueryOverTime name argl gt integer QueryOverTime name argl variables gt integer QueryOverTime name argl arg2 gt integer QueryOverTime name argl arg2 variables gt integer Arguments name A string containing the name of the query to execute variables An optional tuple of strings containing the names of additional query variables argl An optional general purpose integer argument arg2 An optional general purpose integer argument Returns The QueryOverTime function returns 1 on success and 0 on failure Description The QueryOverTime function is used to execute any of VisIt s predefined queries Since queries can take a wide array of arguments the QueryOverTime
88. d you can set properties on the returned object Once you ve changed pick settings by setting properties on the object you can pass the altered object to the SetPickAttributes function to force VisIt to use the new pick settings Example visit cli OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh ireg DrawPlots p GetPickAttributes print p p variables default mesh a mesh mixvar SetPickAttributes p Now do some interactive picks and you ll see pick information for more than 1 variable p doTimeCurve 1 SetPickAttributes p Now do some interactive picks and you ll get time curves in a new window VisIt Python Interface Manual 95 GetPickOutput GetPickOutput Returns a string containing the output from the last pick Synopsis GetPickOutput gt string Returns Returns a string containing the output from the last pick Description The GetPickOutput returns a string object that contains the output from the last pick Example visit cli OpenDatabase usr gapps visit data rect2d silo AddPlot Pseudocolor d DrawPlots Pick 0 4 0 6 default u v s GetPickOutput print s 96 VisIt Python Interface Manual GetPipelineCachingMode GetPipelineCachingMode Returns if pipelines are cached in the viewer Synopsis GetPipelineCachingMode gt integer Returns T
89. de gt integer PickByGlobalNode node variables gt integer Arguments node Integer index of the global node for which we want pick information variables A tuple of strings containing the names of the variables for which we want pick information Returns PickByGlobalNode returns 1 on success and 0 on failure Description The PickByGlobalNode function tells VisIt to perform pick using a specific global node index for the entire problem Some meshes are broken up into smaller domains and then these smaller domains can employ a global indexing scheme to make it appear as though the mesh was still one large mesh Not all meshes that have been decomposed into domains provide sufficient informa tion to allow global node indexing You can use the GetPickOutput function to retrieve a string containing the pick information once you ve called PickByGlobalNode Example visit cli OpenDatabase usr gapps visit data multi_curv2d silo AddPlot Pseudocolor d DrawPlots Pick on node 200 in the first domain PickByGlobalNode 200 print Last pick GetPickOutput VisIt Python Interface Manual 127 PickByGlobalZone PickByGlobalZone Performs pick operation for a specific cell using a global cell id Synopsis PickByGlobalZone id gt integer PickByGlobalZone id variables gt integer Arguments id Integer index of the global cell for whic
90. der is active for state in range TimeSliderGetNStates SetTimeSliderState state 168 VisIt Python Interface Manual SetPlotFrameRange SetPlotFrameRange Sets the range of animation frames over which a plot is valid Synopsis SetPlotFrameRange index start end Arguments index A zero based integer representing an index into the plot list start A zero based integer representing the animation frame where the plot first appears in the visualization end A zero based integer representing the animation frame where the plot disappears from the visualization Returns The SetPlotFrameRange function does not return a value Description The SetPlotFrameRange function sets the start and end frames for a plot when VisIt is in keyfram ing mode Outside of this frame range the plot does not appear in the visualization By default plots are valid over the entire range of animation frames when they are first created Frame ranges allow you to construct complex animations where plots appear and disappear dynamically Example visit cli OpenDatabase usr gapps visit data wave visit k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFramesWasUserSet 1 nFrames 1 SetKeyframeAttributes k AddPlot Pseudocolor pressure AddPlot Mesh quadmesh DrawPlots Make the Pseudocolor plot take up the first half of the animation frames before it disappear
91. distributed architecture is that VisIt can visualize the data where it is generated eliminating the need to move data VisIt can be controlled by a Graphical User Interface GUI or through the Python scripting language More information about VisIt s Graphical User Interface can be found in the Vist User s Manual 2 0 Manual chapters This manual is broken down into the following chapters Chapter title Chapter description Introduction to Vislt This chapter Python Describes the basic features of the Python programming language Quick Recipes Describes common patterns for scripting using the VisIt Python Interface Function Reference Describes functions in the VisIt Python Interface Object Reference I Describes extension types Overview VisIt Python Interface Manual 1 Introduction to Vislt 3 0 Plot Plugin Object Reference Describes plot plugin extension types Operator Plugin Object Refer ence Describes operator plugin extension types Describes VisIt s command line options Appendix A Understanding how VisIt works VisIt visualizes data by creating one or more plots in a visualization window also known as a vis window Examples of plots include Mesh plots Contour plots and Pseudocolor plots Plots take as input one or more mesh material scalar or tensor variables It is possible to modify the variables by applying one or more operators to the variables before passing them t
92. e Specified Sphere SpecifiedBox stepLength float 1 0 max Time float 10 0 pointSource tuple of 0 0 0 0 0 0 float lineStart tuple of 0 0 0 0 0 0 float lineEnd tuple of 1 0 0 0 0 0 float planeOrigin tuple of 0 0 0 0 0 0 float planeNormal tuple of 0 0 0 0 1 0 float planeUpAxis tuple of 0 0 1 0 0 0 float planeRadius float 1 0 sphereOrigin tuple of 0 0 0 0 0 0 float sphereRadius float 1 0 boxExtents tuple of 0 0 1 0 0 0 1 0 0 0 1 0 float pointDensity int 2 displayMethod int Lines Possible values Lines Tubes Ribbons showStart int 1 234 VisIt Python Interface Manual StreamlineAttributes Field Type Default value radius float 0 125 lineWidth int 2 coloringMethod int ColorBySpeed Possible values Solid ColorBySpeed ColorBy Vorticity colorTableName string Default singleColor tuple of int 0 0 0 255 legendFlag int 1 lightingFlag int 1 Description The StreamlineAttributes function is used to create StreamlineAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Streamline plots VisIt Python Interface Manual 235 SubsetAttributes SubsetAttributes SubsetAttributes function and object Synopsis SubsetAttributes gt SubsetAttributes object Returns The SubsetAttributes function returns a SubsetAttributes object Object definition F
93. e passed in Description The EvalCubicSpline function takes in N objects to be blended and blends them using piece wise cubic polynomials and returns the blended value For an example see page 23 72 VisIt Python Interface Manual EvalLinear EvalLinear Interpolates linearly between two values Synopsis EvalLinear t valuel value2 gt f t Arguments t A floating point value in the range 0 1 that represents the distance between the first and last control point in parameterized space valuel Any object that can be used in an arithmetic expression f 0 valuel value2 Any object that can be used in an arithmetic expression f 1 value2 Returns The EvalLinear function returns an interpolated value for t based on the objects that were passed in Description The EvalLinear function linearly interpolates between two values and returns the result Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots c0 GetView3D cl GetView3D cl viewNormal 0 499159 0 475135 0 724629 cl viewUp 0 196284 0 876524 0 439521 nSteps 100 for i in range nSteps t float i float nSteps 1 v EvalLinear t c0 cl Set View3D v VisIt Python Interface Manual 73 EvalQuadratic EvalQuadratic Interpolates between three values using a quadratic polynomial Synopsis EvalQuadratic t c0 c1 c2 g
94. e last view keyframe which is on frame 9 DeleteViewKeyframe 9 Iterate over the animation frames again The view should stay the same for i in range 10 SetTimeSliderState i VisIt Python Interface Manual 65 DeleteWindow DeleteWindow Deletes the active visualization window Synopsis DeleteWindow gt integer Returns The Delete Window function returns an integer value of 1 for success and 0 for failure Description The DeleteWindow function deletes the active visualization window and makes the visualization window with the smallest window index the new active window This function has no effect when there is only one remaining visualization window Example visit cli DeleteWindow Does nothing since there is only one window AddWindow DeleteWindow Deletes the new window 66 VisIt Python Interface Manual DemoteOperator Demot eOperator Moves an operator closer to the database in the visualization pipeline Synopsis DemoteOperator opIndex gt integer DemoteOperator opIndex applyToAllPlots gt integer Arguments opIndex A zero based integer corresponding to the operator that should be demoted applyAll An integer flag that causes all plots in the plot list to be affected when it is non zero Returns DemoteOperator returns 1 on success and 0 on failure Description The DemoteOperator function moves an operator closer to the database in the vi
95. e plots in window 2 ClearAllWindows Clear the plots from all windows VisIt Python Interface Manual 45 ClearPickPoints ClearPickPoints Clears pick points from the visualization window Synopsis ClearPickPoints Returns The ClearPickPoints function does not return a value Description The ClearPickPoints function removes pick points from the active visualization window Pick points are the letters that are added to the visualization window where the mouse is clicked when the visualization window is in pick mode Example visit cli Put the visualization window into pick mode using the popup menu and add some pick points Clear the pick points ClearPickPoints 46 VisIt Python Interface Manual ClearReferenceLines ClearReferenceLines Clears reference lines from the visualization window Synopsis ClearReferenceLines Returns The ClearReferenceLines function does not return a value Description The ClearReferenceLines function removes reference lines from the active visualization window Reference lines are the lines that are drawn on a plot to show where you have performed lineouts Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor d Lineout 3 0 2 0 2 0 4 0 default u v ClearReferenceLines VisIt Python Interface Manual 47 ClearViewKeyframes ClearViewKeyframes Clea
96. eGlobal int 0 samplingOn int 0 numberOfSamplePoints int 50 reflineLabels int 0 Description The LineoutAttributes function is used to create LineoutAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Lineout operators VisIt Python Interface Manual 253 OnionPeelAttributes OnionPeelAttributes OnionPeelAttributes function and object Synopsis OnionPeelAttributes gt OnionPeelAttributes object Returns The OnionPeelAttributes function returns an OnionPeelAttributes object Object definition Field Type Default value adjacencyType int 0 useGloballd int 0 categoryName string Whole subsetName string Whole index tuple of int 1 logical int 0 requestedLayer int 0 Description The OnionPeelAttributes function is used to create OnionPeelAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for OnionPeel operators 254 VisIt Python Interface Manual ProjectAttributes ProjectAttributes ProjectAttributes function and object Synopsis ProjectAttributes gt ProjectAttributes object Returns The ProjectAttributes function returns a ProjectAttributes object Object definition Field Type Default value projectionType int XY Cartesian Possible values XYCartesian ZRCylin drical Description The ProjectAttributes function is used to c
97. ed as background red or background 0000 geometry lt spec gt The portion of the screen to use This is a standard X Windows geome try specification For example 500x500 300 0 indicates an area 500 pixels by 500 pixels 300 pixels to the right of the top left corner noconfig Run without reading any configuration files This can be useful if you run VisIt and encounter unexpected behavior on startup nowin Run without any windows This option may be useful when running scripts small Use a smaller desktop area window size style lt style gt The style to use for the graphical user interface One of windows cde motif or sgi Command Line Options 265 Appendix A File options o lt databasename gt Run VisIt and have it open the specified database s lt scriptname gt Run the specified VisIt script Note that this option only takes effect with the cli option default_format lt format gt Tells VisIt to use the specified database reader plugin when reading files This is a useful option if your data files do not have file extensions since VisIt is able to open the file on the first try instead of having to sequentially try all of its database reader plugins until one of them can successfully open the file To make VisIt use the Silo plugin first to open files add default format Silo to the command line sessionfile lt filename gt Run VisIt and have it open t
98. enames look related Filenames with close matches are grouped as individual time states into a virtual database whose name is based on the more abstract pattern used to create the filenames Opening first file in series wave0000 silo wave0010 silo OpenDatabase usr gapps visit data wave0000 silo Opening a virtual database representing all wave silo files OpenDatabase usr gapps visit data wave silo database 4 4 Opening a remote database VisIt supports running the client on a local computer while also allowing you to process data in parallel on a remote computer If you want to access databases on a remote computer using VisIt s Python Interface the only difference to accessing a database on a local computer is that you must specify a host name as part of the database name Opening a file on a remote computer by giving a host name OpenDatabase thunder usr gapps visit data wave visit 17 4 5 Opening a compute engine Sometimes it is advantageous to open a compute engine before opening a database When you tell VisIt to open a database using the OpenDatabase function VisIt also launches a 14 VisIt Python Interface Manual Quick Recipes 5 0 compute engine and tells the compute engine to open the specified database When the VisIt Python Interface is run with a visible window the Engine Chooser Window will present itself so you can select a host profile If you want to design a script that
99. ent tuple of 0 float contourValue tuple of 0 float max float 1 0 maxFlag int 0 min float 0 0 minFlag int 0 scaling int Linear Possible values Linear Log variable string default Description The IsosurfaceAttributes function is used to create IsosurfaceAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Isosurface operators VisIt Python Interface Manual 251 IsovolumeAttributes IsovolumeAtt ributes lIsovolumeAttributes function and object Synopsis IsovolumeAttributes gt IsovolumeAttributes object Returns The IsovolumeAttributes function returns an IsovolumeAttributes object Object definition Field Type Default value Ibound float le 37 ubound float le 37 variable string default Description The IsovolumeAttributes function is used to create IsovolumeAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Isovolume operators 252 VisIt Python Interface Manual LineoutAttributes LineoutAttributes LineoutAttributes function and operator Synopsis LineoutAttributes gt LineoutAttributes object Returns The LineoutAttributes function returns a LineoutAttributes object Object definition Field Type Default value pointl tuple of 0 0 0 0 0 0 float point2 tuple of 1 0 1 0 0 0 float interactive int 0 ignor
100. esponding to a plot s index in the plot list frame A zero based integer value corresponding to a plot keyframe at a particular animation frame Returns DeletePlotKeyframe does not return a value Description The DeletePlotKeyframe function removes a plot keyframe from a specific plot A plot keyframe is the set of plot attributes at a specified frame Plot keyframes are used to determine what plot attributes will be used at a given animation frame when VisIt s keyframing mode is enabled The plotIndex argument is a zero based integer that is used to identify a plot in the plot list The frame argument is a zero based integer that is used to identify the frame at which a keyframe is to be removed Example visit cli OpenDatabase usr gapps visit data wave visit k GetKeyframeAttributes k enabled k nFrames k nFramesWasUserSet 1 20 1 SetKeyframeAttributes k AddPlot Pseudocolor pressure Set up plot keyframes so the Pseudocolor plot s min will change over time p0 PseudocolorAttributes p0 minFlag p0 min 1 0 0 pl PseudocolorAttributes pl minFlag pl min 1 0 5 SetPlotOptions p0 SetTimeSliderState 19 SetPlotOptions p1 SetTimeSliderState 0 DrawPlots ListPlots Iterate over all animation frames and wrap around to the first one for i in list range TimeSliderGetNStates 0 SetTimeSliderState i Delete the plot keyframe at frame 19 so the mi
101. et the attributes for Threshold operators Visit Python Interface Manual 261 TransformAttributes TransformAttributes transformAttributes function and object Synopsis TransformAttributes gt TransformAttributes object Returns The TransformAttributes function returns a TransformAttributes object Object definition Field Type Default value doRotate int 0 doScale int 0 doTranslate int 0 rotateAmount float 0 0 rotateAxis tuple of 0 0 0 0 1 0 float rotateOrigin tuple of 0 0 0 0 0 0 float rotateType int 0 scaleOrigin tuple of 0 0 0 0 0 0 float scaleX float 1 0 scaleY float 1 0 scaleZ float 1 0 translateX float 0 0 translate Y float 0 0 translateZ float 0 0 Description The TransformAttributes function is used to create TransformAttributes objects that can be fed to the SetOperatorOptions function in order to set the attributes for Transform operators 262 VisIt Python Interface Manual Appendix A Appendix A VisIt Command Line Options A 1 Command Line Options The command line options are listed after the visit command when starting VisIt visit options The options are listed below grouped by functionality and listed alphabetically within a group The order in which these options are specified is unimportant visit cli beta is the same as visit beta cli Arguments to visit script Program options Additional programs
102. et to a non zero value Example visit cli SetWindowLayout 4 HideToolbars 1 ShowToolbars Show the toolbars for all windows ShowToolbars 1 184 VisIt Python Interface Manual Source Source Executes the specified Python script Synopsis Source filename Returns The Source function does not return a value Description The Source function reads in the contents of a text file and interprets it with the Python interpreter This is a simple mechanism that allows simple scripts to be included in larger scripts The Source function takes a single string argument that contains the name of the script to execute Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots include another script that does some animation Source Animate py VisIt Python Interface Manual 185 TimeSliderGetNStates TimeSliderGetNStates Returns the number of time states for the active time slider Synopsis TimeSliderGetNStates gt integer Returns Returns an integer containing the number of time states for the current time slider Description The TimeSliderGetNStates function returns the number of time states for the active time slider Remember that the length of the time slider does not have to be equal to the number of time states in a time varying database because of database correlations and keyframing If you want to ite
103. ferenceLines cc eee enn e teens 47 ClearViewKeyframes 27 40 84 ci aeeen da de ave datada das 48 CONE WANG OW Si ik a ea ace She ate kee ee alla ee hoes a eae tae 49 CloseComputeEngine ies is anally Peas a a vse OS pew eee 50 CloseDatabase iras 9 0 2509 A A AW AA ARE TA 51 Color Fable Names act veces Ok a tute a rd IER naa al Dos ads o 52 COPY A A ew tinea brea daa eed eam by ns dike AR ees 53 CreateAnnotationObject n suenan annaua da Ros 54 CreateDatabaseCorrelation ga ina a een RR 55 DefineExpr ssioD eode it r A Geen BEE ee eee eee ee 57 DelconifyAllWindows 10102 AC DAA A DAA 2 RA HO 58 GLEE PLOUS iaa A ds A ATA 59 DeleteDatabaseCorrelati0od oo oooooooor e teens 60 Delete xpression cera sea ee eG ee ied weet aie ai tates 61 DeletePlotDatabase eyframe muri 62 DeletePlotRe yiramie a oN e e Jar RS itl 63 DeleteV ew Keyitame cta fee Soe eee E ee eee 65 Delete Window is dose eece ee ae as ccs ae beh Goa A Se ANNs ee BEN a 66 DemoteOperator 2 052 see are dtheotehiasea da atada UE 67 DiSADlER GOA Wi A ace seat Ghats ars Gee ee ee cen als a ae tw is 68 Draw Plots esi seess sat ee eee a dak ok ase Se LR sete e eas thos ne lente ans fools 3 69 Enable TOO Ms 45st A TA a Payee awd ayaa 70 BVal ubiGiec iy i259 sat the NA LIED pe id oN AEE 220 naa 7 a DD es 71 EyalCubicSpline 4 oc sci ater tien etdets ti te En 12 Evaline amsa a a a 9G 4 De eke ee ow E wre 73 EValQuadrati ii hn BU Se i ae Sine BD Sa a Sah ee Mie Sis
104. ff 210 VisIt Python Interface Manual SILRestriction Description Method Description UsesAllData gt int UsesData setindex gt int Arguments setindex An integer index into the list of sets Returns whether or not the SIL restriction uses all of its sets The UsesData method allows you to query the SIL restriction to see whether or not it uses a specific set If the specified set is used the method returns 1 otherwise 0 is returned Wholes gt tuple of int The Wholes method returns a tuple of inte gers containing the indices of the top sets that are stored in the simulation The SILRestriction function is used to create SILRestriction objects based on the active plot in the plot list A SIL restriction is can be thought of as a list of on off values for each set in the SIL VisIt uses SIL restrictions to determine which subsets are actually plotted in a visualization You can use a SILRestriction object to turn off sets that you do not want to see in the visualization Example visit cli OpenDatabase usr gapps visit data multi_rect2d silo AddPlot FilledBoundary AddPlot Subset s mat 1 domains SubsetAttributes s wireframe s lineWidth 1 2 SetPlotOptions s DrawPlots ToggleMaintainViewMode Select both plots so we can set both of their SIL restrictions SetActivePlots 0 1 s SILRestriction Iterate thro
105. fields the Python interpreter will throw an exception In addition to being able to set the value of each field directly all objects provide Set Get methods which can be used to assign values into a field These Set Get methods are not covered except to say that if you have an object called FOO and a field called BAR the Set Get methods would be of the form FOO SetBAR value FOO GetBAR gt value VisIt Python Interface Manual 243 BoxAttributes BoxAttributes BoxAttributes function and object Synopsis BoxAttributes gt BoxAttributes object Returns The BoxAttributes function returns a BoxAttributes object Object definition Field Type Default value amount int 0 maxx float 1 0 maxy float 1 0 maxz float 1 0 minx float 0 0 miny float 0 0 minz float 0 0 Description The BoxAttributes function is used to create BoxAttributes objects that can be fed to the SetOper atorOptions function in order to set the attributes for Box operators 244 VisIt Python Interface Manual ClipAttributes ClipAttributes ClipAttributes function and object Synopsis ClipAttributes gt ClipAttributes object Returns The ClipAttributes function returns a ClipAttributes object Object definition Field Type Default value center tuple of 0 0 0 0 0 0 float funcType int Plane Possible values Plane Sphere plane 1 Normal tuple of 1 0 0 0 0
106. for failure Description VisIt s visualization windows can be arranged in various tiled patterns that allow VisIt to make good use of the screen while displaying several visualization windows The window layout deter mines how windows are shown on the screen The SetWindowLayout function sets the window layout The layout argument is an integer value equal to 1 2 4 8 9 or 16 Example visit cli SetWindowLayout 2 switch to 1x2 layout SetWindowLayout 4 switch to 2x2 layout SetWindowLayout 8 switch to 2x4 layout VisIt Python Interface Manual 181 SetWindowMode Set WindowMode Sets the window mode of the active visualization window Synopsis SetWindowMode mode Arguments 39 66 99 66 mode A string containing lineout navigate pick or zoom Returns The SetWindowMode function does not return a value Description VisIt s visualization windows have various window modes that alter their behavior Most of the time a visualization window is in navigate mode which changes the view when the mouse is moved in the window The zoom mode allows a zoom rectangle to be drawn in the window for changing the view The pick mode retrieves information about the plots when the mouse is clicked in the window The lineout mode allows the user to draw lines which produce curve plots Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlo
107. function has a wide variety of possible arguments The list of queries can be found in the Vis t User s Manual in the Quantitative Analysis chapter You can get also get a list of queries that can be executed over time using the QueriesOverTime function Example visit cli OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots for q in QueriesOverTime QueryOverTime q ResetView VisIt Python Interface Manual 137 RecenterView RecenterView Recalculates the view for the active visualization window so that its plots are centered in the window Synopsis RecenterView Returns The RecenterView function does not return a value Description After adding plots to a visualization window or applying operators to those plots it is sometimes necessary to recenter the view When the view is recentered the orientation does not change but the view is shifted to make better use of the screen Example OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots OpenDatabase usr gapps visit data curv3d silo AddPlot Pseudocolor d DrawPlots RecenterView 138 VisIt Python Interface Manual RedrawWindow RedrawWindow Enables redraws and forces the active visualization window to redraw Synopsis RedrawWindow Returns The RedrawWindow function returns 1 on success and 0 on failure
108. g case would cause the interpreter to use multiple identifiers and cause problems that you might not expect Identifiers can be used to refer to any type of object since Python is flexible in its treatment of types Data types Python supports a wide variety of data types and allows you to define your own data types readily Most types are created from a handful of building block types such as integers floats strings tuples lists and dictionaries 5 1 Strings Python has built in support for strings and you can create them using single quotes or double quotes You can even use both types of quotes so you can create strings that include quotes in case quotes are desired in the output Strings are sequence objects and support operations that can break them down into characters s using single quotes s2 using double quotes s3 nesting the spiffy double quotes 5 2 Tuples Python supports tuples which can be thought of as a read only set of objects The members of a tuple can be of different types Tuples are commonly used to group multiple related items into a single object that can be passed around more easily Tuples support a number of operations You can subscript a tuple like an array to access its individual members You can easily determine whether an object is a member of a tuple You can VisIt Python Interface Manual Python 6 0 iterate over a tuple There are many more uses for tuples
109. gapps visit data globe silo AddPlot Contour u AddPlot Pseudocolor w DrawPlots DisableRedraw AddOperator Slice Set the slice operator attributes Redraw now that th operator attributes are set This will prevent 1 redraw RedrawWindow 68 VisIt Python Interface Manual DrawPlots DrawP lot s Draws any new plots Synopsis DrawPlots gt integer Returns The DrawPlots function returns an integer value of 1 for success and 0 for failure Description The DrawPlots function forces all new plots in the plot list to be drawn Plots are added and then their attributes are modified Finally the DrawPlots function is called to make sure all of the new plots draw themselves in the visualization window This function has no effect 1f all of the plots in the plot list are already drawn Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots Draw the new pseudocolor plot VisIt Python Interface Manual 69 EnableTool EnableTool Sets the enabled state of an interactive tool in the active visualization window Synopsis EnabledTool toolIndex activeFlag Arguments toolIndex This is an integer that corresponds to an interactive tool Line tool 0 Plane tool 1 Sphere tool 2 activeFlag A value of 1 enables the tool while a value of 0 disables the tool Returns
110. h we want pick information variables A tuple of strings containing the names of the variables for which we want pick information Returns PickByGlobalZone returns 1 on success and 0 on failure Description The PickByGlobalZone function tells VisIt to perform pick using a specific global cell index for the entire problem Some meshes are broken up into smaller domains and then these smaller domains can employ a global indexing scheme to make it appear as though the mesh was still one large mesh Not all meshes that have been decomposed into domains provide sufficient informa tion to allow global cell indexing You can use the GetPickOutput function to retrieve a string con taining the pick information once you ve called PickByGlobalZone Example visit cli OpenDatabase usr gapps visit data multi_curv2d silo AddPlot Pseudocolor d DrawPlots Pick on cell 200 in the first domain PickByGlobalZone 200 print Last pick GetPickOutput 128 VisIt Python Interface Manual PickByNode PickByNode Performs pick operation for a specific node in a given domain Synopsis PickByNode node gt integer PickByNode node variables gt integer PickByNode node domain gt integer PickByNode node domain variables gt integer Arguments node Integer index of the node for which we want pick information domain An integer representing the index of the domain that con
111. he EvalCubic function returns the interpolated value for t taking into account the control points that were passed in Description The EvalCubic function takes in four objects and blends them using a cubic polynomial and returns the blended value Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots v0 GetView3D rotate the plots vl GetView3D rotate the plots again v2 GetView3D rotate the plots one last time v3 GetView3D Fly around the plots using the views that have been specified nSteps 100 for i in range nSteps t float i float nSteps 1 newView EvalCubic t v0 v1 v2 v3 SetView3D newView VisIt Python Interface Manual 71 EvalCubicSpline EvalCubicSp1line Interpolates between N values using piece wise cubic splines Synopsis EvalCubicSpline t weights values gt f t Arguments t A floating point value in the range 0 1 that represents the distance from the first control point to the last control point weights A tuple of N floating point values in the range 0 1 that represent how far along in parameterized space the values will be located values A tuple of N objects to be blended Any objects that can be used in arithmetic expressions can be passed Returns The EvalCubicSpline function returns the interpolated value for t considering the objects that wer
112. he GetPipelineCachingMode function returns 1 if pipelines are being cached and 0 otherwise Description The GetPipelineCachingMode function returns whether or not pipelines are being cached in the viewer For animations of long time sequences it is often useful to turn off pipeline caching so the viewer does not run out of memory Example Jovisit cli offon off on print Pipeline caching is s offon GetPipelineCachingMode VisIt Python Interface Manual 97 GetQueryOutput GetQueryOutput Returns information about the last query Synopsis GetQueryOutputString gt string GetQueryOutputValue gt double tuple of doubles Returns GetQueryOutputString returns a string GetQueryOutputValue returns a single double precision number or a tuple of double precision numbers Description Both the GetQueryOutputString and GetQueryOutput Value functions return information about the last query to be executed but the type of information returns differs GetQueryOutputString returns a string containing the output of the last query GetQueryOutputValue returns a single number or tuple of numbers depending on the nature of the last query to be executed Example visit cli OpenDatabase usr gapps visit data rect2d silo AddPlot Pseudocolor d DrawPlots Query MinMax print GetQueryOutputString print The min is g and the max is g
113. he specified session file which will cause VisIt to restore its state to what is stored in the session file This argu ment is only valid with the gui or movie arguments Debugging options debug lt level gt Run with lt level gt levels of output logging lt level gt must be between 1 and 5 A debug level of 1 provides the least amount of out put logging while a debug level of 5 provides the most output logging timing Run with timings Timings are provided for the execution of each major portion of the execution pipeline on the viewer and each engine process Timing information for launch time is also provided for the gui and viewer processes dump This argument causes VisIt to write VTK files for each stage of the exe cution pipeline so you can see the output of each VTK filter verbose This argument causes VisIt s CLI to print out the stages of execution for its compute engine to the console 266 Command Line Options A ActivateDatabase 36 AddArgument 30 Adding operators 18 AddOperator 18 37 AddPlot 15 38 AddWindow 39 AlterDatabaseCorrelation 40 AnnotationAttributes 196 B BoundaryAttributes 220 BoxAttributes 244 C CheckForNewStates 42 ChooseCenterOfRotation 43 ClearAllWindows 45 ClearCache 44 ClearCacheForAllEngines 44 ClearReferenceLines 47 ClearViewKeyframes 48 ClearWindow 45 ClipAttributes 245 Close 31 CloseComputeEngine 50 CloseDatabase 51
114. ield Type Default value colorType int 1 colorTableName string Default filledFlag int 1 legendFlag int 1 lineStype int 0 line Width int 0 singleColor tuple ofint 0 0 0 255 subsetType int Unknown Possible values Domain Group Mate rial Unknown opacity float 1 0 wireframe int 0 drawInternal int 0 smoothingLevel int 0 pointSize float 0 05 pointType int Box Possible values Box Axis Icosahedron Point pointSize VarEnabled int 0 pointSize Var string default Description The SubsetAttributes function is used to create SubsetAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Subset plots 236 VisIt Python Interface Manual SurfaceAttributes SurfaceAttributes SurfaceAttributes function and object Synopsis SurfaceAttributes gt SurfaceAttributes object Returns The SurfaceAttributes function returns a SurfaceAttributes object Object definition Field Type Default value colorByZFlag int 1 colorTableName string Default legendFlag int 1 lightingFlag int 1 limitsMode int OriginalData Possible values OriginalData Current Plot lineStyle int 0 lineWidth int 0 max 1 0 maxFlag int 0 min 0 0 minFlag int 0 scaling int Linear Possible values Linear Log Skew skewFactor float 1 0 surfaceColor tuple of int 0 0 0 255 surfaceFlag int 1 wireframeColor tuple of int 0 0 0 255
115. ight direction 0 1 0 light color 255 0 0 255 SetLight 0 light light color light direction 0 255 0 255 1 0 0 SetLight 1 light VisIt Python Interface Manual 163 SetMaterialAttributes SetMaterialAttributes Sets Vislts material interface reconstruction options Synopsis se se Arguments tMaterialAttributes atts gt integer tDefaultMaterialAttributes atts gt integer atts A MaterialAttributes object containing the new settings Returns Both functions return 1 on success and 0 on failure Description The SetMaterialAttributes function takes a MaterialAttributes object and makes VisIt use the material settings that it contains You use the SetMaterialAttributes function when you want to change how VisIt performs material interface reconstruction The SetDefaultMaterialAttributes function sets the default material attributes which are saved to the config file and are also used by new visualization windows Example visit cli OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar p PseudocolorAttributes p min p minFlag 4 0 1 p max p maxFlag 13 0 1 SetPlotOptions p DrawPlots Tell VisIt to always do material interface reconstruction m GetMaterialAttributes m forceMIR 1 SetMaterialAttributes m ClearWindow Redraw the plot forcing VisIt to use the mixed variable informat
116. ilo AddPlot Pseudocolor u DrawPlots AddOperator Slice a SliceAttributes a normal a upAxis 0 0 1 0 1 0 SetOperatorOptions a ResetOperatorOptions Slice 144 VisIt Python Interface Manual ResetPickLetter ResetPickLetter Resets the pick marker letter back to A Synopsis ResetPickLetter gt integer Returns ResetPickLetter returns 1 on success and 0 on failure Description The ResetPickLetter function resets the pick marker back to A so that the next pick will use A as the pick letter and then B and so on VisIt Python Interface Manual 145 ResetPlotOptions ResetPlotOptions Resets plot attributes back to the default values Synopsis Arguments Returns ResetPlotOptions plotType plotType The ResetPlotOptions function returns an integer value of 1 for success and 0 for failure Description The ResetPlotOptions function resets the plot attributes of the specified plot type for the selected plots back to the default values The plotType argument is a string containing the name of the type of plot whose attributes are to be reset Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots p PseudocolorAttributes p colorTableName calewhite p minFlag p maxFlag 1 1 p min p max 5 0 8 0 SetPlotOptions p ResetPlotOptions P
117. indowCoords tuple of 0 0 1 0 0 0 1 0 float Description The View2DAttributes function is used to create View2DAttributes objects that are used to set the 2D view using the SetView2D function Note that View2DAttributes can be used in arithmetic expressions so you can add views together multiply them by a scale factor etc You can even interpolate views e g viewO 1 t viewl t Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots v View2DAttributes xmin ymin 0 5 0 5 v viewportCoords xmin 0 95 ymin 0 95 v windowCoords 5 0 0 0 1 02 5 9 SetView2D v Visit Python Interface Manual 213 View3DAttributes View3DAttributes View3DAttributes and function Synopsis View3DAttributes gt View3DAttributes object Returns The View3DAttributes function returns a View3DAttributes object Object definition Field Type Default value viewNormal tuple of 0 0 1 float focus tuple of 0 0 0 float viewUp tuple of 0 1 0 float viewAngle float 30 0 parallelScale float 0 5 nearPlane float 0 5 farPlane float 0 5 imagePan tuple of 0 0 0 0 float imageZoom float 1 0 perspective int 1 eyeAngle float 2 0 centerOfRotationSet int 0 centerOfRotation tuple of 0 0 0 0 0 0 float Description The View3DAttributes function is used to create View
118. ins Example visit cli print The number of operator plugins is NumOperatorPlugins print The names of the plugins are OperatorPlugins VisIt Python Interface Manual 119 NumPlotPlugins NumP lotPlugins Returns the number of available plot plugins Synopsis NumPlotPlugins gt integer Returns The NumPlotPlugins function returns an integer Description The NumPlotPlugins function returns the number of available plot plugins Example visit cli print The number of plot plugins is NumPlotPlugins print The names of the plugins are PlotPlugins 120 VisIt Python Interface Manual OpenDatabase OpenComput eEngine Opens a compute engine on the specified computer Synopsis OpenComputeEngine gt integer OpenComputeEngine hostName gt integer OpenComputeEngine hostName simulation gt integer OpenComputeEngine hostName args gt integer Arguments hostName The name of the computer on which to start the engine args Optional tuple of command line arguments for the engine Returns The OpenComputeEngine function returns an integer value of 1 for success and 0 for failure Description The OpenComputeEngine function is used to explicitly open a compute engine with certain prop erties When a compute engine is opened implicitly the viewer relies on sets of attributes called host profiles Host profiles determine how compute
119. ins documentation for over two hundred functions and several dozen extension object types Learning to combine the right functions in order to accomplish a visualization task without guidance would involve hours of trial and error To maximize productivity and start creating visualizations using Visit s Python Interface as fast as possible this chapter provides some common patterns or quick recipes that you can combine to quickly create complex scripts How to start The most important question when developing a script is Where do I start You can either use session files that you used to save the state of your visualization to initialize the plots before you start scripting or you can script every aspect of plot initialization 2 1 Using session files VisIt s session files contain all of the information required to recreate plots that have been set up in previous interactive VisIt sessions Since session files contain all of the information about plots etc they are natural candidates to make scripting easier since they can be used to do the hard part of setting up the complex visualization leaving the bulk of the script to animate through time or alter the plots in some way To use session files within a script use the RestoreSession function documented on page 148 Import a session file from the current working directory RestoreSesssion my_visualization session 0 Now that VisIt has restored the session ani
120. ins function The variable that you pass to the AddPlot function must be a valid variable for the open database New plots are not realized meaning that they have not been submitted to the compute engine for processing If you want to force VisIt to process the new plot you must call the DrawPlots function Names of all available plot plugins print PlotPlugins Create plots AddPlot Pseudocolor pressure AddPlot Mesh quadmesh Draw the plots DrawPlots 5 2 Plotting materials Plotting materials is a common operation in VisIt The Boundary and FilledBoundary plots enable you to plot material boundaries and materials respectively Plot material boundaries VisIt Python Interface Manual 15 Quick Recipes AddPlot Boundary mat1 Plot materials AddPlot FilledBoundary mat1 5 3 Setting plot attributes Each plot type has an attributes object that controls how the plot generates its data or how it looks in the visualization window The attributes object for each plot contains different fields You can view the individual object fields by printing the object to the console Each plot type provides a function that creates a new instance of one of its attribute objects The function name is always of the form plotname Attributes For example the attributes object creation function for the Pseudocolor plot would be PseudocolorAttributes To change the at
121. ints A B C D then the pattern of repetition is ABCDABCDABCD Discrete color tables are mainly used for plots that have a discrete set of items to display e g Subset plot Continuous color tables are used in plots that display a continu ous range of values e g Pseudocolor Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Contour hgslice DrawPlots SetActiveDiscreteColorTable levels VisIt Python Interface Manual 151 SetActivePlots SetActiveP lot s Sets the active plots in the plot list Synopsis SetActivePlots plots gt integer Arguments plots A tuple of integer plot indices starting at zero Returns The SetActivePlots function returns an integer value of 1 for success and O for failure Description Any time VisIt sets the attributes for a plot it only sets the attributes for plots which are selected The SetActivePlots function must be called to set the active plots The function takes one argument which is a tuple of integer plot indices that start at zero If only one plot is being selected the plots argument can be an integer instead of a tuple Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Subset mat1 AddPlot Mesh mesh1 AddPlot Contour u DrawPlots SetActivePlots 0 1 2 Make all plots active SetActivePlots 0 Make only the Subset plot act
122. ion DrawPlots 164 VisIt Python Interface Manual SetOperatorOptions SetOperatorOptions Sets the attributes for an operator Synopsis SetOperatorOptions atts gt integer SetOperatorOptions atts activelndex all gt integer SetOperatorOptions atts all gt integer SetDefaultOperatorOptions atts gt integer Arguments atts Any type of operator attributes object activelndex An optional zero based integer that serves as an index into the selected plot s operator list Use this argument if you want to set the operator attributes for a plot that has multiple instances of the same type of operator all An optional integer argument that tells the function to apply the operator attributes to all plots containing the specified operator if the value of the argument is non zero Returns All functions return an integer value of 1 for success and 0 for failure Description Each operator in VisIt has a group of attributes that controls the operator To set the attributes for an operator first create an operator attributes object This is done by calling a function which is the name of the operator plus the word Attributes For example a Slice operator s operator attributes object is created and returned by the SliceAttributes function Assign the new operator attributes object into a variable and set its fields After setting the desired fields in the operator attrib
123. ion method Correlation method Value IndexForIndexCorrelation 0 StretchedIndexCorrelation 1 TimeCorrelation 2 CycleCorrelation 3 Each database correlation has its own time slider that can be used to set the time state of databases that are part of a database correlation Individual time varying databases have their own trivial database correlation consisting of only 1 database When you call the CreateDatabaseCorrelation function VisIt creates a new time slider with the same name as the database correlation and makes it be the active time slider Example visit cli dbs usr gapps visit data dbA00 pdb usr gapps visit data dbB00 pdb OpenDatabase dbs 0 VisIt Python Interface Manual 55 CreateDatabaseCorrelation AddPlot FilledBoundary material mesh OpenDatabase dbs 1 AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 Creating a new database correlation also creates a new time slider and makes it be active w GetWindowInformation print Active time slider s w timeSliders w activeTimeSlider Animate through time using the common database correlation s time slider for i in range TimeSliderGetNStates SetTimeSliderState i 56 VisIt Python Interface Manual DefineExpression DefineExpression Creates a expression variable
124. irect mechanism for passing data to the compute engine see Figure 1 1 If you want to write a script that generates simulation data and have that script pass data to the compute engine you must pass the data through a file on disk The VisIt Python Interface comes packaged in two varieties the extension module and the Command Line Interface CLI The extension module version of the VisIt Python Interface is imported into a standard Python 2 1 2 interpreter using the import directive VisIt s command line interface CLI is essentially a Python interpreter where the VisIt VisIt Python Interface Manual Introduction to Vislt Python Interface is built in The CLI is provided to simplify the process of running Vislt Python scripts Scripts Python interpreter VisIt module Local computer XA AA A AA AA ALA AAA A H Remote computer Database server Parallel Compute Engine Figure 1 1 Vislt s architecture 4 0 Starting VisIt You can invoke VisIt s command line interface from the command line by typing visit cli For a complete list of the command line options see Appendix A on page 263 It is best to have VisIt in your default search path instead of specifying the absolute path to VisIt when starting it This isn t important when VisIt is run locally but VisIt may not run properly in a distributed manner if it isn t in your default search path on all the machines on which you plan to run Visi
125. is not a valid database correlation then the AlterDatabaseCorrela tion function fails The databases argument is a list or tuple of string objects containing the fully qualified host path filename names of the databases to be involved in the database query The method argument allows you to specify a database correlation method Correlation method Value IndexForIndexCorrelation 0 StretchedIndexCorrelation 1 TimeCorrelation 2 CycleCorrelation 3 dbs usr gapps visit data wave visit usr gapps visit data wave silo database OpenDatabase dbs 0 AddPlot Pseudocolor pressure OpenDatabase dbs 1 AddPlot Pseudocolor d VisIt created an index for index database correlation but we want a cycle correlation AlterDatabaseCorrelation Correlation01 dbs 3 40 VisIt Python Interface Manual ChangeActivePlotsVar ChangeActivePlotsVar Changes the variable for the active plots Synopsis ChangeActivePlotsVar variableName gt integer Arguments variableName The name of the new plot variable Returns The ChangeActivePlotsVar function returns an integer value of 1 for success and 0 for failure Description The ChangeActivePlotsVar function changes the plotted variable for the selected plots This is a useful way to change what is being visualized without having to delete and recreate the current plots The variableName argument is a string tha
126. ive 152 VisIt Python Interface Manual SetActiveTimeSlider SetActiveTimeS1l1ider Sets the active time slider Synopsis SetActiveTimeSlider tsName gt integer Arguments tsName A string containing the name of the time slider that should be made active Returns SetActiveTimeSlider returns 1 on success and 0 on failure Description Sets the active time slider which is the time slider that is used to change time states Example visit cli path usr gapps visit data dbs path dbA00 pdb path dbB00 pdb path dbC00 pdb for db in dbs OpenDatabase db AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 tsNames GetWindowInformation timeSliders for ts in tsNames SetActiveTimeSlider ts for state in list range TimeSliderGetNStates 0 SetTimeSliderState state VisIt Python Interface Manual 153 SetActive Window SetActiveWindow Sets the active visualization window Synopsis SetActiveWindow windowIndex gt integer Arguments windowIndex An integer window index starting at 1 Returns The SetActiveWindow fucntion returns an integer value of 1 for success and 0 for failure Description Most of the functions in the VisIt Python Interface operate on the contents of the active window If there is more than one window it is very important to be able to set the active wi
127. l subsets in the SIL so if you called the TurnMaterialsOff function with no arguments all materials would be turned off Calling TurnMaterialsOn with no arguments would turn all materials on All functions can also take a string argument which is the name of the set to modify For example you could turn off domain 0 by calling the TurnDomain sOff with a single argument of domain0 or the appropriate set name All of the Turn functions can also be used to modify more than one set if you provide a tuple of set names After you use the Turn functions to change the SIL restriction you might want to call the ListMaterials or ListDo mains functions to make sure that the SIL restriction was actually modified Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots TurnMaterials0Off 4 Turn off material 4 TurnMaterials0ff 1 2 Turn off materials 1 and 2 TurnMaterialsOn Turn on all materials VisIt Python Interface Manual 19 UndoView UndoView Restores the previous view Synopsis UndoView Returns The UndoView function does not return a value Description When the view changes in the visualization window it puts the old view on a stack of views The UndoView function restores the view on top of the stack and removes it This allows the user to undo up to ten view changes Example visit cli OpenDatabase
128. layDatabase OverlayDatabase Creates new plots based on current plots but with a new database Synopsis OverlayDatabase databaseName gt integer Arguments databaseName A string containing the name of the new plot database Returns The OverlayDatabase function returns an integer value of 1 for success and 0 for failure Description VisIt has the concept of overlaying plots which in the nutshell means that the entire plot list is copied and a new set of plots with exactly the same attributes but a different database is appended to the plot list of the active window The OverlayDatabase function allows the VisIt Python Inter face to overlay plots OverlayDatabase takes a single string argument which contains the name of the database After calling the OverlayDatabase function the plot list is larger and contains plots of the specified overlay database Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots OverlayDatabase riptide usr gapps visit data curv3d silo VisIt Python Interface Manual 125 Pick Pick Performs a zonal pick on a plot Synopsis Pick point gt integer Pick point variables gt integer Pick sx sy gt integer Pick sx sy variables gt integer ZonePick point gt integer ZonePick point variables gt integer ZonePick sx sy gt integer ZonePick sx sy variables gt integer Arguments
129. le name and set the fields in the object Each object has its own set of fields To see the available fields in an object print the name of the variable at the Python prompt and press the Enter key This will print the contents of the object so you can see the fields contained by the object After setting the appropriate fields pass the object to either the SetPlotOptions function or the SetOperatorAttributes function Example OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddOperator Slice p PseudocolorAttributes p colorTableName rainbow p opacity 0 5 SetPlotOptions p a SliceAttributes a originType a Point a normal a upAxis 1 1 1 1 1 1 SetOperatorOptions a DrawPlots That s all there is to creating a plot using VisIt s Python Interface For more information on creating plots and performing specific actions in VisIt refer to the documentation for each function later in this manual 4 VisIt Python Interface Manual Chapter 2 Python 1 0 Overview Python is a general purpose interpreted extensible object oriented scripting language that was chosen for VisIt s scripting language due to its ease of use and flexibility VisIt s Python interface was implemented as Python module and it allows you to enhance your Python scripts with coding to control VisIt This chapter explains some of Python s syntax so it will be more familiar when y
130. le of plot plugin names Synopsis PlotPlugins gt tuple of strings Returns The PlotPlugins function returns a tuple of strings Description The PlotPlugins function returns a tuple of strings that contain the names of the loaded plot plu gins This can be useful for the creation of scripts that alter their behavior based on the available plot plugins Example visit cli for plugin in PluginPlugins print The s plot plugin is loaded plugin VisIt Python Interface Manual 131 PrintWindow PrintWindow Prints the active visualization window Synopsis PrintWindow gt integer Returns The PrintWindow function returns an integer value of 1 for success and 0 for failure Description The PrintWindow function tells the viewer to print the image in the active visualization window using the current printer settings Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor d AddPlot Contour u DrawPlots PrintWindow 132 VisIt Python Interface Manual PromoteOperator PromoteOperator Moves an operator closer to the end of the visualization pipeline Synopsis PromoteOperator opIndex gt integer PromoteOperator opIndex applyToAllPlots gt integer Arguments opIndex A zero based integer corresponding to the operator that should be promoted applyAll An integer flag that causes a
131. ll plots in the plot list to be affected when it is non zero Returns PromoteOperator returns 1 on success and 0 on failure Description The PromoteOperator function moves an operator closer to the end of the visualization pipeline This allows you to change the order of operators that have been applied to a plot without having to remove them from the plot For example consider moving a Slice to after a Reflect operator when it had been the other way around Changing the order of operators can result in vastly different results for a plot The opposite function is DemoteOperator see page 67 Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hardyglobal AddOperator Slice s s s s s s SliceAttributes project2d 0 originPoint 0 5 0 originType s Point normal 0 1 0 upAxis 1 0 0 SetOperatorOptions s AddOperator Reflect DrawPlots Now slice after reflect We ll only get 1 slice plane instead of 2 PromoteOperator 0 DrawPlots VisIt Python Interface Manual 133 Queries Queries Returns a tuple containing the names of all supported queries Synopsis Queries gt tuple of strings Returns The Queries function returns a tuple of strings Description The Queries function returns a tuple of strings that contain the names of all of VisIt s supported queries Example visit cli print s
132. lot FilledBoundary mat1 DrawPlots v GetView3D v viewNormal 0 618945 0 450655 0 643286 v viewUp 0 276106 0 891586 0 358943 SetView3D v mats GetMaterials nmats len mats Turn off all but the last material in sequence and watch the view update each time for i in range nmats 1 index nmats 1 i TurnMaterialsOff mats index SaveWindow SetViewExtentsType original 178 VisIt Python Interface Manual SetViewKeyframe SetViewKey frame Adds a view keyframe Synopsis SetViewKeyframe gt integer Returns The SetViewKeyframe function returns 1 on success and 0 on failure Description The Set ViewKeyframe function adds a view keyframe when VisIt is in keyframing mode View keyframes are used to set the view at crucial points during an animation Frames that lie between view keyframes have an interpolated view that is based on the view keyframes You can use the SetViewKeyframe function to create complex camera animations that allow you to fly around or through your visualization Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Contour hardyglobal DrawPlots k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFramesWasUserSet 1 nFrames 1 SetKeyframeAttributes k SetPlotFrameRange 0 0 nFrames 1 SetViewKeyframe SetTimeSliderState 10 v GetView3D
133. lots Functions and Objects The objects described in this reference all have constructor functions which return a new instance of the specific object type The reference page for each object gives both a synopsis of how to use the constructor function and a description of all of the fields and methods that are part of the object Most objects can be modified using a simple assigment of an appropriate Python object into any of its fields When an incompatible value is assigned into one of an object s fields the Python interpreter will throw an exception In addition to being able to set the value of each field directly all objects provide Set Get methods which can be used to assign values into a field These Set Get methods are not covered except to say that if you have an object called FOO and a field called BAR the Set Get methods would be of the form FOO SetBAR value FOO GetBAR gt value VisIt Python Interface Manual 219 BoundaryAttributes BoundaryAttributes BoundaryAttributes function and object Synopsis Boundary Attributes gt BoundaryAttributes object Returns The BoundaryAttributes function returns a BoundaryAttributes object Object definition Object definition Field Type Default value colorType int ColorByMultipleColors Possible values ColorBySingleColor ColorByMultipleColors ColorByColorT able colorTableName string Default filledFlag i
134. lots that need to be colored smoothly by a vari able e g Pseudocolor plot A discrete color table is a set of color control points that are used to color distinct regions of a plot e g Subset plot VisIt supports the notion of default continuous and default discrete color tables so plots can just use the default color table This lets you change the color table used by many plots by just changing the default color table The GetActiveCon tinuousColorTable function returns the name of the default continuous color table The GetActive DiscreteColorTable function returns the name of the default discrete color table Example visit cli print Default continuous color table s GetActiveContinuousColorTable print Default discrete color table s GetActiveDiscreteColorTable 76 VisIt Python Interface Manual GetActiveTimeSlider GetActiveTimeS1ider Returns the name of the active time slider Synopsis GetActiveTimeSlider gt string Returns The GetActiveTimeSlider function returns a string containing the name of the active time slider Description VisIt can support having multiple time sliders when you have opened more than one time varying database You can then use each time slider to independently change time states for each database or you can use a database correlation to change time states for all databases simultaneously Every time varying database has a database co
135. ly the same 9 1 Setting the 2D view The 2D view consists of a rectangular window in 2D space and a 2D viewport in the visualization window The window in 2D space determines what parts of the visualization you will look at while the viewport determines where the images will appear in the visualization window It is not necessary to change the viewport most of the time OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice AddPlot Mesh Mesh2D AddPlot Label hgslice DrawPlots print The current view is GetView2D Get an initialized 2D view object v GetView2D v windowCoords 7 67964 3 21856 2 66766 7 87724 Set View2D v 9 2 Setting the 3D view The 3D view is much more complex than the 2D view For information on the actual meaning of the fields in the View3DAttributes object refer to page 214 or the VisIt User s Manual VisIt automatically computes a suitable view for 3D objects and it is best to initialize new View3DAttributes objects using the GetView3D function so most of the fields will already be initialized The best way to get new views to use in a script is to interactively create the plot and repeatedly call GetView3D after you finish rotating the plots with the mouse You can paste the printed view information into your script and modify it slightly to create sophisticated view transitions OpenDatabase usr gapps visi
136. mate through time for states in range TimeSliderGetNStates VisIt Python Interface Manual 11 Quick Recipes 3 0 SetTimeSliderState state SaveWindow 2 2 Getting something on the screen If you don t want to use a session file to begin the setup for your visualization then you will have to dive into opening databases creating plots and animating through time This is where all of hand crafted scripts begin The first step in creating a visualization is opening a database VisIt provides the OpenDatabase function see page 122 to open a database Once a database has been opened you can create plots from its variables using the AddPlot function see page 38 The AddPlot function takes a plot plugin name and the name of a variable from the open database Once you ve added a plot it is in the new state which means that it has not yet been submitted to the compute engine for processing To make sure that the plot gets drawn call the DrawPlots function Step 1 Open a database OpenDatabase usr gapps visit data wave visit Step 2 Add plots AddPlot Pseudocolor pressure AddPlot Mesh quadmesh Step 3 Draw the plots DrawPlots Step 4 Animate through time and save images for states in range TimeSliderGetNStates SetTimeSliderState state SaveWindow Saving images Much of the time the entire purpose of using VisIt s Python Interface is to create a sc
137. mber of time steps in the open database Description The GetAnimationNumStates function returns the number of time steps in the active window s open database This function will always return 1 unless a visit file was opened as the database When a visit file is opened the GetAnimationNumStates function returns the number of time steps in the time varying database Example visit cli OpenDatabase usr gapps visit data wave visit print Number of time steps d GetAnimationNumStates VisIt Python Interface Manual 79 GetAnnotationAttributes GetAnnotationAttributes Returns an object containing the active visualization Synopsis Returns window s annotation attributes GetAnnotationAttributes gt AnnotationAttributes object The GetAnnotationAttributes function returns an AnnotationAttributes object that contains the annotation settings for the active visualization window Description The GetAnnotationAttributes function returns an AnnotationAttributes object that contains the annotation settings for the active visualization window It is often useful to retrieve the annotation settings and modify them to suit the visualization Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots a GetAnnotationAttributes print a a backgroundMode a BACKGROUNDMODE_GRADIENT a gradientColorl 0 O
138. meAttributes returns 1 on success and 0 on failure Description Use the SetKeyframeAttributes function when you want to change VisIt s keyframing settings You must pass a KeyframeAttributes object which you can create using the GetKeyframeAt tributes function page 88 The KeyframeAttributes object must contain the keyframing settings that you want VisIt to use For example you would use the SetKeyframeAttributes function if you wanted to turn on keyframing mode and set the number of animation frames Example visit cli k GetKeyframeAttributes print k k enabled k nFrames k nFramesWasUserSet 1 100 1 SetKeyframeAttributes k 162 VisIt Python Interface Manual SetLight SetLight Returns a light object containing the attributes for a specified light Synopsis SetLight index light gt integer Arguments index A zero based integer index into the light list Index can be in the range 0 7 light A LightAttributes object containing the properties to use for the specified light Returns SetLight returns 1 on success and 0 on failure Description The SetLight function sets the attributes for a specific light Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor w p PseudocolorAttributes p colorTableName xray SetPlotOptions p DrawPlots InvertBackgroundColor light GetLight 0 print light light enabledFlag 1 l
139. n AOE de 5 CODING ae ele eae em ee a La a e ida DD 6 A tes ee Se Ea E ae 6 Dalal PCS ad E SA A EA 6 Contool HOW cesna eeoa wea eae See 0 ale ass 7 EUACHONS a tes a Ame ees weed ded 9 Quick Recipes How 00 Std Ele cet dust aaa ane ance ela ne ote eee ein as 11 Savia Si ode 12 Working with databases o oooo oo 13 Working with plotS ooooooooo 15 Operator rr dd iia 17 Quantitative OPeratiOOS o oooooooooo ooo eee 19 O ae Sete eet betes ie SS ee 21 O II anita ante atte aie ree E 22 Working with annotations 0 0 0 cece eee 25 Function Reference OVEN EW dada e 29 AddArsume nt ia eseria ak a E o dd a EN es Le os lates 30 Hi ti See 31 Launch 3 a Dr SE Reece A O N S ada 32 LocalNamie space 26 sac pistas en dao a dat a da 33 DG DU SC Vel ce sack E AS A AS 34 Version Avia r ein ee enna ey ba ikea ed ead Sad ee io ia 35 ActivateDatabase wile Sess ews Ae a lee Ba sea es 36 AddOperator eer Bare hh wed PUR Raed a awe Hee ah oR ews 37 PROG IOE A O ad A AE ene Aa de ee al a 38 AAW 1d OW aera heh ee BEE a A EE AEE EERE ORG 39 AlterDatabaseCorrelation 0 0 0 0 00 ccc eee e eee nee 40 ChangeActivePlots Vat cuota nio rape da den ada 41 CEh ckEOrNEWStdtes taa id da 42 ChooseCenterOfRotation o 43 ClearGac henr RA Saw Bas de vena tl 1 eure Cena A 44 CC areas ea EN o Ae de REN OED Ode oe dd a OS 45 ClearPick POInt ws 5 deca Set ese stb tdi Recs ahd eek ta Sats a Ae Sols ws 46 ClearRe
140. n Figure 3 3 Add a time slider in the lower left corner slider CreateAnnotationObject TimeSlider slider height 0 07 26 VisIt Python Interface Manual Quick Recipes Print the options that are available in the time slider object print slider Figure 3 3 Time slider anntoation in lower left corner 10 4 Adding a logo Adding a logo to a visualization is an important part of project identification for movies and other visualizations created with VisIt If you have a logo image file stored in TIFF JPEG BMP or PPM format then you can use it with VisIt as an image annotation see Figure 3 4 Note that this approach can also be used to insert images of graphs plots portraits diagrams or any other form of image data into a visualization Incorporate LLNL logo image llnl jpeg as an annotation image CreateAnnotationObject Image image image llnl jpeg image position 0 02 0 02 Print the other image annotation options print image VisIt Python Interface Manual 27 Quick Recipes Figure 3 4 Image annotation used to incorporate LLNL logo 28 VisIt Python Interface Manual Chapter 4 Function Reference 11 0 Overview This chapter describes all of the non plugin functions that are built into the VisIt Python interface Functions that are added by plugins and functions that exist only to create extension objects are covered in the later object references not this
141. n French is s c colors c Control flow Python like other general purpose programming languages provides keywords that implement control flow Control flow is an important feature to have in a programming VisIt Python Interface Manual 7 Python language because it allows complex behavior to be created using a minimum amount of scripting 6 1 if elif else Python provides if elif else for conditional branching The if statement takes any expression that evaluates to an integer and it takes the if branch if the integer value is 1 other wise it takes the else branch if it is present Example 1 if condition do_something Example 2 if condition do_something else do_something_else Example 3 if condition do_domething elif conditionn do_something_n else do_something_else 6 2 For loop Python provides a for loop that allows you to iterate over all items stored in a sequence object tuples lists strings The body of the for loop executes once for each item in the sequence object and allows you to specify the name of an identifier to use in order to reference the current item Iterating through the characters of a string for c in characters print c Iterating through a tuple for value in VisIt is coolness times 100 print value Iterating through a list for value in VisIt is coolness times 100 print
142. n given a set index VisIt Python Interface Manual 209 SILRestriction Method Description SetsInCategory catname gt tuple of int Arguments catname TopSet gt int The name of a category The name must be in the tuple returned by the Categories method This method returns a tuple of integers con taining the set indices of the sets that belong in the specified category The TopSet method returns the set index of the top set which is the top level set that con tains all of the sets under it Note that a SIL Restriction can have multiple top sets if there is more than one mesh in the data set TurnOffAllQ The TurnOffAll method turns off all sets in the SIL restriction TurnOffSet setindex The TurnOffSet method turns off a specific set and all of that set s subsets in the SIL Arguments restriction setindex An integer index into the list of sets TurnOnAll The TurnOnAll method turns on all sets in the SIL restriction TurnOnSet setindex The TurnOnSet method turns on a specific set and all of that set s subsets in the SIL restric Arguments tion setindex An integer index into the list of sets TurnSet setindex onoff Arguments setindex onoff An integer index into the list of sets An integer that indicates whether the set is on non zero or off zero The TurnSet method allows you to turn a spe cific set and all of its subsets on or o
143. n is used to create LightAttributes objects Once you set the properties for a LightAttributes object you can pass the object to the SetLight function see page 163 to set the properties for one of VisIt s lights Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor w p PseudocolorAttributes p colorTableName xray SetPlotOptions p InvertBackgroundColor DrawPlots L LightAttributes L direction L color 0 1 0 255 0 0 255 SetLight 0 L 202 VisIt Python Interface Manual MaterialAttributes MaterialAttributes MaterialAttributes function and object Synopsis MaterialAttributes gt MaterialAttributes object Returns The MaterialAttributes function returns a MaterialAttributes object Object definition Field Type Default value cleanZonesOnly int 0 forceMIR int 0 need ValidConnectivity int 0 smoothing int 0 useNewMIRAIgorithm int 1 Description The MaterialAttributes function is used to create MaterialAttributes objects which are then used to set material interface reconstruction options using the SetMaterialAttributes function see page 164 Example visit cli OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar p PseudocolorAttributes p min p minFlag 4 0 1 p max p maxFlag 13 0 1 SetPlotOptions p DrawPlots
144. n window and makes it the active window This function can be used to create up to 16 visualization windows After that the AddWindow function has no effect Example import visit visit Launch visit AddWindow Create window 2 visit AddWindow Create window 3 VisIt Python Interface Manual 39 AlterDatabaseCorrelation AlterD Synopsis atabaseCorrelat ion Alters a specific database correlation AlterDatabaseCorrelation name databases method gt integer Arguments name The name argument must be a string object containing the name of the database correlation to be altered databases The databases argument must be a tuple or list of strings containing the fully qualified database names to be used in the database correlation method The method argument must be an integer in the range 0 3 Returns The AlterDatabaseCorrelation function returns 1 on success and 0 on failure Description The AlterDatabaseCorrelation method alters an existing database correlation A database correla tion is a VisIt construct that relates the time states for two or more databases in some way You would use the AlterDatabaseCorrelation function if you wanted to change the list of databases used in a database correlation or if you wanted to change how the databases are related the corre lation method The name argument is a string that is the name of the database correlation to be altered If the name that you pass
145. n won t VisIt Python Interface Manual 63 DeletePlotKeyframe change anymore DeletePlotKeyframe 19 ListPlots SetTimeSliderState 10 64 VisIt Python Interface Manual DeleteViewKeyframe DeleteViewKey frame Deletes a view keyframe at a specified frame Synopsis DeleteViewKeyframe frame Arguments frame A zero based integer value corresponding to a view keyframe at a particular animation frame Returns Delete ViewKeyframe returns 1 on success and 0 on failure Description The Delete ViewKeyframe function removes a view keyframe at a specified frame View keyframes are used to determine what view will be used at a given animation frame when VislIt s keyframing mode is enabled The frame argument is a zero based integer that is used to identify the frame at which a keyframe is to be removed Example visit cli OpenDatabase usr gapps visit data globe silo k KeyframeAttributes k enabled k nFrames k nFramesWasUserSet 1 10 1 SetKeyframeAttributes k AddPlot Pseudocolor u DrawPlots Set some view keyframes SetViewKeyframe vl GetView3D vl viewNormal 0 66609 0 337227 0 665283 vl viewUp 0 157431 0 935425 0 316537 SetView3D v1 SetTimeSliderState 9 SetViewKeyframe ToggleCameraViewMode Iterate over the animation frames to watch the view change for i in list range 10 0 SetTimeSliderState i Delete th
146. ndow To set the active window use the SetActiveWindow function The SetActive Window function takes a single integer argument which is the index of the new active window The new window index must be an integer greater than zero and less than or equal to the number of open windows Example visit cli SetWindowLayout 2 SetActiveWindow 2 OpenDatabase usr gapps visit data globe silo AddPlot Mesh mesh1 DrawPlots 154 VisIt Python Interface Manual SetAnimationTimeout SetAnimationTimeout Sets the speed at which animations play Synopsis SetAnimationTimeout milliseconds gt integer Returns The SetAnimationTimeout function returns 1 for success and 0 for failure Description The SetAnimationTimeout function sets the animation timeout which is a value that governs how fast animations play The timeout is specified in milliseconds and has a default value of 1 millisec ond Larger timeout values decrease the speed at which animations play Example Jovisit cli Play a new frame every 5 seconds SetAnimationTimeout 5000 OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots for state in range TimeSliderGetNStates SetTimeSliderState state Visit Python Interface Manual 155 SetAnnotationAttributes SetAnnotationAttributes Sets the annotation attributes for the active window Synopsis SetA
147. ng object containing the short filename to expand Returns The LongFileName function returns a string Notes This function returns the input argument unless you are on the Windows platform Description On Windows filenames can have two different sizes traditional 8 3 format and long format The long format which lets you name files whatever you want is implemented using the traditional 8 3 format under the covers Sometimes filenames are given to VisIt in the traditional 8 3 format and must be expanded to long format before it is possible to open them If you ever find that you need to do this conversion such as when you process command line arguments then you can use the LongFileName function to return the longer filename 112 VisIt Python Interface Manual MovePlotDatabaseKeyframe MovePlotDatabaseKeyframe Moves a database keyframe for a plot Synopsis MovePlotDatabaseKeyframe index oldFrame newFrame Arguments index An integer representing the index of the plof in the plot list oldFrame The old animation frame where the keyframe is located newF rame The new animation frame where the keyframe will be moved Returns MovePlotDatabaseKeyframe does not return a value Description MovePlotDatabaseKeyframe moves a database keyframe for a specified plot to a new animation frame which changes the list of database time states that are used for each animation frame when Visit is in keyframing mode Example
148. nnotationAttributes atts SetDefaultAnnotationAttributes atts Arguments atts An AnnotationAttributes object containing the annotation settings Returns Both functions return 1 on success and 0 on failure Description The annotation settings control what bits of text are drawn in the visualization window Among the annotations are the plot legends database information user information plot axes triad and the background style and colors Setting the annotation attributes is important for producing quality visualizations The annotation settings are stored in AnnotationAttributes objects To set the anno tation attributes first create an AnnotationAttributes object using the AnnotationAttributes func tion and then pass the object to the SetAnnotationAttributes function To set the default annotation attributes also pass the object to the SetDefaultAnnotationAttributes function Example visit cli OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots a AnnotationAttributes a axes3DFlag 1 a userInfoFlag 0 a gradientBackgroundStyle a GRADIENTSTYLE_RADIAL a gradientColorl 0 255 255 a gradientColor2 0 0 0 a backgroundMode a BACKGROUNDMODE_GRADIENT SetAnnotationAttributes a 156 VisIt Python Interface Manual SetCenterOfRotation SetCenterOfRotation Sets the center of rotation for plots in a 3D vis window Synopsis Se
149. nt 1 legendFlag int 1 lineStyle int 0 line Width int 0 singleColor tuple of int 0 0 0 255 boundaryNames tuple of int O boundaryType int Unknown Possible values Domain Group Mate rial Unknown opacity float 1 0 wireframe int 0 smoothingLevel int 0 pointSize float 0 05 pointType int Box Possible values Box Axis Icosahedron Point pointSize VarEnabled int 0 pointSize Var string default 220 VisIt Python Interface Manual BoundaryAttributes Description The BoundaryAttributes function is used to create BoundaryAttributes objects that can be fed to the SetPlotOptions function in order to set the attributes for Boundary plots VisIt Python Interface Manual 221 ContourAttributes ContourAttributes ContourAttributes function and object Synopsis ContourAttributes gt ContourAttributes object Returns The ContourAttributes function returns a ContourAttributes object Object definition Field Type Default value colorTableName string Default colorType int ColorByMultipleColors Possible values ColorBySingleColor ColorByMultipleColors ColorByColorT able contourMethod int Level Possible values Level Value Percent contourNLevels int 10 contourPercent tuple of O float contour Value tuple of O float legendFlag int 1 lineStyle int 0 lineWidth int 0 max float 1 0 maxFlag 0 min 0 minFlag 0 scaling int Linear
150. nteger PickByZone cell domain variables gt integer Arguments cell Integer index of the cell for which we want pick information domain An integer representing the index of the domain that contains the cell for which we want pick information Note that if the first domain is domain1 then the first valid index is 1 variables A tuple of strings containing the names of the variables for which we want pick information Returns PickByZone returns 1 on success and 0 on failure Description The PickByZone function tells VisIt to perform pick using a specific cell index in a given domain Other pick by zone variants first determine the cell that contains some user specified 3D point but the PickByZone functions cuts out this step and allows you to directly pick on the cell of your choice You can use the GetPickOutput function to retrieve a string containing the pick informa tion once you ve called PickByZone Example visit cli OpenDatabase usr gapps visit data multi_curv2d silo AddPlot Pseudocolor d DrawPlots Pick on cell 200 in the first domain PickByZone 200 Pick on cell 200 in the second domain PickByZone 200 2 Pick on cell 100 in domain 5 and return information for two additional variables PickByZone 100 5 default u v print Last pick GetPickOutput 130 VisIt Python Interface Manual PlotPlugins PlotPlugins Returns a tup
151. o a plot Examples of operators include arithmetic operations or taking slices through the mesh It is also possible to restrict the visualization of the data to subsets of the mesh VisIt provides Python bindings to all of its plots and operators so they may be controlled through scripting Each plot or operator plugin provides a function which is added to the VisIt namespace to create the right type of plot or operator attributes The attribute object can then be modified by setting its fields and then it can be passed to a general purpose function to set the plot or operator attributes To display a complete list of functions in the VisIt Python Interface you can type dir at the Python prompt Similarly to inspect the contents of any object you can type its name at the Python prompt VisIt supports up to 16 visualization windows also called vis windows Each vis window is independent of the other vis windows and VisIt Python functions generally apply only to the currently active vis window This manual explains how to use the VisIt Python Interface which is a Python extension module that controls VisIt s viewer In that way the VisIt Python Interface fulfills the same role as VisIt s GUI The difference is that the viewer is totally controlled through Python scripting which makes it easy to write scripts to create visualizations and even movies Since the VisIt module controls VisIt s viewer the Python interpreter currently has no d
152. o recalculate the operator You can use the power of VisIt s Python Interface to create complex operator behavior such as in the following code example which moves slice planes through a Pseudocolor plot Moving slice planes OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hardyglobal AddOperator Slice s SliceAttributes s originType s Percent s project2d 0 SetOperatorOptions s DrawPlots nSteps 20 for axis in 0 1 2 S axisType axis for step in range nSteps t float step float nSteps 1 s originPercent t 100 SetOperatorOptions s SaveWindow 18 VisIt Python Interface Manual Quick Recipes 7 0 Quantitative operations This section focuses on some of the operations that allow you to examine your data more quantitatively 7 1 Defining expressions VisIt allows you to create derived variables using its powerful expressions language You can plot or query variables created using expressions just as you would if they were read from a database VisIt s Python Interface allows you to create new scalar vector tensor variables using the DefineScalarExpression Define VectorExpression and DefineTensorExpression functions Creating a new expression OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hardyglobal DrawPlots DefineScalarExpression newvar sin hardyglobal co
153. obe silo AddPlot Pseudocolor u AddPlot Mesh mesh1 AddOperator Slice 1 Slice both plots DrawPlots VisIt Python Interface Manual 37 AddPlot AddP 1lot Creates a new plot Synopsis AddP lot plotType variableName gt integer Arguments plotType This is a string containing the name of a valid plot plugin type variableName This is a string containing a valid variable name for the open database Returns The AddPlot function returns an integer value of 1 for success and 0 for failure Description The AddPlot function creates a new plot of the specified type using a variable from the open data base The plotType argument is a string that contains the name of a valid plot plugin type which must be a member of the string tuple that is returned by the PlotPlugins function see page 131 The variableName argument is a string that contains the name of a variable in the open database After the AddPlot function is called a new plot is created and it is made the sole active plot Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Subset mat1 Create a subset plot DrawPlots 38 VisIt Python Interface Manual AddWindow AddWindow Creates a new visualization window Synopsis AddWindow Returns The AddWindow function does not a return value Description The AddWindow function creates a new visualizatio
154. of the compute engines Synopsis Returns GetEngineList gt tuple of strings GetEngineList returns a tuple of strings that contain the names of the computers on which compute engines are running Description The GetEngineList function returns a tuple of strings containing the names of the computers on which compute engines are running This function can be useful if engines are going to be closed and opened explicitly in the Python script The contents of the tuple can be used to help determine which compute engines should be closed or they can be used to determine if a compute engine was successfully launched Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u OpenDatabase mcr usr gapps visit data globe silo AddPlot Mesh mesh1 DrawPlots for name in GetEnginelist print VisIt has a compute engine running on s name CloseComputeEngine GetEngineList 1 84 VisIt Python Interface Manual GetGlobalAttributes GetGlobalAttributes Returns a GlobalAttributes object Synopsis GetGlobalAttributes gt GlobalAttributes object Returns Returns a GlobalAttributes object that has been initialized Description The GetGlobalAttributes function returns a GlobalAttributes object that has been initialized with the current state of the viewer proxy s GlobalAttributes object The GlobalAttributes obje
155. ons Example visit cli OpenDatabase usr gapps visit data noise silo Set up a keyframe animation of view and save a session file of it k GetKeyframeAttributes k enabled k nFrames k nFramesWasUserSet 1 20 1 SetKeyframeAttributes k AddPlot Surface hgslice DrawPlots v GetView3D v viewNormal 0 40823 0 826468 0 387684 v viewUp v imageZoom 0 261942 0 300775 0 917017 1 60684 SetView3D v SetViewKeyframe SetTimeSliderState TimeSliderGetNStates 1 v viewNormal 0 291901 0 435608 0 851492 v viewUp 0 516969 0 677156 0 523644 SetView3D v SetViewKeyframe ToggleCameraViewMode SaveSession visit keyframe session VisIt Python Interface Manual 149 SaveWindow SaveWindow Save the contents of the active window Synopsis SaveWindow gt string Returns The Save Window function returns a string containing the name of the file that was saved Description The Save Window function saves the contents of the active visualization window The format of the saved window is dictated by the SaveWindowAttributes which can be set using the SetSaveWindo wAttributes function The contents of the active visualization window can be saved as TIFF JPEG RGB PPM PNG images or they can be saved as curve Alias Wavefront Obj or VTK geometry files Example visit cli OpenDatabase usr gapps visit data curv3d silo AddPlo
156. operator that was last applied to the selected plots The RemoveAllOper ators function removes all operators from the selected plots in the active visualization window If the all argument is provided and contains a non zero value all plots in the active visualization win dow are affected If the value is zero or if the argument is not provided only the selected plots are affected Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddOperator Threshold AddOperator Slice AddOperator SphereSlice DrawPlots RemoveLastOperator Remove SphereSlice RemoveO0perator 0 Remove Threshold RemoveAllOperators Remove the rest of the operators 140 VisIt Python Interface Manual ReOpenDatabase ReOpenDatabase Reopens a database for plotting Synopsis ReOpenDatabase databaseName gt integer Arguments databaseName A string containing the name of the database to open Returns The ReOpenDatabase function returns an integer value of 1 for success and 0 for failure Description The ReOpenDatabase function reopens a database that has been opened previously with the Open Database function The ReOpenDatabase function is primarily used for regenerating plots whose database has been rewritten on disk ReOpenDatabase allows VisIt to access new variables and new time states that have been added since the database was opened using the Open
157. ots Create the control points for the views c0 View3DAttributes cO viewNormal 0 O 1 c0 focus 0 O 0 c0 viewUp 0 1 0 c0 viewAngle 30 c0 parallelScale 17 3205 cO nearPlane 17 3205 c0 farPlane 81 9615 c0 perspective 1 cl View3DAttributes cl viewNormal 0 499159 0 475135 0 724629 cl focus 0 O 0 cl viewUp 0 196284 0 876524 0 439521 cl viewAngle 30 cl parallelScale 14 0932 cl nearPlane 15 276 cl farPlane 69 917 cl perspective 1 c2 View3DAttributes c2 viewNormal 0 522881 0 831168 0 189092 c2 focus 0 O 0 c2 viewUp 0 783763 0 556011 0 27671 c2 viewAngle 30 c2 parallelScale 11 3107 c2 nearPlane 14 8914 c2 farPlane 59 5324 c2 perspective 1 c3 View3DAttributes VisIt Python Interface Manual 23 Quick Recipes c3 viewNormal 0 438771 0 523661 0 730246 c3 focus 0 O 0 c3 viewUp 0 0199911 0 80676 0 590541 c3 viewAngle 30 c3 parallelScale 8 28257 c3 nearPlane 3 5905 c3 farPlane 48 2315 c3 perspective 1 c4 View3DAttributes c4 viewNormal 0 286142 0 342802 0 894768 c4 focus 0 O 0 c4 viewUp 0 0382056 0 928989 0 36813 c4 viewAngle 30 c4 parallelScale 10 4152 c4 nearPlane 1 5495 c4 farPlane 56 1905 c4 perspective 1 c5 View3DAttributes c5 viewNormal 0 974296 0 223599 0 0274086 c5 focus 0 O 0 c5 viewUp
158. ots Turn on spin mode ToggleSpinMode Rotate the plot interactively using the mouse and watch it keep spinning after the mouse release Turn off spin mode ToggleSpinMode 190 VisIt Python Interface Manual TurnMaterials On Off TurnDomainsOn Off Turn Turns materials or domains on or off Synopsis urnMaterialsOn gt integer urnMaterialsOn string gt integer urnMaterialsOn tuple of strings gt integer urnMaterialsOff gt integer urnMaterials0Off string gt integer urnMaterialsOff tuple of strings gt integer urnDomainsOn gt integer urnDomainsOn string gt integer urnDomainsOn tuple of strings gt integer urnDomainsOff gt integer urnDomainsOff string gt integer urnDomainsOff tuple of strings gt integer 95 77 7778 Returns The Turn functions return an integer with a value of 1 for success or O for failure Description The Turn functions are provided to simplify the removal of material or domain subsets Instead of creating a SILRestriction object you can use the Turn functions to turn materials or domains on or off The TurnMaterialsOn function turns materials on and the TurnMaterialsOff function turns them off The TurnDomainsOn function turns domains on and the TurnDomainsOff function turns them off All of the Turn functions have three possible argument lists When you do not provide any arguments the function applies to al
159. ou examine the examples found in this document For more information on programming in Python there are a number of good references including on the Internet at http www python org 2 0 Indentation One of the most obvious features of Python is its use of indentation for new scopes You must take special care to indent all program logic consistently or else the Python interpreter may halt with an error or worse not do what you intended You must increase indentation levels when you define a function use an if elif else statement or use any loop construct Note the different levels of indentation def example function n v 0 if n gt 2 print n greater than 2 else ven n return v Overview VisIt Python Interface Manual 5 Python 3 0 4 0 5 0 Comments Like all good programming languages Python supports the addition of comments in the code Comments begin with a pound character and continue to the end of the line This is a comment a 5 5 Identifiers The Python interpreter accepts any identifier that contains letters A Z a z and numbers 0 9 as long as the identifier does not begin with a number The Python interpreter is case sensitive so the identifier case would not be the same identifier as CASE Be sure to case consistently throughout your Python code since the Python interpreter will instantiate any identifier that it has not seen before and mixin
160. ow is in fullframe mode the viewport is stretched non uniformly so that it covers most of the visualization window While not maintaining a 1 1 aspect ratio it does make better use of the visu alization window The ToggleLockTime function turns time locking on and off in a visualization window When time locking is on in a visualization window VisIt creates a database correlation that works for the data bases in all visualization windows that are time locked When you change the time state using the time slider for the the afore mentioned database correlation it has the effect of updating time in all time locked visualization windows The ToggleLock ViewMode function turns lock view mode on and off When windows are in lock view mode each view change is broadcast to other windows that are also in lock view mode This allows windows containing similar plots to be compared easily The ToggleMaintainDataMode and ToggleMaintain ViewMode functions force the data range and the view respectively that was in effect when the mode was toggled to be used for all subsequent time states The ToggleSpinMode function turns spin mode on and off When the visualization window is in spin mode it continues to spin along the axis of rotation when the view is changed interactively VisIt Python Interface Manual 189 ToggleMode Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPl
161. plot list regardless of whether or not they are active Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor d AddPlot Contour u AddPlot Mesh curvmesh2d DrawPlots DeleteActivePlots Delete the mesh plot DeleteAllPlots Delete the pseudocolor and contour plots Visit Python Interface Manual 59 DeleteDatabaseCorrelation DeleteDatabaseCorrelation Deletes a database correlation Synopsis DeleteDatabaseCorrelation name gt integer Arguments name A string object containing the name of the database correlation to delete Returns The DeleteDatabaseCorrelation function returns 1 on success and O on failure Description The DeleteDatabaseCorrelation function deletes a specific database correlation and its associated time slider If you delete a database correlation whose time slider is being used for the current time slider the time slider will be reset to the time slider of the next best suited database correlation You can use the DeleteDatabaseCorrelation function to remove database correlations that you no longer need such as when you choose to examine databases that have nothing to do with your cur rent databases Example visit cli dbs dbA00 pdb dbB00 pdb OpenDatabase dbs 0 AddPlot FilledBoundary material mesh OpenDatabase dbs 1 AddPlot FilledBoundary
162. point A tuple of values that describe the coordinate of where we want to perform the zonal pick variables An optional tuple of strings containing the names of the variables for which we want information The tuple can contain the name default if you want information for the plotted variable sx A screen X location in pixels offset from the left side of the visualization window sy A screen Y location in pixels offset from the bottom of the visualization window Returns The Pick function prints pick information for the cell a k a zone that contains the specified point The point can be specified as a 2D or 3D point in world space or it can be specified as a pixel loca tion in screen space If the point is specified as a pixel location then VisIt finds the zone that con tains the intersection of a cell and a ray that is projected into the mesh Once the zonal pick has been calculated you can use the GetPickOutput function to retrieve the printed pick output as a string which can be used for other purposes Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots Perform node pick in screen space Pick 300 300 Perform node pick in world space Pick 5 0 5 0 126 VisIt Python Interface Manual PickByGlobalNode PickByGlobalNode Performs pick operation for a specific node using a global node id Synopsis PickByGlobalNode no
163. r state in list range TimeSliderGetNStates 0 SetTimeSliderState state DeleteA11Plots Example 2 OpenDatabase path noise silo AddPlot Pseudocolor hardyglobal DrawPlots v GetView3D v viewNormal 0 700661 0 379712 0 604064 v viewUp 0 248662 0 923501 0 292083 SetView3D v Get the window information so we have the extents w GetWindowInformation ToggleMaintainViewMode zmin w extents 4 VisIt Python Interface Manual 217 WindowInformation zmax w extents 5 AddOperator Slice s SliceAttributes s project2d 0 s originType s Point s normal 0 0 1 s upAxis 0 1 0 nSteps 50 Use the extents to slice from zmin to zmax for i in range nSteps t float i float nSteps 1 s originPoint 0 0 0 0 1 0 t zmin t zmax SetOperatorOptions s 218 VisIt Python Interface Manual Chapter 6 Plot Plugin Object Reference 1 0 2 0 Overview VisIt s Python Interface contains many objects that allow plot plugin attributes to be set programmatically These objects are new Python types that contain groups of attributes that are used by plots to control the look and feel of the plots Plot objects which are covered in this chapter are used to simplify the interface to the functions in the VisIt Python Interface and they also make convenient return values for functions that return information about VisIt s p
164. rate through time use this function to determine the number of iterations that are required to reach the end of the active time slider Example OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure DrawPlots for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow 186 VisIt Python Interface Manual TimeSliderNextState TimeSliderNextState Advances the active time slider to the next state Synopsis TimesliderNextState gt integer Returns The TimeSliderNextState function returns 1 on success and 0 on failure Description The TimeSliderNextState function advances the active time slider to the next time slider state Example Assume that files are being written to the disk visit cli OpenDatabase dynamic silo database AddPlot Pseudocolor var AddPlot Mesh mesh DrawPlots SetTimeSliderState TimeSliderGetNStates 1 while 1 SaveWindow TimeSliderPreviousState VisIt Python Interface Manual 187 TimeSliderPrevious State TimeSliderPrevState Moves the active time slider to the previous time state Synopsis TimeSliderPreviousState gt integer Returns The TimeSliderPreviousState function returns 1 on success and 0 on failure Description The TimeSliderPreviousState function moves the active time slider to the previous time slider state Example Assume
165. reate ProjectAttributes objects that can be fed to the Set OperatorOptions function in order to set the attributes for Project operators VisIt Python Interface Manual 255 ReflectAttributes ReflectAttributes ReflectAttributes function and object Synopsis ReflectAttributes gt ReflectAttributes object Returns The ReflectAttributes function returns a ReflectAttributes object Object definition Field Type Default value octant int PXPYPZ Possible values PXPYPZ NXPYPZ PXNYPZ NXNYPZ PXPYNZ NXPYNZ PXNYNZ NXNYNZ reflections tuple of int 1 0 1 0 0 0 0 0 specifiedX float 0 0 specified Y float 0 0 specifiedZ float 0 0 useXBoundary int 1 use Y Boundary int 1 useZBoundary int 1 Description The ReflectAttributes function is used to create ReflectAttributes objects that can be fed to the Set OperatorOptions function in order to set the attributes for Reflect operators 256 VisIt Python Interface Manual RevolveAttributes RevolveAttributes RevolveAttributes function and object Synopsis RevolveAttributes gt RevolveAttributes object Returns The RevolveAttributes function returns a RevolveAttributes object Object definition Field Type Default value axis tuple of 1 0 0 0 0 0 float startAngle float 0 0 steps int 30 stopAngle float 360 0 Description The RevolveAttributes function is used to create RevolveAttributes objects
166. related pieces of information as their arguments These objects are new Python types that contain groups of attributes that are used to perform related functions These objects which are covered in this chapter are used to simplify the interface to the functions in the VisIt Python Interface and they also make convenient return values for functions that return information about VisIt s state Functions and Objects The objects described in this reference all have constructor functions which return a new instance of the specific object type The reference page for each object gives both a synopsis of how to use the constructor function and a description of all of the fields and methods that are part of the object Most objects can be modified using a simple assigment of an appropriate Python object into any of its fields When an incompatible value is assigned into one of an object s fields the Python interpreter will throw an exception In addition to being able to set the value of each field directly all objects provide Set Get methods which can be used to assign values into a field These Set Get methods are not covered except to say that if you have an object called FOO and a field called BAR the Set Get methods would be of the form FOO SetBAR value FOO GetBAR gt value VisIt Python Interface Manual 195 AnnotationAttributes AnnotationAttributes AnnotationAttributes function and object Synopsis AnnotationAttribute
167. rent keyframe frame Example visit cli path usr gapps visit data dbs path dbA00 pdb path dbB00 pdb path dbC00 pdb for db in dbs OpenDatabase db AddPlot FilledBoundary material mesh DrawPlots CreateDatabaseCorrelation common dbs 1 tsNames GetWindowInformation timeSliders for ts in tsNames SetActiveTimeSlider ts for state in list range TimeSliderGetNStates 0 SetTimeSliderState state 176 VisIt Python Interface Manual SetView Set View Sets the view for the active visualization window Synopsis SetView2D view SetView3D view Arguments view A ViewAttributes object containing the view Returns Neither function returns a value Description The view is a crucial part of a visualization since it determines which parts of the database are examined The VisIt Python Interface provides two functions for setting the view SetView2D and SetView3D If the visualization window contains 2D plots use the SetView2D function Use the SetView3D function when the visualization window contains 3D plots Both functions take a Vie wAttributes object as an argument To set the view first create a ViewAttributes object using the ViewAttributes function and set the object s fields to set a new view After setting the fields pass the object to either the SetView2D or SetView3D function A common use of the Set View func
168. rials 93 GetNumPlots 94 GetPickAttributes 95 GetPickOutput 19 96 GetPipelineCachingMode 97 GetQueryOutputString 98 GetQueryOutputValue 98 GetQueryOverTimeAttributes 99 GetRenderingAttributes 100 GetSave Window Attributes 101 GetTimeSliders 102 Getting something on the screen 12 GetView2D 103 GetView3D 22 103 GetViewCurve 103 GetWindowInformation 104 GlobalAttributes 200 H HideActivePlots 105 HideToolbars 106 HistogramAttributes 227 I IconifyAllWindows 107 Identifiers 6 if elif else 8 Indentation 5 IndexSelectAttributes 249 InverseGhostZoneAttributes 250 IsosurfaceAttributes 251 IsovolumeAttributes 252 L LabelAttributes 228 Launch 32 LaunchNowin 32 LightAttributes 202 Lineout 20 109 LineoutAttributes 253 ListPlots 111 Lists 7 LocalNamespace 33 LongFileName 112 M Manual chapters 1 MaterialAttributes 203 MeshAttributes 230 MovePlotDatabaseKeyframe 113 MovePlotKeyframe 114 MoveViewKeyframe 116 N NodePick 117 NumColorTableNames 118 NumOperatorPlugins 119 NumPlotPlugins 120 O OnionPeelAttributes 254 OpenComputeEngine 15 50 121 OpenDatabase 13 14 122 Opening a compute engine 14 Opening a database 13 Opening a database at late time 14 Opening a remote database 14 Opening a virtual database 14 OpenMDServer 123 OperatorPlugins 37 124 OverlayDatabase 125 P Pick 19 126 PickByGlobalNode 127 PickByGlobalZone 128 PickByNode 129 PickByZone 130 PlotPlugins 38
169. ript that can save out images of a time varying database for the purpose of making movies Saving images using VisIt s Python Interface is a straight forward process involving just a few functions 3 1 Setting the output image characteristics VisIt provides a number of options for saving files including file format filename image size to name a few These attributes are grouped into the SaveWindowAttributes object To set the options that VisIt uses to save files you must create a SaveWindowAttributes object change the necessary attributes and call the SetSave Window Attributes function Note that if you want to create images using a specific image resolution the best way is to use the geometry command line argument with VisIt s Command Line Interface and tell VisIt to use screen capture If you instead require your script to be capable of saving 12 VisIt Python Interface Manual Quick Recipes 4 0 several different image sizes then you can turn off screen capture and set the image resolution in the SaveWindowAttributes object Save a BMP file at 1024x768 resolution s SaveWindowAttributes s format s BMP s fileName mybmpfile s width s height 1024 768 s screenCapture 0 SetSaveWindowAttributes s 3 2 Saving an image Once you have set the SaveWindowAttributes to your liking you can call the SaveWindow function to save an image The SaveWindow function returns the name of the image that
170. rk cache If you want to tell more than one compute engine to clear its cache without having to call ClearCache multiple times you can use the ClearCacheForAl lEngines function Example Jovisit cli OpenDatabase localhost very _large_database Do a lot of work ClearCache localhost OpenDatabase localhost another_large_ database Do more work OpenDatabase remotehost yet_another_database Do more work ClearCacheForAllEngines 44 VisIt Python Interface Manual Clear Clear Clears visualization windows of plots Synopsis ClearAllWindows ClearWindow Returns The Clear functions do not return values Description The ClearWindow function is used to clear out the plots from the active visualization window The plots are removed from the visualization window but are left in the plot list so that subsequent calls to the DrawPlots function regenerate the plots in the plot list The ClearAllWindows function pre forms the same work as the ClearWindow function except that all windows are cleared of their plots Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots AddWindow SetActiveWindow 2 Make window 2 active OpenDatabase usr gapps visit data globe silo AddPlot Subset mat1 DrawPlots ClearWindow Clear the plots in window 2 DrawPlots Redraw th
171. rrelation and every database correlation has its own time slider If you want to query to determine which time slider is currently the active time slider you can use the GetActiveTimeSlider function Example visit cli OpenDatabase dbA00 pdb AddPlot FilledBoundary material mesh OpenDatabase dbB00 pdb AddPlot FilledBoundary materials mesh print Active time slider s GetActiveTimeSlider CreateDatabaseCorrelation common dbA00 pdb dbB00 pdb 2 print Active time slider s GetActiveTimeSlider VisIt Python Interface Manual 77 GetAnimationTimeout GetAnimationTimeout Returns the animation timeout in milliseconds Synopsis GetAnimationTimeout gt integer Returns The GetAnimationTimeout function returns an integer that contains the time interval measured in milliseconds between the rendering of animation frames Description The GetAnimationTimeout returns an integer that contains the time interval measured in millisec onds between the rendering of animation frames Example visit cli print Animation timeout d GetAnimationTimeout 78 VisIt Python Interface Manual GetAnimationNumStates GetAnimationNumStates Returns the number of time steps in an animation Synopsis GetAnimationNumStates gt integer Returns GetAnimationNumStates returns an integer value containing the nu
172. rs any view keyframes that have been set Synopsis Returns ClearViewKeyframes gt integer The ClearViewKeyframes function returns 1 on success and 0 on failure Description The ClearViewKeyframes function clears any view keyframes that may have been set View key frames are used to create complex view behavior such as fly throughs when VisIt is in keyframing mode Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u k KeyframeAttributes k enabled k nFrames k nFramesWasUserSet 1 10 1 SetKeyframeAttributes k DrawPlots SetViewKeyframe vl GetView3D vl viewNormal 0 66609 0 337227 0 665283 vl viewUp 0 157431 0 935425 0 316537 SetView3D v1 SetTimeSliderState 9 SetViewKeyframe ToggleCameraViewMode for i in range 10 SetTimeSliderState i ClearViewKeyframes 48 VisIt Python Interface Manual Clone Window CloneWindow Creates a new window that has the same plots annotations lights and view as the active window Synopsis CloneWindow gt integer Returns The Clone Window function returns an integer value of 1 for success and 0 for failure Description The Clone Window function tells the viewer to create a new window based on the active window that contains the same plots annotations lights and view as the active window This function is useful for when you have
173. s gt AnnotationAttributes object Returns The AnnotationAttributes function returns an AnnotationAttributes object Object definition Field Type Default value axesFlag2D int 1 axesAutoSetTicks2D int 1 labelAutoSetScaling2D int 1 xAxisLabels2D int 1 yAxisLabels2D int 1 xAxisTitle2D int 1 yAxisTitle2D int 1 xGridLines2D int 0 yGridLines2D int 0 xMajorTickMinimum2D float 0 0 yMajorTickMinimum2D float 0 0 xMajorTickMaximum2D float 1 0 yMajorTickMaximum2D float 1 0 xMajorTickSpacing2D float 0 2 yMajorTickSpacing2D float 0 2 xMinorTickSpacing2D float 0 02 yMinorTickSpacing2D float 0 02 xLabelFontHeight2D float 0 02 yLabelFontHeight2D float 0 02 xTitleFontHeight2D float 0 02 yTitleFontHeight2D float 0 02 xLabelScaling2D int 0 yLabelScaling2D int 0 196 VisIt Python Interface Manual AnnotationAttributes Field Type Default value axesLineWidth2D int 0 axesTickLocation2D int Outside Possible values Inside Outside Both axesTicks2D int BottomLeft Possible values Off Bottom Left Bot tomLeft All axesFlag int 1 axesAutoSetTicks int 1 labelAutoSetScaling int 1 xAxisLabels int 1 yAxisLabels int 1 zAxisLabels int 1 xAxisTitle int 1 yAxisTitle int 1 zAxisTitle int 1 xGridLines int 0 yGridLines int 0 zGridLines int 0 xAxisTicks int 1 yAxisTicks int 1 zAxisTicks int 1 xMajorTickMinimum float 0 0 yMajorTickMinimum
174. s SetPlotFrameRange 0 0 nFrames 2 1 Make the Mesh plot take up the second half of the animation frames SetPlotFrameRange 1 nFrames 2 nFrames 1 for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow VisIt Python Interface Manual 169 SetPlotOptions SetPlotOptions Sets plot attributes for the selected plots Synopsis SetPlotOptions atts gt integer SetDefaultPlotOptions atts gt integer Arguments atts Any type of plot attributes object Returns All functions return an integer value of 1 for success and O for failure Description Each plot in VisIt has a group of attributes that controls the appearance of the plot To set the attributes for a plot first create a plot attributes object This is done by calling a function which is the name of the plot plus the word Attributes For example a Pseudocolor plot s plotattributes object is created and returned by the PseudocolorAttributes function Assign the new plot attributes object into a variable and set its fields After setting the desired fields in the plot attributes object pass the object to the SetPlotOptions function The SetPlotOptions function determines the type of plot to which the plot attributes object applies and sets the attributes for that plot type To set the default plot attributes use the SetDefaultPlotOptions function Setting the default attributes ensures that all future inst
175. s The ReplaceDatabase function returns an integer value of 1 for success and O for failure Description The ReplaceDatabase function replaces the database in the current plots with a new database This is one way of switching timesteps if no visit file was ever created If two databases have the same variable name then replace is usually a success In the case where the new database does not have the desired variable the plot with the variable not contained in the new database does not get regenerated with the new database Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots ReplaceDatabase usr gapps visit data curv3d silo SaveWindow Replace with a time varying database and change the time state to 17 ReplaceDatabase usr gapps visit data wave visit 17 142 VisIt Python Interface Manual ResetLineoutColor ResetLineoutColor Resets the color used by lineout to the first color Synopsis ResetLineoutColor gt integer Returns ResetLineoutColor returns 1 on success and 0 on failure Description Lineouts on VisIt cause reference lines to be drawn over the plot where the lineout was being extracted Each reference line uses a different color in a discrete color table Once the colors in the discrete color table are used up the reference lines start using the color from the start of the dis crete color table and
176. s shepardglobal ChangeActivePlotsVar newvar 7 2 Pick VisIt allows you to pick on cells nodes and points within a database and reutrn information for the item of interest To that end VisIt provides several pick functions Once a pick function has been called you can call the GetPickOutput function to get a string that contains the pick information The information in the string could be used for a multitude of uses such as building a test suite for a simulation code OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots s Pick by a node id PickbyNode 300 s s GetPickOutput Pick by a cell id PickByZone 250 s s GetPickOutput Pick on a cell using a 3d point Pick 2 2 0 s s GetPickOutput Pick on the node closest to 2 2 0 NodePick 2 2 0 s s GetPickOutput Print all pick results print s VisIt Python Interface Manual 19 Quick Recipes 7 3 Lineout VisIt allows you to extract data along a line called a lineout and plot the data using a Curve plot OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots Lineout 5 3 5 8 Specify a number of sample points Lineout 5 4 5 7 7 4 Query VisIt can perform a number of different queries based on values calculated about plots or their originating d
177. s the name of the computer where the compute engine is running The hostName argument can also be the name localhost if you want to close the compute engine on the local machine without having to specify its name It is not nec essary to provide the hostName argument If the argument is omitted the first compute engine in the engine list will be closed The simulation argument can be provided if you want to close a con nection to a simulation that is acting as a VisIt compute engine A compute engine can be launched again by creating a plot or by calling the OpenComputeEngine function Example visit cli OpenDatabase usr gapps visit data globe silo Launches an engine AddPlot Pseudocolor u DrawPlots CloseComputeEngine Close the compute engine 50 VisIt Python Interface Manual CloseDatabase CloseDatabase Closes the specified database and frees up resources associated with it Synopsis CloseDatabase name gt integer Arguments name A string object containing the name of the database to close Returns The CloseDatabase function returns 1 on success and O on failure Description The CloseDatabase function is used to close a specified database and free all resources that were devoted to keeping the database open This function has an effect similar to ClearCache see page 44 but it does more in that in addition to clearing the compute engine s cache which it only does for the
178. sWasUserSet 1 nFrames 1 SetKeyframeAttributes k SetPlotFrameRange 0 0 nFrames 1 c ContourAttributes c contourNLevels 5 SetPlotOptions c SetTimeSliderState nFrames 2 c contourNLevels 10 SetPlotOptions c c contourLevels 25 SetTimeSliderState nFrames 1 SetPlotOptions c for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow temp nFrames 2 114 VisIt Python Interface Manual MovePlotKeyframe MovePlotKeyframe 0 nFrames 2 temp MovePlotKeyframe 0 nFrames 1 nFrames 2 MovePlotKeyframe 0 temp nFrames 1 for state in range TimeSliderGetNStates SetTimeSliderState state SaveWindow VisIt Python Interface Manual 115 MoveViewKeyframe MoveViewKey frame Moves a view keyframe Synopsis MoveViewKeyframe oldFrame newFrame Arguments oldFrame The old animation frame where the keyframe is located newF rame The new animation frame where the keyframe will be moved Returns MoveViewKeyframe returns 1 on success and 0 on failure Description MoveViewKeyframe moves a view keyframe to a new animation frame which changes the view that is used for each animation frame when VisIt is in keyframing mode Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Contour hardyglobal DrawPlots k GetKeyframeAttributes nFrames 20 k enabled k nFrames k nFramesWasUserSe
179. seCenterOfRotation Allows you to interactively pick a new center of rotation Synopsis ChooseCenterOfRotation gt integer ChooseCenterOfRotation screenX screenY gt integer Arguments screenX The X coordinate of the pick point in normalized 0 1 screen space screenY The Y cooridinate of the pick point in normalized 0 1 screen space Returns The ChooseCenterOfRotation function returns if successful and 0 if it fails Description The ChooseCenterOfRotation function allows you to pick a new center of rotation which is the point about which plots are rotated when you interactively rotate plots The function can either take zero arguments in which case you must interactively pick on plots or it can take two argu ments that correspond to the X and Y coordinates of the desired pick point in normalized screen space When using the two argument version of the ChooseCenterOfRotation function the X and Y values are floating point values in the range 0 1 If the ChooseCenterOfRotation function is able to actually pick on plots yes there must be plots in the vis window then the center of rotation is updated and the new value is printed to the console Example visit cli OpenDatabase usr gapps visit data globe silo AddPlots Pseudocolor u DrawPlots Interactively choose the center of rotation ChooseCenterOfRotation Choose a center of rotation using normalized screen
180. seudocolor 146 VisIt Python Interface Manual gt integer A string containing the name of the plot type ResetView Reset View Resets the view to the initial view Synopsis ResetView Returns The Reset View function does not return a value Description The Reset View function resets the camera to the initial view Example visit cli OpenDatabase usr gapps visit data curv3d silo AddPlot Mesh curvmesh3d ViewAttributes Camera 0 45396 0 401908 0 79523 focus 0 2 5 15 viewUp 0 109387 0 910879 0 397913 viewAngle 30 SetScale 1 parallelScale 16 0078 nearPlane 32 0156 farPlane 32 0156 perspective 1 SetView3D v Set the 3D view DrawPlots ResetView q dddddddd E e VisIt Python Interface Manual 147 RestoreSession RestoreSession Restores a VisIt session Synopsis RestoreSession filename visitDir gt integer Arguments filename The name of the session file to restore visitDir An integer flag that indicates whether the filename to be restored is located in the user s VisIt directory If the flag is set to 1 then the session file is assumed to be located in the user s VisIt directory otherwise the filename must contain an absolute path Returns RestoreSession returns 1 on success and 0 on failure Description The RestoreSession function is important for setting up complex visualizations bec
181. sit cli SetWindowLayout 4 Have 4 windows IconifyAllWindows DeIconifyAllWindows VisIt Python Interface Manual 107 InvertBackgroundColor InvertBackgroundColor Swaps the background and foreground colors in the active visualization window Synopsis InvertBackgroundColor Returns The InvertBackgroundColor function does not return a value Description The InvertBackgroundColor function swaps the background and foreground colors in the active visualization window This function is a cheap alternative to setting the foreground and back ground colors though the AnnotationAttributes in that it is a simple no argument function call It is not adequate to set new colors for the background and foreground but in the event where the two colors can be exchanged favorably it is a good function to use An example of when this function is used is after the creation of a Volume plot Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Volume u DrawPlots InvertBackgroundColor 108 VisIt Python Interface Manual Lineout Lineout Performs a lineout Synopsis Lineout start end gt integer Lineout start end variables gt integer Lineout start end samples gt integer Lineout start end variables samples gt integer Arguments start A 2 or 3 item tuple containing the coordinates of the starting point
182. so on ResetLineoutColor forces reference lines to start using the color at the start of the discrete color table again thus resetting the lineout color VisIt Python Interface Manual 143 ResetOperatorOptions ResetOperatorOptions Resets operator attributes back to the default values Synopsis ResetOperatorOptions operatorType gt integer ResetOperatorOptions operatorType all gt integer Arguments operatorType A string containing the name of a valid operator type all An optional integer argument that tells the function to reset the operator options for all plots regardless of whether or not they are selected Returns The ResetOperatorOptions function returns an integer value of 1 for success and 0 for failure Description The ResetOperatorOptions function resets the operator attributes of the specified operator type for the selected plots back to the default values The operatorType argument is a string containing the name of the type of operator whose attributes are to be reset The all argument is an optional flag that tells the function to reset the operator attributes for the indicated operator in all plots regard less of whether the plots are selected When non zero values are passed for the all argument all plots are reset When the all argument is zero or not provided only the operators on selected plots are modified Example visit cli OpenDatabase usr gapps visit data globe s
183. sualization pipe line This allows you to change the order of operators that have been applied to a plot without hav ing to remove them from the plot For example consider moving a Slice to before a Reflect operator when it had been the other way around Changing the order of operators can result in vastly different results for a plot The opposite function is PromoteOperator see page 133 Example visit cli OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hardyglobal AddOperator Slice SliceAttributes project2d 0 originPoint 0 5 0 originType s Point normal 0 1 0 upAxis 1 0 0 SetOperatorOptions s AddOperator Reflect DrawPlots s s s s s s Now reflect before slicing We ll only get 1 slice plane instead of 2 DemoteOperator 1 DrawPlots VisIt Python Interface Manual 67 DisableRedraw DisableRedraw Prevents the active visualization window from redrawing itself Synopsis DisableRedraw Returns The DisableRedraw function does not return a value Description The DisableRedraw function prevents the active visualization window from ever redrawing itself This is a useful function to call when performing many operations that would cause unnecessary redraws in the visualization window The effects of this function are undone by calling the Redraw Window function Example visit cli OpenDatabase usr
184. t Visit Python Interface Manual 3 Introduction to Vislt 5 0 Getting started VisIt is a tool for visualizing 2D and 3D scientific databases The first thing to do when running VisIt is select databases to visualize To select a database you must first open the database using the OpenDatabase function After a window has an open database any number of plots and operators can be added To create a plot use the AddPlot function After adding a plot call the DrawPlots function to make sure that all of the new plots are drawn Example OpenDatabase usr gapps visit data multi_curv3d silo AddPlot Pseudocolor u DrawPlots To see a list of the available plots and operators when you use the VisIt Python Interface use the OperatorPlugins and PlotPlugins functions Each of those functions returns a tuple of strings that contain the names of the currently loaded plot or operator plugins Each plot and operator plugin provides a function for creating an attributes object to set the plot or operator attributes The name of the function is the name of the plugin in the tuple returned by the OperatorPlugins or PlotPlugins functions plus the word Attributes For example the Pseudocolor plot provides a function called PseudocolorAttributes To set the plot attributes or the operator attributes first use the attributes creation function to create an attributes object Assign the newly created object to a variab
185. t Pseudocolor d DrawPlots Set the save window attributes SaveWindowAttributes filename test format s FILEFORMAT_ JPEG progressive 1 fileName test SetSaveWindowAttributes s name SaveWindow Hava HA DH DH print name s name 150 VisIt Python Interface Manual SetActiveColorTable SetActiveColorTable Sets the color table that is used by plots that use a default color table Synopsis SetActiveContinuousColorTable name gt integer SetActiveDiscreteColorTable name gt integer Arguments name The name of the color table to use for the active color table The name must be present in the tuple returned by the ColorTableNames function Returns Both functions return 1 on success and 0 on failure Description VisIt supports two flavors of color tables continuous and discrete Both types of color tables have the same underlying representation but each type of color table is used a slightly different way Continuous color tables are made of a small number of color control points and the gaps in the color table between two color control points are filled by interpolating the colors of the color con trol points Discrete color tables do not use any kind of interpolation and like continuous color tables they are made up of control points The color control points in a discrete color table repeat infinitely such that if we have 4 color control po
186. t Pseudocolor d DrawPlots SetWindowMode zoom Draw a rectangle in the visualization window to zoom the plots 182 VisIt Python Interface Manual ShowAllWindows ShowA11Windows Tells VisIt to show its visualization windows Synopsis ShowAllWindows gt integer Returns The ShowAllWindows function returns 1 on success and 0 on failure Description The ShowAllWindows function tells VisIt s viewer to show all of its visualization windows The command line interface calls Show AllWindows before giving control to any user supplied script to ensure that the visualization windows appear as expected Call the ShowAllWindows function when using the VisIt module inside another Python interpreter so the visualization windows are made visible Example python import visit visit Launch visit ShowAllWindows Visit Python Interface Manual 183 ShowToolbars ShowToolbars Shows the visualization window s toolbars Synopsis ShowToolbars gt integer ShowToolbars allWindows gt integer Arguments allWindows An integer value that tells VisIt to show the toolbars for all windows when it is non zero Returns The ShowToolbars function returns 1 on success and O on failure Description The ShowToolbars function tells VisIt to show the toolbars for the active visualization window or for all visualization windows when the optional allWindows argument is provided and is s
187. t 1 nFrames 1 SetKeyframeAttributes k SetViewKeyframe SetTimeSliderState nFrames 2 v GetView3d v viewNormal 0 616518 0 676972 0 402014 v viewUp 0 49808 0 730785 0 466764 SetViewKeyframe SetTimeSliderState 0 Move the view keyframe to the last animation frame MoveViewKeyframe nFrames 2 nFrames 1 116 VisIt Python Interface Manual NodePick NodePick Performs a nodal pick on a plot Synopsis NodePick point gt integer NodePick point variables gt integer NodePick sx sy gt integer NodePick sx sy variables gt integer Arguments point A tuple of values that describe the coordinate of where we want to perform the nodal pick variables An optional tuple of strings containing the names of the variables for which we want information The tuple can contain the name default 1f you want information for the plotted variable sx A screen X location in pixels offset from the left side of the visualization window sy A screen Y location in pixels offset from the bottom of the visualization window Returns The NodePick function prints pick information for the node closest to the specified point The point can be specified as a 2D or 3D point in world space or it can be specified as a pixel location in screen space If the point is specified as a pixel location then VisIt finds the node closest to a ray that is projected into the mesh Once the nodal pick has
188. t f t Arguments E co al c2 Returns A floating point number in the range 0 1 that represents the distance from c0 to c3 The first control point f 0 c0 Any object that can be used in an arithmetic expression can be passed for cO The second control point Any object that can be used in an arithmetic expression can be passed for cl The last control point f 1 c2 Any object that can be used in an arithmetic expression can be passed for c2 The EvalQuadratic function returns the interpolated value for t taking into account the control points that were passed in Description The EvalQuadratic function takes in four objects and blends them using a cubic polynomial and returns the blended value Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots v0 GetView3D rotate the plots vl GetView3D rotate the plots one last time v2 GetView3D Fly around the plots using the views that have been specified nSteps 100 for i in range nSteps t float i float nSteps 1 newView EvalQuadratic t v0 vl v2 SetView3D newView 74 VisIt Python Interface Manual Expressions Expressions Returns a tuple of expression names and definitions Synopsis Expressions gt tuple of expression tuples Returns The Expressions function returns a tuple of tuples that contain t
189. t contains the name of a variable in the open data base Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPlots SaveWindow ChangeActivePlotsVar v VisIt Python Interface Manual 41 CheckForNewStates CheckForNewStates Checks the specified database for new time states Synopsis CheckForNewStates name gt integer Arguments name The name argument must be a string that contains the name of a database that has been opened previously Returns The CheckForNewStates function returns 1 for success and O for failure Description Calculations are often run at the same time as some of the preliminary visualization work is being performed That said you might be visualizing the leading time states of a database that is still being created If you want to force VisIt to add any new time states that were added since you opened the database you can use the CheckForNewStates function The name argument must con tain the name of a database that has been opened before Example visit cli db usr gapps visit data wave silo database OpenDatabase db AddPlot Pseudocolor pressure DrawPlots SetTimeSliderState TimeSliderGetNStates 1 More files appear on disk CheckForNewStates db SetTimeSliderState TimeSliderGetNStates 1 42 VisIt Python Interface Manual ChooseCenterOfRotation Choo
190. t data noise silo AddPlot Pseudocolor hardyglobal AddPlot Mesh Mesh DrawPlots v GetView3D print The view is v v viewNormal 0 571619 0 405393 0 713378 v viewUp 0 308049 0 911853 0 271346 SetView3D v NS 22 VisIt Python Interface Manual Quick Recipes 9 3 Flying around plots Flying around plots is a commonly requested feature when making movies Fortunately this is easy to script The basic method used for flying around plots is interpolating the view VisIt provides a number of functions that can interpolate View2DAttributes and View3DAttributes objects The most useful of these functions is the EvalCubicSpline function The EvalCubicSpline function uses piece wise cubic polynomials to smoothly interpolate between a tuple of N like items Scripting smooth view changes using EvalCubicSpline is rather like keyframing in that you have a set of views that are mapped to some distance along the parameterized space 0 1 When the parameterized space is sampled with some number of samples VisIt calculates the view for the specified parameter value and returns a smoothly interpolated view One benefit over keyframing in this case is that you can use cubic interpolation whereas VisIt s keyframing mode currently uses linear interpolation Do a pseudocolor plot of u OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u DrawPl
191. tCenterOfRotation x y z gt integer Arguments x The x component of the center of rotation y The y component of the center of rotation Z The z component of the center of rotation Returns The SetCenterOfRotation function returns on success and O on failure Description The SetCenterOfRotation function sets the center of rotation for plots in a 3D visualization win dow The center of rotation is the point about which plots are rotated when you interactively spin the plots using the mouse It is useful to set the center of rotation if you ve zoomed in on any 3D plots so in the event that you rotate the plots the point of interest remains fixed on the screen Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddPlot Mesh mesh1 DrawPlots GetView3D viewNormal 0 409139 0 631025 0 6591 viewUp 0 320232 0 775678 0 543851 imageZoom 4 8006 SetCenterOfRotation 4 755280 6 545080 5 877850 v v v v Rotate the plots interactively VisIt Python Interface Manual 157 SetDatabaseCorrelationOptions SetDatabaseCorrelationOptions Sets the global options for database correlations Synopsis SetDatabaseCorrelationOptions method whenToCreate gt integer Arguments method An integer that tells VisIt what default method to use when automatically creating a database correlation The value must be in the range 0 3
192. tains the node for which we want pick information Note that 1f the first domain is domain1 then the first valid index is 1 variables A tuple of strings containing the names of the variables for which we want pick information Returns PickByNode returns 1 on success and 0 on failure Description The PickByNode function tells VisIt to perform pick using a specific node index in a given domain Other pick by node variants first determine the node that is closest to some user specified 3D point but the PickByNode functions cuts out this step and allows you to directly pick on the node of your choice You can use the GetPickOutput function to retrieve a string containing the pick information once you ve called PickByNode Example visit cli OpenDatabase usr gapps visit data multi_curv2d silo AddPlot Pseudocolor d DrawPlots Pick on node 200 in the first domain PickByNode 200 Pick on node 200 in the second domain PickByNode 200 2 Pick on node 100 in domain 5 and return information for two additional variables PickByNode 100 5 default u v print Last pick GetPickOutput VisIt Python Interface Manual 129 PickByZone PickByZone Performs pick operation for a specific cell in a given domain Synopsis PickByZone cell gt integer PickByZone cell variables gt integer PickByZone cell domain gt i
193. te computer This allows you to success fully connect to a remote computer in the absence of host profiles It also allows you to debug VisIt in distributed mode default_format format The default_format argument allows you to specify the default database plugin that will be used to open files This is useful when the files that you want to open do not have file extensions Example default_format PDB Example visit cli args dir my private visit version default_format PDB debug 4 Open a metadata server before the call to OpenDatabase so we can launch it how we want OpenMDServer thunder args OpenDatabase thunder usr gapps visit data allinone00 pdb Open a metadata server on localhost too OpenMDServer VisIt Python Interface Manual 123 OperatorPlugins OperatorPlugins Returns a tuple of operator plugin names Synopsis OperatorPlugins gt tuple of strings Returns The OperatorPlugins function returns a tuple of strings Description The OperatorPlugins function returns a tuple of strings that contain the names of the loaded opera tor plugins This can be useful for the creation of scripts that alter their behavior based on the available operator plugins Example visit cli for plugin in OperatorPlugins print The s operator plugin is loaded plugin 124 VisIt Python Interface Manual Over
194. that can be fed to the SetOperatorOptions function in order to set the attributes for Revolve operators VisIt Python Interface Manual 257 SliceAttributes SliceAttributes SliceAttributes function and object Synopsis SliceAttributes gt SliceAttributes object Returns The SliceAttributes function returns a SliceAttributes object Object definition Field Type Default value originType int Intercept Possible values Point Intercept Percent Zone Node originPoint tuple of 0 0 0 0 0 0 float originIntercept float 0 0 originPercent float 0 0 originZone int 0 originNode int 0 normal tuple of 0 0 1 0 0 0 float axis Type int YAxis Possible values XAxis YAxis ZAXis Arbitrary upAxis tuple of 0 0 0 0 1 0 float project2d int 1 interactive int 1 flip int 0 originZoneDomain int 0 originNodeDomain int 0 Description The SliceAttributes function is used to create SliceAttributes objects that can be fed to the SetOp eratorOptions function in order to set the attributes for Slice operators 258 VisIt Python Interface Manual SphereSliceAttributes SphereSliceAttributes SphereSliceAttributes function and object Synopsis SphereSliceAttributes gt SphereSliceAttributes object Returns The SphereSliceAttributes function returns a SphereSliceAttributes object Object definition Field Type Default value origin tuple of
195. the active database or 0 if there is no active database Description GetDatabaseNStates returns the number of time states in the active database which is not the same as the number of states in the active time slider Time sliders can have different lengths due to data base correlations and keyframing Use this function when you need the actual number of time states in the active database Example visit cli OpenDatabase usr gapps visit data wave silo database print Number of time states d GetDatabaseNStates 82 VisIt Python Interface Manual GetDomains GetDomains Returns a tuple containing the names of all of the domain subsets for the active plot Synopsis GetDomains gt tuple of strings Returns GetDomains returns a tuple of strings Description GetDomains returns a tuple containing the names of all of the domain subsets for a plot that was created using a database with multiple domains This function can be used in specialized logic that iterates over domains to turn them on or off in some programmed way Example visit cli OpenDatabase usr gapps visit data multi_ucd3d silo AddPlot Pseudocolor u DrawPlots doms GetDomains print doms Turn off all but the last domain one after the other for d in doms 1 TurnDomainsO0f f d VisIt Python Interface Manual 83 GetEngineList GetEngineList Returns a tuple containing the names
196. the function to apply the SIL restriction to all plots when the value of the argument is non zero If the all argument is not supplied then the SIL restriction is only applied to the selected plots Example visit cli OpenDatabase usr gapps visit data multi_curv2d silo AddPlot Subset mat1 silr SILRestriction silr TurnoOffSet silr SetsInCategory mat1 1 SetPlotSILRestriction silr DrawPlots Visit Python Interface Manual 171 SetPrinterAttributes SetPrinterAttributes Sets the printer attributes Synopsis SetPrinterAttributes atts Arguments atts A PrinterAttributes object Returns The SetPrinterAttributes function does not return a value Description The SetPrinterAttributes function sets the printer attributes VisIt uses the printer attributes to determine how the active visualization window should be printed The function accepts a single argument which is a PrinterAttributes object containing the printer attributes to use for future printing VisIt allows images to be printed to a network printer or to a PostScript file that can be printed later by other applications Example visit cli OpenDatabase usr gapps visit data curv2d silo AddPlot Surface v DrawPlots Make it print to a file p PrinterAttributes p outputToFile 1 p outputToFileName printfile SetPrinterAttributes p PrintWindow 172 VisIt Python Interface Manu
197. thon Interface Manual 33 DebugLevel DebugLevel Set or Get the VisIt module s debug level Synopsis GetDebugLevel gt integer SetDebugLevel level Arguments level An integer in the range 1 5 A value of 1 is a low debug level which should be used to produce little output while a value of 5 should produce a lot of debug output Returns The GetDebugLevel function returns the debug level of the VisIt module Description The GetDebugLevel and SetDebugLevel functions are used when debugging VisIt Python scripts The SetDebugLevel function sets the debug level for VisIt s viewer thus it must be called before a Launch method The debug level determines how much detail is written to VisIt s execution logs when it executes The GetDebugLevel function can be used in Python scripts to alter the behavior of the script For instance the debug level can be used to selectively print values to the console Example visit cli debug 2 print VisIt s debug level is d GetDebugLevel 34 VisIt Python Interface Manual Version Version Returns VisIt s version string Synopsis Version gt string Returns The Version function return a string that represents VisIt s version Description The Version function returns a string that represents VisIt s version The version string can be used in Python scripts to make sure that the VisIt module is a certain version before
198. to database variables before the compute engine uses them to create plots Operators can be linked one after the other to form chains of operators that can drastically transform the data before plotting it VisIt Python Interface Manual 17 Quick Recipes 6 1 Adding operators Adding an operator is similar to adding a plot in that you call a function with the name of the operator to be added The list of available operators is returned by the OperatorPlugins function Any of the names returned in that plugin can be used to add an operator using the AddOperator function Operators are added to the active plots by default but you can also force VisIt to add them to all plots in the plot list Print available operators print OperatorPlugins Create a plot AddPlot Pseudocolor Add an Isovolume operator and a Slice operator AddOperator Isovolume AddOperator Slice DrawPlots 6 2 Setting operator attributes Each plot gets its own instance of an operator which means that you can set each plot s operator attributes independently Like plots operators use objects to set their attributes These objects are returned by functions whose names are of the form operatorname Attributes Once you have created an operator attributes object you can pass it to the SetOperatorOptions to set the options for an operator Note that setting the attributes for an operator nearly always causes the compute engine t
199. toUpdateFlag int 0 replacePlots int 0 applyOperator int 1 executing int 0 windowLayout int 0 makeDefaultConfirm int 1 clone Window OnFirstRef int 0 maintain View int 0 maintainData int 0 automatically AddOpera int 0 tor 200 VisIt Python Interface Manual GlobalAttributes Description The GlobalAttributes function is used to create GlobalAttributes objects but more often than not you should use the GetGlobalAttributes function to create a GlobalAttributes object since objects returned from that function will be initialized with VisIt s current state Example visit cli SetWindowLayout 4 ptypes Pseudocolor FilledBoundary Vector Volume pvars u mati vel speed for win in GetGlobalAttributes windows SetActiveWindow win DeleteAllPlots OpenDatabase usr gapps visit data globe silo i win 1 AddPlot ptypes i pvars i DrawPlots VisIt Python Interface Manual 201 LightAttributes LightAttributes LightAttributes function and object Synopsis LightAttributes gt LightAttributes object Returns The LightAttributes function returns a LightAttributes object Object definition Field Type Default value enabledFlag int 0 type int Camera Possible values Ambient Object Cam era direction tuple of 0 0 0 0 1 0 float color tuple of 255 255 255 255 float brightness float 1 0 Description The LightAttributes functio
200. tributes for a plot you create an attributes object using the appropriate function set the properties in the returned object and tell VisIt to use the new plot attributes by passing the object to the SetPlotOptions function see page 170 Note that you should set a plot s attributes before calling the DrawPlots method to realize the plot since setting a plot s attributes can cause the compute engine to recalculate the plot Creating a Pseudocolor plot and setting min max values AddPlot Pseudocolor pressure p PseudocolorAttributes Look in the object print p Set the min max values p min p minFlag 1 0 0 p max p maxFlag 1 10 0 SetPlotOptions p 5 4 Working with multiple plots When you work with more than one plot it is sometimes necessary to set the active plots because some of VisIt s functions apply to all of the active plots The active plot is usually the last plot that was created unless you ve changed the list of active plots Changing which plots are active is useful when you want to delete or hide certain plots or set their plot attributes independently When you want to set which plots are active use the SetActivePlots function If you want to list the plots that you ve created call the ListPlots function Create more than 1 plot of the same type AddPlot Pseudocolor pressure AddPlot Pseudocolor density List the plots The second plot should
201. ttributes function is used to create HistogramAttributes objects that can be fed to SetPlotOptions function in order to set the attributes for Histogram plots VisIt Python Interface Manual 227 LabelAttributes LabelAttributes LabelAttributes function and object Synopsis LabelAttributes gt LabelAttributes object Returns The LabelAttributes function returns a LabelAttributes object Object definition Field Type Default value legendFlag int 1 showNodes int 0 showCells int 1 restrictNumberOfLabels int 1 drawLabelsFacing int Front Possible values Front Back FrontAnd Back showSingleNode int 0 showSingleCell int 0 useForegroundTextColor int 1 labelDisplayFormat int Natural Possible values Natural LogicalIndex Index numberOfLabels int 200 textColor tuple of int 255 0 0 255 textHeight float 0 02 textLabel string E horizontalJustification int HCenter Possible values HCenter Left Right verticalJustification int VCenter Possible values VCenter Top Bottom singleNodeIndex int 0 singleCellIndex int 0 228 VisIt Python Interface Manual LabelAttributes Description The LabelAttributes function is used to create LabelAttributes objects that can be fed to the Set PlotOptions function in order to set the attributes for Label plots VisIt Python Interface Manual 229 MeshAttributes MeshAttributes MeshAttributes function and object
202. ty of purposes including turning materials on or off Example visit cli OpenDatabase usr gapps visit data allinone00 pdb AddPlot Pseudocolor mesh mixvar DrawPlots mats GetMaterials for m in mats 1 TurnMaterialOff m VisIt Python Interface Manual 93 GetNumPlots GetNumP 1ot s Returns the number of plots in the active window Synopsis GetNumPlots gt integer Returns Returns the number of plots in the active window Description The GetNumPlots function returns the number of plots in the active window Example visit cli print Number of plots GetNumPlots OpenDatabase usr gapps visit data curv2d silo AddPlot Pseudocolor d print Number of plots GetNumPlots AddPlot Mesh curvmesh2d DrawPlots print Number of plots GetNumPlots 94 VisIt Python Interface Manual GetPickAttributes GetPickAttributes Returns the current pick attributes Synopsis GetPickAttributes gt PickAttributes object Returns GetPickAttributes returns a PickAttributes object Description The GetPickAttributes object returns the pick settings that VisIt is currently using when it per forms picks These settings mainly determine which pick information is displayed when pick results are printed out but they can also be used to select auxiliary variables and generate time curves You can examing the settings an
203. ugh the categories in the SIL restriction and turn all sets on off different ways for category in s Categories Turn sets off one at a time for setindex in s SetsInCategory category s TurnOffSet setindex SetPlotSILRestriction s Turn sets back on one at a time for setindex in s SetsInCategory category s TurnOnSet setindex SetPlotSILRestriction s VisIt Python Interface Manual 211 ViewCurveAttributes ViewCurveAttributes ViewCurveAttributes function and object Synopsis ViewCurveAttributes gt ViewCurveAttributes object Returns The ViewCurveAttributes function returns a ViewCurveAttributes object Object definition Field Type Default value domainCoords tuple of 0 0 1 0 float rangeCoords tuple of 0 0 1 0 float viewportCoords tuple of 0 2 0 95 float Description The ViewCurveAttributes function is used to create ViewCurveAttributes objects which are passed to the SetViewCurve function to set the view when the visualization window displays Curve plots 212 VisIt Python Interface Manual View2DAttributes View2DAttributes View2DAttributes function and object Synopsis View2DAttributes gt View2DAttributes object Returns The View2DAttributes function returns a View2DAttributes object Object definition Field Type Default value fullFrame int 0 viewportCoords tuple of 0 2 0 95 0 15 0 95 float w
204. ugin Object Reference Functions and Objects 0 0 243 BOX Atti DIGS A DAG cae ee te ees 244 ClipAttributes sn 2244 eid a a a A eee dade 245 Cone Attributes auto as avers dew ates ees be oe eres a ds teed dbs 246 Cy ner tte etek oN toe oe des e e rd n lad oA de de 247 DisplaceA ti Dutes e a We Dee eee 248 IndexSelectAttributes 0 0c ete nee eens 249 InverseGhostZoneAttributes 0 cee eens 250 TsosSutbaGEA ttriDUteS 5 425 a lls tet Sts Soe he een antes eae eee es 251 Isovollime Attributes sc 6 sei e sie e a a ose obs 252 LaineoutA tt butes esc eine ate ae ee heen hee ede wo Beene wee wee ee 253 OnionPeelAttributes ae ewes Maes ak eat a tee O 254 ProjectAmbUles le olucl whe teeta eet eee a ee Sled ue ee 255 ReflectAttrib tes costs iia Sew be yd ea e 256 Revolv Attributes cu Bhs ee be Sse LS ay aa oN Sees TG 257 SIiCGAttHibULES a AS AS 258 SphereSliceAttributes i Ae ste ee ee kee A a E as eee 259 ThreeSHcsAtIIDULES 0 a ad Bae deed n a pis 260 Threshold Attributes 0 de a e A ed i e 261 TransformAttributes eee ee eens 262 Chapter 1 Introduction to Vislt 1 0 Overview VisIt is a distributed parallel visualization tool for visualizing data defined on two and three dimensional structured and unstructured meshes VisIt s distributed architecture allows it to leverage both the compute power of a large parallel computer and the graphics acceleration hardware of a local workstation Another benefit of the
205. upported queries Queries 134 VisIt Python Interface Manual QueriesOverTime QueriesOverTime Returns a tuple of containing the names of all supported queries that can execute over time Synopsis QueriesOverTime gt tuple of strings Returns Returns a tuple of strings Description The QueriesOverTime function returns a tuple of strings that contains the names of all of the VisIt queries that can be executed over time Example visit cli OpenDatabase usr gapps visit data allineone00 pdb AddPlot Pseudocolor mesh mixvar DrawPlots Execute each of the queries over time on the plots for q in QueriesOverTime QueryOverTime q VisIt Python Interface Manual 135 Query Query Executes one of VisIt s queries Synopsis Query name Query name Query name Query name Query name Query name Arguments name variables argl arg2 Returns gt integer variables gt integer argl gt integer argl variables gt integer argl arg2 gt integer argl arg2 variables gt integer A string containing the name of the query to execute An optional tuple of strings containing the names of additional query variables An optional general purpose integer argument An optional general purpose integer argument The Query function returns 1 on success and 0 on failure Description The Query function is used to exe
206. usr gapps visit data curv2d silo AddPlot Subset mat1 DrawPlots v GetView2D v windowCoords 2 3 2 4 0 2 4 9 SetView2D v UndoView 192 VisIt Python Interface Manual WriteConfigFile WriteConfigFile Tells the viewer to write its configuration file Synopsis WriteConfigFile Returns The WriteconfigFile function does not return a value Description The viewer maintains internal settings which determine the default values for objects like plots and operators The viewer can save out the default values so they can be used in future VisIt sessions The WriteConfig function tells the viewer to write out the settings to the VisIt configuration file Example visit cli p PseudocolorAttributes p minFlag p min 1 5 0 p maxFlag p max 1 20 0 SetDefaultPlotOptions p Save the new default Pseudocolor settings to the config file WriteConfig VisIt Python Interface Manual 193 WriteConfig File 194 VisIt Python Interface Manual Chapter 5 Object Reference I 1 0 2 0 Overview VisIt s Python Interface is replete with functions that perform complex behaviors Each function requires anywhere from a handful of pieces of information to dozens of pieces of information in order to complete successfully To ensure that programming scripts using VisIt s Python Interface is made as simple as possible many functions take special objects which group all
207. ust the same as opening a database at time state zero except that you must specify the time state at which you want to open the database There are a number of reasons for opening a database at a later time state The most common reason for doing so as opposed to just changing time states later is that VisIt uses the metadata from the first opened time state to describe the contents of the database for all time states except for certain file formats that don t do this i e SAMRAT This means that the list of variables found for the first time state that you open is used for all time states If your database contains a variable at a later time state that does not exist at earlier time states you must open the database at a later time state to gain access to the transient variable Open a database at a later time state to pick up transient variables OpenDatabase usr gapps visit data wave visit 17 4 3 Opening a virtual database VisIt provides two ways for accessing a set of single time state files as a single time varying database The first method is a visit file which is a simple text file that contains the names of each file to be used as a time state in the time varying database The second method uses virtual databases which allow VisIt to exploit the file naming conventions that are often employed by simulation codes when they create their dumps In many cases VisIt can scan a specified directory and determine which fil
208. utes object pass the object to the SetOperatorOptions function The SetOperatorOptions function determines the type of operator to which the operator attributes object applies and sets the attributes for that operator type To set the default plot attributes use the SetDefaultOperatorOp tions function Setting the default attributes ensures that all future instances of a certain operator are initialized with the new default values Example visit cli OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddPlot Mesh mesh1 AddOperator Slice 1 Add the operator to both plots a SliceAttributes a normal a upAxis 0 0 1 0 1 0 Only set the attributes for the selected plot SetOperatorOptions a DrawPlots VisIt Python Interface Manual 165 SetPickAttributes SetPickAttributes Changes the pick settings that VisIt uses when picking on plots Synopsis SetPickAttributes atts gt integer SetDefaultPickAttributes atts gt integer ResetPickAttributes gt integer Arguments atts A PickAttributes object containing the new pick settings Returns All functions return 1 on success and 0 on failure Description The SetPickAttributes function changes the pick attributes that are used when VisIt picks on plots The pick attributes allow you to format your pick output in various ways and also allows you to select auxiliar
209. utes have been set Example 198 VisIt Python Interface Manual AnnotationAttributes visit cli Turning on a gradient background OpenDatabase usr gapps visit data globe silo AddPlot Pseudocolor u AddPlot Mesh mesh1 DrawPlots PP Pp pp pp e Get the current annotation attributes GetAnnotationAttributes foregroundColor 255 255 255 255 gradientBackgroundStyle a TopToBottom gradientColorl 150 200 255 255 backgroundMode a Gradient Make the visualization use a gradient background SetAnnotationAttributes a VisIt Python Interface Manual 199 GlobalAttributes GlobalAttributes GlobalAttributes function and object Synopsis GlobalAttributes gt GlobalAttributes object Returns The GlobalAttributes function returns a GlobalAttributes object Notes The only thing a GlobalAttributes object is good for is knowing some of VisIt s state information such as how many windows there are what the active sources are etc Many of the fields contain simple global flags that you can query and use in control flow logic in your VisIt script Think of GlobalAttributes as being read only Object definition Field Type Default value sources tuple of O string Contains the names of all of the open sources databases simulations etc windows tuple of int 1 activeWindow int 0 iconifiedFlag int 0 au
210. utes object allows you to see whether VisIt is in keyframing mode and if so how many animation frames are in the current keyframe animation Example visit cli k GetKeyframeAttributes print k k enabled k nFrames k nFramesWasUserSet 1 100 1 SetKeyframeAttributes k 88 VisIt Python Interface Manual GetLastError GetLastError Returns a string containing the last error message that VisIt issued Synopsis GetLastError gt string Returns GetLastError returns a string containing the last error message that VisIt issued Description The GetLastError function returns a string containing the last error message that VisIt issued Example visit cli OpenDatabase this database does not exist print VisIt Error s GetLastError VisIt Python Interface Manual 89 GetLight Get Light Returns a light object containing the attributes for a specified light Synopsis GetLight index gt LightAttributes object Arguments index A zero based integer index into the light list Index can be in the range 0 7 Returns GetLight returns a LightAttributes object Description The GetLight function returns a LightAttributes object containing the attributes for a specific light You can use the LightAttributes object that GetLight returns to set light properties and then you can pass the object to SetLight to make VisIt use the light properties that you ve set Example
211. wn in Figure 3 1 Set a blue black radial gradient background a AnnotationAttributes a backgroundMode a Gradient a gradientBackgroundStyle a Radial a gradientColorl 0 0 255 255 Blue a gradientColor2 0 0 0 255 Black SetAnnotationAttributes a Before After DB wave0000 silo 2 Preudocclot aao 01004 Y Axis Figure 3 1 Before and after image of adding a gradient background Visit Python Interface Manual 25 Quick Recipes 10 2 Adding a banner Banners are useful for providing titles for a visualization or for marking its content see Figure 3 2 To add an Unclassified banner to a visualization use the following bit of Python code Create a text object that we ll use to indicate that our visualization is unclassified banner CreateAnnotationObject Text2D banner text Unclassified banner position 0 37 0 95 banner fontBold 1 print the attributes that you can set in the banner object print banner Unclassified Figure 3 2 Adding a banner 10 3 Adding a time slider Time sliders are important annotations for movies since they convey how much progress an animation has made as well as how many more frames have yet to be seen The time slider is also important for showing the simulation time as the animation progresses so users can get a sense of when in the simulation important events occur VisIt s time slider annotation object is shown i
212. wo strings that give the expression name and definition Description The Expressions function returns a tuple of tuples that contain two strings that give the expression name and definition This function is useful for listing the available expressions or for iterating through a list of expressions in order to create plots Example visit cli SetWindowLayout 4 DefineScalarExpression sin_u sin u DefineScalarExpression cos_u cos u DefineScalarExpression neg_u u DefineScalarExpression bob sin_u cos_u for i in range 1 5 SetActiveWindow i OpenDatabase usr gapps visit data globe silo exprName Expressions i 1 0 AddPlot Pseudocolor exprName DrawPlots VisIt Python Interface Manual 75 GetActiveColorTable GetActiveColorTab1e Returns the name of the active color table Synopsis GetActiveContinuousColorTable gt string GetActiveDiscreteColorTable gt string Returns Both functions return a string object containing the name of a color table Description A color table is a set of color values that are used as the colors for plots VisIt supports two flavors of color table continuous and discrete A continuous color table is defined by a small set of color control points and the colors specified by the color control points are interpolated smoothly to fill in any gaps Continuous color tables are used for p
213. y pick variables Example OpenDatabase usr gapps visit data noise silo AddPlot Pseudocolor hgslice DrawPlots Pick 5 5 p GetPickAttributes p showTimeStep 0 p showMeshName 0 p showZoneld 0 SetPickAttributes p Pick 0 5 166 VisIt Python Interface Manual SetPipelineCachingMode SetPipelineCachingMode Sets the pipeline caching mode Synopsis SetPipelineCachingMode mode gt integer Returns The SetPipelineCachingMode function returns 1 for success and 0 for failure Description The SetPipelineCachingMode function turns pipeline caching on or off in the viewer When pipe line caching is enabled animation timesteps are cached for fast playback This can be a disadvan tage for large databases or for plots with many timesteps because it increases memory consumption In those cases it is often useful to disable pipeline caching so the viewer does not use as much memory When the viewer does not cache pipelines each plot for a timestep must be recalculated each time the timestep is visited Example visit cli SetPipelineCachingMode 0 Disable caching OpenDatabase usr gapps visit data wave visit AddPlot Pseudocolor pressure AddPlot Mesh quadmesh DrawPlots for state in range TimeSliderGetNStates SetTimeSliderState state Visit Python Interface Manual 167 SetPlotDatabaseState SetPlotDatabaseState
214. your job when scheduling your job to run You must have expedite privileges for this option to take effect 1 lt method gt Launch VisIt s compute engine in parallel using the given launch pro la lt args gt gram Accepted launch programs are bsub dmpirun mpirun poe prun psub srun yod Be sure to use the launch program that is appro priate for the computer where you want to run VisIt in parallel Provides additional command line arguments to the parallel launch program n lt jobname gt Provides the name for the job nn lt numnodes gt np lt numprocessors gt Specifies a number of nodes to allocate to the job Specifies the number of processors to use from the allocated nodes p lt partition gt Specifies the partition to run in par pl lt method gt Selects the parallel version of VisIt s compute engine Similar to l but only launches the parallel compute engine as specified t lt timelimit gt Maximum job run time Window options background lt color gt foreground lt color gt Background color for the graphical user interface The color can con sist of either a color name or an RGB triplet For example the color red could be specified as background red or background 0000 Foreground color for the graphical user interface The color can consist of either a color name or an RGB triplet For example the color red could be specifi

Download Pdf Manuals

image

Related Search

Related Contents

document  JVC Micro Component System UX-G68    ヤマトニュース - ヤマト自動車  Untitled  Techcon Systems TS6500 CIM Automatic Techkit Mixer  C - ユタカ電気  Instruções de Instalação para GPSMAP® série 700  remko rvs600  Manual de utilização do teclado japonês com  

Copyright © All rights reserved.
Failed to retrieve file