Package PyFoam :: Package RunDictionary :: Module SampleDirectory :: Class SampleDirectory
[hide private]
[frames] | no frames]

Class SampleDirectory

source code


A directory of sampled times

Instance Methods [hide private]
 
__contains__(self, time) source code
 
__getitem__(self, time) source code
 
__init__(self, case, dirName='samples', postfixes=[], prefixes=[], valueNames=None, linePattern=None, namesFromFirstLine=False, needsExtension=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__iter__(self) source code
 
__len__(self) source code
 
getData(self, line=None, value=None, time=None, note='', scale=(1, 1), offset=(0, 0))
Get Sample sets
source code
 
lines(self)
Returns all the found sample lines
source code
 
values(self)
Returns all the found sampled values
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, case, dirName='samples', postfixes=[], prefixes=[], valueNames=None, linePattern=None, namesFromFirstLine=False, needsExtension=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • case - The case directory
  • dirName - Name of the directory with the samples
  • postfixes - list of possible extensions to a field name of the form name_postfix to help splitting such field names.
  • prefixes - list of possible extensions to a field name of the form prefix_name to help splitting such field names
  • valueNames - List of value names. If specified then the classes do not try to determine the names automatically
  • linePattern - Regular expression to determine the name of the line from the filename. The first group in the expression is the name. If unset the linename is determined automatically
  • needsExtension - whether a file needs an extension
Overrides: object.__init__

getData(self, line=None, value=None, time=None, note='', scale=(1, 1), offset=(0, 0))

source code 

Get Sample sets

Parameters:
  • line - name of the line. All if unspecified
  • value - name of the sampled value. All if unspecified
  • time - times for which the samples are to be got. All if unspecified
  • note - A short annotation (for plots)
  • scale - pair of factors with which the data is scaled when being plotted
  • offset - pair of offsets