GXEXP class¶
- class GXEXP(handle=0)[source]¶
GXEXP class.
GXEXP
objects are created from text strings that contain C-like math to be applied to channels in a database. It is used with theGXDU.math
function (seeGXDU
). See alsoGXIEXP
for applying math expressions to images (grids). See alsoGXDU.math
applies expressions to the database- classmethod create(db, formula, unused)[source]¶
This method creates an
GXEXP
object.- Parameters:
db (GXDB) – Database Object
formula (str) – Expression using channel names
unused (int) – Legacy parameter, no longer used.
- Returns:
GXEXP
Object- Return type:
New in version 5.0.
License: Geosoft End-User License
Note: Expressions are strings that contain C-like math to be applied to channels in a database. For example, following an expression:
"@a = mag-64000; @b = gravity*100; $sRatio = @a/@b; MULT = @a *@b;"
Rules:
;
terminates a sub-expression
@
prefix to a temporary name, which is a double precision floating point number to be used later in the same expression.
$
prefix to a local GX variable name. Such names will be evaluated to the variable value at the time
create
is called.
All other tokens are assumed to be channel names.
- classmethod create_file(db, file)[source]¶
This method creates an
GXEXP
object from a fileNew in version 5.0.
License: Geosoft End-User License