From 1c08152e65de55e41067fdaf5ad1a8cdf9a393fe Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Tue, 3 Nov 2015 10:27:06 +0100 Subject: [PATCH] vkt file "rel" changed to changes in percent --- pylot/core/active/fmtomo2vtk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pylot/core/active/fmtomo2vtk.py b/pylot/core/active/fmtomo2vtk.py index 10cbe879..59c0968e 100644 --- a/pylot/core/active/fmtomo2vtk.py +++ b/pylot/core/active/fmtomo2vtk.py @@ -93,7 +93,10 @@ def vgrids2VTK(inputfile = 'vgrids.in', outputfile = 'vgrids.vtk', absOrRel = 'a outfile.writelines('SPACING %f %f %f\n' %(dX, dY, dZ)) outfile.writelines('POINT_DATA %15d\n' %(nPoints)) - outfile.writelines('SCALARS velocity float %d\n' %(1)) + if absOrRel == 'abs': + outfile.writelines('SCALARS velocity float %d\n' %(1)) + elif absOrRel == 'rel': + outfile.writelines('SCALARS velChangePercent float %d\n' %(1)) outfile.writelines('LOOKUP_TABLE default\n') # write velocity