Python meshtal -> VTK converter.
Processes rectangular meshtallies. Output vtk files contain a rectilinear grid with cell values.
Only rectangular meshtally.
In case emesh
is used to split into energy bins, the resulting vtk file
contains values only from the total bin.
# Using the wrapper script:
>tovtk meshtal
# Using Python directly:
>pyhton -m tovtk meshtal
Get source from the github:
>mkdir tovtk-git
>cd tovtk-git
>git clone git@github.com:inr-kit/tovtk.git .
Use pip
to install:
# with --user option does not require admin rights,
# but PATH variable may need adjustments to point to
# $HOME/.local/bin
>pip install --user -e .
# Or without the --user option. in this case requires admin rights
>sudo pip install -e .
If pip
is not available in the system, it can be installed with the following commands:
# Download pip distribution, see https://pip.pypa.io/en/stable/installing/
>wget https://bootstrap.pypa.io/get-pip.py
# To install locally:
>python get-pip.py --user
# To install system-wide:
>sudo python get-pip.py
The local variant installs pip
to $HOME/.local/bin
. Ensure to add this folder to the $PATH
variable.
The tovtk package uses the numpy package and Python bindings to VTK library. In a recent ubuntu they can be installed with
>sudo apt-get install python-numpy
>sudo apt-get install python-vtk
Alternatively, Anaconda includes numpy and vtk among many others.
The current version of Python 2.7 is shipped with pip
, which can be used to install the precompiled numpy
package.