diaGrabber.source.methods

calc

Includes all classes for calculations for off-the-reel-taken-values of a source-class

class diaGrabber.source.methods.calc.delta(n)[source]

calc. the mean-difference of the last n values :param n: number of the last values to calc the mean from :type n: int

class diaGrabber.source.methods.calc.divideCalcClasses(upperCalcClass, lowerCalcClass)[source]

divide the last calulated values of two given calc-classes

Parameters:
  • upperCalcClass (class of type diaGrabber.methods.calc) – foo
  • lowerCalcClass (class of type diaGrabber.methods.calc) – foo

In this case the derivate d(dim1)/d(dim2) middled for the last 10 valued will be calculated This procedure will only work if both dimensions are in merge or basis.

use it like this:

dim1 = myFile.basisDimension(...) # or mergeDimension
dim1.appendCalc(calc.delta(10))

dim2 = myFile.basisDimension(...)
dim2.appendCalc(calc.delta(10))
#<<<
dim2.appendCalc( calc.divideCalcClasses(dim1.getCalc(0), dim2.getCalc(0)) )
#>>>
class diaGrabber.source.methods.calc.mean(n)[source]

calc. the mean of the last n values :param n: number of the last values to calc the mean from :type n: int

merge

This module includes all methods to merge values from type diaGrabber.source._dimension.mergeDimension. “Merge” means in this case to handle an incoming new value at a place in the target where other values exists allready. Depending on the chosen target-class diaGrabber.target its also possible that incomming values have an intensity < 1 because the orig. values were splitted.

class diaGrabber.source.methods.merge.last[source]

Take every last incomming value. Do not merge with old values. This is the standard-procedure.

class diaGrabber.source.methods.merge.max[source]

Take only the maximum of all incomming values.

class diaGrabber.source.methods.merge.mean[source]

Caluculate and take the mean of all incomming values.

class diaGrabber.source.methods.merge.min[source]

Take only the minimum of all incomming values.

class diaGrabber.source.methods.merge.sum[source]

Caluculate and take the sum of all incomming values.

exclude

Includes all classes for criteria to exclude off-the-reel-taken-values of a source-class private methods _get will return True if the value fullfills the criteria and falas if it fails.

class diaGrabber.source.methods.exclude.absValueBiggerValue(dimInstance, value)[source]

exclude value if the last abs(value) from given dimInstance is bigger than the given value

class diaGrabber.source.methods.exclude.calcBiggerValue(calcClass, value)[source]

exclude value if result of a calc.xx-class is bigger than the given value

class diaGrabber.source.methods.exclude.calcSmallerCalc(dim1, dim2)[source]

exclude value if result of dimension.calc[dim1] is smaller than dimension.calc[dim2]

class diaGrabber.source.methods.exclude.calcSmallerValue(calcClass, value)[source]

exclude value if result of a calc.xx-class is smaller than the given value

class diaGrabber.source.methods.exclude.valueBiggerValue(dimInstance, value)[source]

exclude value if the last value from given dimInstance is bigger than the given value

class diaGrabber.source.methods.exclude.valueSmallerValue(dimInstance, value)[source]

exclude value if the last value from given dimInstance is bigger than the given value

transform

The transform-module include classes to transform values and units.

class diaGrabber.source.methods.transform.fx(fx_str, unit)[source]

Get y-values from given f(x)-functions.

Parameters:
  • source_l (string) – some function e.q. “3x/2”
  • name (string) – name of the y-dimension
get(x)[source]

transform ‘x’ through evaluation of the given fn-string. Note that this is the slowest method of transformation.

class diaGrabber.source.methods.transform.interpolationTable(source_l, unit)[source]

Get y-values from given (also unsorted) point(x,y) values. Do a linear interpolation between given points and extrapolate with the first and last y-value. This class in analoque the the openFOAM-class of the same name.

Parameters:
  • source_l (list) –

    list of discrete foat-point values e.q.:

    [[0,1],
    [2,3],
    [10,2]]
    
  • name (string) – name of the y-dimension
get(x)[source]

return a linear interpolated value between given points. Return the last/fist given values for all ‘x’ aboth/beneath the border

class diaGrabber.source.methods.transform.linear(factor, offset, unit)[source]

Get y-values from given f(x)-functions.

Parameters:
  • source_l (string) – some function e.q. “3x/2”
  • name (string) – name of the y-dimension
get(x)[source]

return y = factor * x + offset

Table Of Contents

Previous topic

Container-Classes

Next topic

diaGrabber.target

This Page