# Voxel plot script

**URL:** https://openmc.discourse.group/t/voxel-plot-script/603
**Category:** User Support
**Created:** [May 13, 2020, 2:25pm UTC](https://openmc.discourse.group/t/voxel-plot-script/603 "2020-05-13T14:25:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![YimingZ](https://avatars.discourse-cdn.com/v4/letter/y/f19dbf/32.png) [@YimingZ](https://openmc.discourse.group/u/YimingZ)
#### Post date: [May 13, 2020, 2:25pm UTC](https://openmc.discourse.group/t/voxel-plot-script/603/1 "2020-05-13T14:25:40Z")

</div>

Hi,

I am trying to make 3D reactor core voxel plots by university’ high-performance computer. The rule of HPC work is submitting a sbatch script with the application and requirement. Therefore, I need to write a python .py file contains OpenMC code. But I can not run _openmc-voxel-to-vtk_ script by command line.

Is there any method to run this script in the python .py file, and let it output the .vti file. Please let me know if you have any idea.

Thanks,

Yiming

---

<div class="post-metadata">

### Author: ![pshriwise](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pshriwise/32/3863_2.png) [@pshriwise](https://openmc.discourse.group/u/pshriwise)
#### Post date: [May 13, 2020, 3:03pm UTC](https://openmc.discourse.group/t/voxel-plot-script/603/2 "2020-05-13T15:03:59Z")

</div>

Hi Yiming,

Based on how the `openmc-voxel-to-vtk` script is currently structured, it’s difficult at this point to import that capability into another Python script. I’ll work on updating that.

Until then, could you perhaps call the script from the python file using the `subprocess` module?

Another alternative might be to copy the OpenMC voxel file (`.h5`) to your local machine from the HPC system, but if you’re generating a voxel file for a full core it may be too large for that.

Patrick Shriwise  
608-446-8173
