mpacts.core. lut

In order to be able to use this module import it like this:

import mpacts.core.lut
#or assign it to a shorter name
import mpacts.core.lut as lut

LUT_1D_Scalar

class mpacts.core.lut.LUT_1D_Scalar

Bases: mpacts.core.baseobject.BaseObject

One dimensional Look Up Table (LUT) for Scalar properties.
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, lut, [do_not_throw]
LUT_1D_Scalar(name, parent, **kwargs)
lookup((LUT_1D_Scalar)arg1, (float)arg2) → float

LUT_1D_Vector

class mpacts.core.lut.LUT_1D_Vector

Bases: mpacts.core.baseobject.BaseObject

One dimensional Look Up Table (LUT) for Vector properties.
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, lut, [do_not_throw]
LUT_1D_Vector(name, parent, **kwargs)
lookup((LUT_1D_Vector)arg1, (float)arg2) → object

LUT_2D_Scalar

class mpacts.core.lut.LUT_2D_Scalar

Bases: mpacts.core.baseobject.BaseObject

Two dimensional Look Up Table (LUT) for Scalar properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, lut, [do_not_throw]
LUT_2D_Scalar(name, parent, **kwargs)
lookup((LUT_2D_Scalar)arg1, (float)arg2, (float)arg3) → float

LUT_2D_Vector

class mpacts.core.lut.LUT_2D_Vector

Bases: mpacts.core.baseobject.BaseObject

Two dimensional Look Up Table (LUT) for Vector properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, lut, [do_not_throw]
LUT_2D_Vector(name, parent, **kwargs)
lookup((LUT_2D_Vector)arg1, (float)arg2, (float)arg3) → object

LUT_3D_Scalar

class mpacts.core.lut.LUT_3D_Scalar

Bases: mpacts.core.baseobject.BaseObject

Three dimensional Look Up Table (LUT) for Scalar properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • axis2 — a list containing the (uniformly spaced) points of axis2.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, axis2, lut, [do_not_throw]
LUT_3D_Scalar(name, parent, **kwargs)
lookup((LUT_3D_Scalar)arg1, (float)arg2, (float)arg3, (float)arg4) → float

LUT_3D_Vector

class mpacts.core.lut.LUT_3D_Vector

Bases: mpacts.core.baseobject.BaseObject

Three dimensional Look Up Table (LUT) for Vector properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • axis2 — a list containing the (uniformly spaced) points of axis2.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, axis2, lut, [do_not_throw]
LUT_3D_Vector(name, parent, **kwargs)
lookup((LUT_3D_Vector)arg1, (float)arg2, (float)arg3, (float)arg4) → object

LUT_4D_Scalar

class mpacts.core.lut.LUT_4D_Scalar

Bases: mpacts.core.baseobject.BaseObject

Four dimensional Look Up Table (LUT) for Scalar properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • axis2 — a list containing the (uniformly spaced) points of axis2.
    • axis3 — a list containing the (uniformly spaced) points of axis3.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, axis2, axis3, lut, [do_not_throw]
LUT_4D_Scalar(name, parent, **kwargs)
lookup((LUT_4D_Scalar)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) → float

LUT_4D_Vector

class mpacts.core.lut.LUT_4D_Vector

Bases: mpacts.core.baseobject.BaseObject

Four dimensional Look Up Table (LUT) for Vector properties.

When creating multidimensional lookup tables in python the axis information and the actual lookuptable cannot be linked together in one datastructure. It is therefore very important that there is consistency in how the table is given to C++ as a one dimensional array. The layout and manner in which the array is ‘flattened’ needs to be consistent. In order to avoid errors the recommended way of creating a lookup table is as follows:

import pyDEMeter.BaseTypes.LookUpTables as luts 
def f(x,y,z): return np.sin(x)*np.cos(y)+z 
x = np.linspace(-3, 3, 20) 
y = np.linspace(-3, 3, 19) 
z = np.linspace(-3, 3, 18) 
xx,yy,zz = np.mgrid[ -3:3:20j, -3:3:19j, -3:3:18j] 
w = f(xx,yy,zz) 
mylut = luts.LUT_3D_Scalar( lut = w.flatten().tolist(), axis0=x.tolist(), axis1=y.tolist(), axis2=z.tolist()) 
Please note that using numpy meshgrid will result in inconsitent results!
Has no default location.
  • Required keywords:
    • axis0 — a list containing the (uniformly spaced) points of axis0.
    • axis1 — a list containing the (uniformly spaced) points of axis1.
    • axis2 — a list containing the (uniformly spaced) points of axis2.
    • axis3 — a list containing the (uniformly spaced) points of axis3.
    • lut — Look Up Table that has been flattened (row-major)
  • Optional keywords:
    • do_not_throw (default value = 0) — When set to true, the look up table will no throw when the requested lookup is out of range. It will return the closest in-range value for the out of range requested value.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: axis0, axis1, axis2, axis3, lut, [do_not_throw]
LUT_4D_Vector(name, parent, **kwargs)
lookup((LUT_4D_Vector)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) → object
mpacts.core.lut.create_LUT_1D_Scalar_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_1D_Vector_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_2D_Scalar_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_2D_Vector_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_3D_Scalar_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_3D_Vector_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_4D_Scalar_Array((str)arg1) → Array
mpacts.core.lut.create_LUT_4D_Vector_Array((str)arg1) → Array