GXEXP class

class geosoft.gxapi.GXEXP
EXP objects are created from text strings that contain
C-like math to be applied to channels in a database.
It is used with the geosoft.gxapi.GXDU.math() function (see DU). See also
IEXP for applying math expressions to images (grids).
See also geosoft.gxapi.GXDU.math() applies expressions to the database
static create((GXDB)arg1, (str)arg2, (int)arg3) → GXEXP:
This method creates an EXP object.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (str) – Expression using channel names
  • arg3 (int) – Maximum size of expression after expanding all local variables (those with $ prefix).
Returns:

EXP Object

Return type:

geosoft.gxapi.GXEXP

New in version 5.0.0.

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 geosoft.gxapi.GXEXP.create()
        is called.

   All other tokens are assumed to be channel names.
static create_file((GXDB)arg1, (str)arg2) → GXEXP:
This method creates an EXP object from a file
Parameters:
Returns:

EXP Object

Return type:

geosoft.gxapi.GXEXP

New in version 5.0.0.

is_null() → bool

Check if the instance of geosoft.gxapi.GXEXP is null (undefined)

Returns:True if this is a null instance of geosoft.gxapi.GXEXP, False otherwise.
Return type:bool`
static null() → GXEXP

A null (undefined) instance of geosoft.gxapi.GXEXP

Returns:A null geosoft.gxapi.GXEXP
Return type:geosoft.gxapi.GXEXP