PyFoam.RunDictionary.SampleDirectory module¶
Working with a directory of samples
-
class
PyFoam.RunDictionary.SampleDirectory.
SampleData
(fName, name, line, index, coord, data, note='', scale=(1, 1), offset=(0, 0))[source]¶ Bases:
object
Data from a sample-set
-
class
PyFoam.RunDictionary.SampleDirectory.
SampleDirectory
(case, dirName='samples', postfixes=[], prefixes=[], valueNames=None, linePattern=None, namesFromFirstLine=False, needsExtension=True)[source]¶ Bases:
object
A directory of sampled times
-
getData
(line=None, value=None, time=None, note='', scale=(1, 1), offset=(0, 0))[source]¶ Get Sample sets :param line: name of the line. All if unspecified :param value: name of the sampled value. All if unspecified :param time: times for which the samples are to be got. All if unspecified :param note: A short annotation (for plots) :param scale: pair of factors with which the data is scaled when being plotted :param offset: pair of offsets
-
-
class
PyFoam.RunDictionary.SampleDirectory.
SampleTime
(sDir, time, postfixes=[], prefixes=[], valueNames=None, namesFromFirstLine=False, linePattern=None, needsExtension=True)[source]¶ Bases:
object
A directory with one sampled time
-
determineIndex
(fName, vName, data)[source]¶ Determines the index of the data from the filename and a dataset :param fName: name of the file :param vName: Name of the quantity :param data: A list with the data :returns: A tuple of a boolean (whether the data is supposed to be a vector or a scalar) and an integer (the index of the data set - or the first component of the vector
-