<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aviral2000</id>
		<title>PHASTA Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aviral2000"/>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php/Special:Contributions/Aviral2000"/>
		<updated>2026-06-16T01:26:21Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=VTKpytools&amp;diff=1247</id>
		<title>VTKpytools</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=VTKpytools&amp;diff=1247"/>
				<updated>2021-01-14T16:05:25Z</updated>
		
		<summary type="html">&lt;p&gt;Aviral2000: /* Normal Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''vtkpytools''' is a python package developed in house that has useful tools for generating Visualization ToolKit (VTK) files, and for extracting and manipulating data from VTK files. The code is hosted on a [https://github.com/PHASTA/vtkpytools repository in PHASTA's GitHub organization].&lt;br /&gt;
&lt;br /&gt;
vtkpytools heavily utilizes the [https://docs.pyvista.org/ pyvista] Python package, which provides a Pythonic interface to VTK objects, and the Python bindings for the VTK library itself (which are simply one-to-one copies of the C++ API).&lt;br /&gt;
&lt;br /&gt;
== Using vtkpytools ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== Normal Use ====&lt;br /&gt;
vtkpytools is already installed on the global (&amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;) [[Anaconda|conda environment]] installed on the viz nodes. This also makes all vtkpytool scripts (ie. &amp;lt;code&amp;gt;bar2vtk.py&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;barsplit.py&amp;lt;/code&amp;gt;, etc.) available in your &amp;lt;code&amp;gt;$PATH&amp;lt;/code&amp;gt; when the conda environment is active, allowing them to be used in command line without specifying a path to them. &lt;br /&gt;
&lt;br /&gt;
This installation is with be updated periodically as updates are made. It is installed from a cloned repository at &amp;lt;code&amp;gt;/projects/tools/vtkpytools&amp;lt;/code&amp;gt; and running &amp;lt;code&amp;gt;pip install .&amp;lt;/code&amp;gt; with the conda environment active (see [[Anaconda#Activating_conda_Environment]]). ''Please do not make any changes to this repository''; clone/fork your own copy and make any changes you want there. See next section for how to use your own copy of the package repository&lt;br /&gt;
&lt;br /&gt;
==== Development Use ====&lt;br /&gt;
If you're making changes to the code and want to test it out, there are two ways to &amp;quot;override&amp;quot; the normal installation. &lt;br /&gt;
&lt;br /&gt;
====== Adding to Path ======&lt;br /&gt;
First is adding the development repository to the path that Python searches for packages. This maybe done by modifying the &amp;lt;code&amp;gt;$PYTHONPATH&amp;lt;/code&amp;gt; environment variable:&lt;br /&gt;
&lt;br /&gt;
 PYTHONPATH=path/to/vtkpytools/repository/directory:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
or by using the following commands in a script:&lt;br /&gt;
&lt;br /&gt;
 import sys                                                &lt;br /&gt;
 sys.path.insert(0, 'path/to/vtkpytools/repository/directory') &lt;br /&gt;
&lt;br /&gt;
====== Creating a New (personal) Conda Environment ======&lt;br /&gt;
The second way is [https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands creating a new (personal) conda environment] and installing your copy of the repository there. If going this route, it is recommended to install the package via &amp;lt;code&amp;gt;python setup.py develop&amp;lt;/code&amp;gt; as this will allow updates to be tested without reinstalling the package every time.&lt;br /&gt;
&lt;br /&gt;
=== Abbreviation ===&lt;br /&gt;
&lt;br /&gt;
In Python, it is somewhat customary to use an abbreviation for packages when importing them (&amp;lt;code&amp;gt;numpy -&amp;gt; np&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;pandas -&amp;gt; pd&amp;lt;/code&amp;gt;). In that same vein, &amp;lt;code&amp;gt;vtkpytools&amp;lt;/code&amp;gt; maybe abbreviated to &amp;lt;code&amp;gt;vpt&amp;lt;/code&amp;gt;. For those unfamiliar, this maybe done by&lt;br /&gt;
&lt;br /&gt;
 import vtkpytools as vpt&lt;br /&gt;
&lt;br /&gt;
== Expanding vtkpytools ==&lt;br /&gt;
&lt;br /&gt;
Currently, the vtkpytools repository is structured so that it can be expanded to host useful functions/utilities/scripts for many different kinds of problems/uses. If you would like to make changes/additions to the package, see the (to be added) &amp;lt;code&amp;gt;CONTRIBUTING.md&amp;lt;/code&amp;gt; file in the repository for instructions. &lt;br /&gt;
&lt;br /&gt;
== Tutorials/Related pages ==&lt;br /&gt;
&lt;br /&gt;
Here's a list of tutorial pages related to vtkpytools. This is manually updated, so [[:Category:VTKpytools]] may have more up-to-date references to vtkpytools related wiki pages (''Hint: if it does, add them onto this page!'')&lt;br /&gt;
&lt;br /&gt;
* [[Bar2vtk]]&lt;br /&gt;
* [[Barfiletools]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Post-processing]]&lt;br /&gt;
[[Category:VTKpytools]]&lt;/div&gt;</summary>
		<author><name>Aviral2000</name></author>	</entry>

	</feed>