GXEXP class

class geosoft.gx.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.gx.GXDU.math() function (see DU). See also
IEXP for applying math expressions to images (grids).
See also geosoft.gx.GXDU.math() applies expressions to the database
static create((GXContext)ctx, (GXDB)arg1, (str)arg2, (int)arg3) → GXEXP:
This method creates an EXP object.
Parameters:
  • ctx (geosoft.gx.GXContext) – The GX execution context
  • arg1 (geosoft.gx.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.gx.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.gx.GXEXP.create()
        is called.

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

EXP Object

Return type:

geosoft.gx.GXEXP

New in version 5.0.0.

is_null() → bool

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

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

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

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