When a set name in sampleDict contains an underscore, pyFoamSamplePlot exits.
Error in /usr/bin/pyFoamSamplePlot.py : PyFoam FATAL ERROR on line 263 of file /usr/lib/python2.6/site-packages/PyFoam/RunDictionary/SampleDirectory.py: The data in file center_line_P.xy is neither vector nor scalar: ['-8.3744e-05', '27.323']
Removing the '_' from center_line solves the problem.
---- additional_information ----
Python version: 2.6.6 (r266:84292, Feb 21 2013, 19:26:11)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
PYTHONPATH: :/opt/software/paraview-3.12.0/lib:/opt/software/paraview-3.12.0/lib/paraview-3.12/site-packages:/local/myname/OpenFOAM/myname-2.1.1/run/cbf/scripts
OpenFOAM (2, 1, 1) of the installed versions ['2.1.1']
pyFoam-Version: 0.5.7
Configuration search path: [('file', '/etc/pyFoam/pyfoamrc'), ('directory', '/etc/pyFoam/pyfoamrc.d'), ('file', '/home/myname/.pyFoam/pyfoamrc'), ('directory', '/home/myname/.pyFoam/pyfoamrc.d')]
Configuration files (used): []
Installed libraries:
Gnuplot : No Not a problem. Version from ThirdParty is used
ply : No Not a problem. Version from ThirdParty is used
Numeric : No Not supported anymore. No need to install it
numpy : Yes version: 1.7.0
matplotlib : Yes version: 1.2.0
psyco : No Not a problem. Acceleration not possible
hotshot : Yes
profile : Yes
cProfile : Yes
PyQt4 : No Only some experimental GUI-stuff relies on this
PyQt4.Qwt5 : No Only an alternate plotting back-end
vtk : No Not a problem. Only used for some utilities
Tkinter : Yes version: $Revision: 73770 $
mercurial : Yes
The command I ran is:
pyFoamSamplePlot.py . --field=P --directory-name=sets --picture-destination=samplePlots
The problem is that the filename is used to determine the name of the line and the fields (which are spearated by '_'). So to find out how many data sets are in the file PyFoam would have to look into the files too.
The problem is further complicated by the fact that
- lines can of course have more than one _ in their name
- field names may also have _ in them
- vectors can be distinguished from scalars only by the number of columns
So a file a_b_c_d with 4 columns can either be
- a line 'a' with three scalars b, c & d
- a line a_b_c with a vector value d
I'll have a look whether there is a STABLE way to fix this