GXPGU class¶
-
class
geosoft.gx.
GXPGU
¶ A collection of methods applied to PG objects, including fills, trending and 2-D FFT operations.
-
static
add_scalar
((GXContext)ctx, (GXPG)arg1, (float)arg2) → None:¶ Add a scalar value to a pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Pager - arg2 (float) – Scalar Value
Returns: Nothing
Return type: None
New in version 7.1.0.
Note:
Only available for FLOAT or DOUBLE pagers
- ctx (
-
static
bool_mask
((GXContext)ctx, (GXPG)arg1, (str)arg2) → None:¶ Apply reference file boolean mask to pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – pager obj - arg2 (str) – sRefFil - reference file for boolean mask flag.
Returns: Nothing
Return type: None
New in version 5.0.0.
- ctx (
-
static
correlation_matrix
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2) → None:¶ Find the correlations between columns in a matrix
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input matrix - arg2 (
geosoft.gx.GXPG
) – returned correlation matrix
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The input matrix is M rows by N columns. The returned matrix is a symmetric N by N matrix whose elements are the normalized dot products of the columns of the input matrix with themselves. The elements take on values from 0 (orthogonal) to 1 (parallel).
- ctx (
-
static
correlation_matrix2
((GXContext)ctx, (GXPG)arg1, (int)arg2, (GXPG)arg3) → None:¶ Same as
geosoft.gx.GXPGU.correlation_matrix()
, but select correlation type.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input matrix - arg2 (int) – PGU_CORR constants
- arg3 (
geosoft.gx.GXPG
) – returned correlation matrix
Returns: Nothing
Return type: None
New in version 5.1.8.
- ctx (
-
static
direct_gridding_dat
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (GXDAT)arg7, (int)arg8) → None:¶ Direct-gridding method, DAT version.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (float) – X origin of grid
- arg3 (float) – Y origin of grid
- arg4 (float) – X cell size
- arg5 (float) – Y cell size
- arg6 (float) – rotation angle (degrees CCW).
- arg7 (
geosoft.gx.GXDAT
) – DAT source - arg8 (int) – PGU_DIRECTGRID constants
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
Grid cells take on the specified statistic of the values inside the cell area. Grid cells containing no data values are set to dummy.
- ctx (
-
static
direct_gridding_dat_3d
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (GXDAT)arg9, (int)arg10) → None:¶ Direct-gridding method, DAT version, 3D.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input 3D PG - arg2 (float) – X origin of 3D grid
- arg3 (float) – Y origin of 3D grid
- arg4 (float) – Z origin of 3D grid
- arg5 (float) – X cell size
- arg6 (float) – Y cell size
- arg7 (float) – Z cell size
- arg8 (float) – rotation angle (degrees CCW, vertical axis only).
- arg9 (
geosoft.gx.GXDAT
) – 3D DAT source - arg10 (int) – PGU_DIRECTGRID constants
Returns: Nothing
Return type: None
New in version 8.0.0.
Note:
3D grid cells take on the specified statistic of the values inside the cell area. Grid cells containing no data values are set to dummy.
- ctx (
-
static
direct_gridding_db
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (GXDB)arg7, (int)arg8, (int)arg9, (int)arg10, (int)arg11) → None:¶ Direct-gridding method, DB version.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (float) – X origin of grid
- arg3 (float) – Y origin of grid
- arg4 (float) – X cell size
- arg5 (float) – Y cell size
- arg6 (float) – rotation angle (degrees CCW).
- arg7 (
geosoft.gx.GXDB
) – Database - arg8 (int) – X Channel [READONLY]
- arg9 (int) – Y Channel [READONLY]
- arg10 (int) – Data Channel [READONLY]
- arg11 (int) – PGU_DIRECTGRID constants
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
Grid cells take on the specified statistic of the values inside the cell area. Grid cells containing no data values are set to dummy.
- ctx (
-
static
direct_gridding_db_3d
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (GXDB)arg9, (int)arg10, (int)arg11, (int)arg12, (int)arg13, (int)arg14) → None:¶ Direct-gridding method, DB version, 3D.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input 3D PG - arg2 (float) – X origin of 3D grid
- arg3 (float) – Y origin of 3D grid
- arg4 (float) – Z origin of 3D grid
- arg5 (float) – X cell size
- arg6 (float) – Y cell size
- arg7 (float) – Z cell size
- arg8 (float) – rotation angle (degrees CCW, vertical axis only).
- arg9 (
geosoft.gx.GXDB
) – Database - arg10 (int) – X Channel [READONLY]
- arg11 (int) – Y Channel [READONLY]
- arg12 (int) – Z Channel [READONLY]
- arg13 (int) – Data Channel [READONLY]
- arg14 (int) – PGU_DIRECTGRID constants
Returns: Nothing
Return type: None
New in version 8.0.0.
Note:
3D grid cells take on the specified statistic of the values inside the cell area. Grid cells containing no data values are set to dummy.
- ctx (
-
static
direct_gridding_vv
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (GXVV)arg7, (GXVV)arg8, (GXVV)arg9, (int)arg10) → None:¶ Direct-gridding method, VV version.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (float) – X origin of grid
- arg3 (float) – Y origin of grid
- arg4 (float) – X cell size
- arg5 (float) – Y cell size
- arg6 (float) – rotation angle (degrees CCW).
- arg7 (
geosoft.gx.GXVV
) – X locations of values - arg8 (
geosoft.gx.GXVV
) – Y locations of values - arg9 (
geosoft.gx.GXVV
) – Z values to grid - arg10 (int) – PGU_DIRECTGRID constants
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
Grid cells take on the specified statistic of the values inside the cell area. Grid cells containing no data values are set to dummy.
- ctx (
-
static
dw_gridding_dat
((GXContext)ctx, (GXPG)arg1, (GXDAT)arg2, (GXREG)arg3) → None:¶ geosoft.gx.GXPGU.dw_gridding_dat()
Inverse-distance weighting gridding method, DAT version.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (
geosoft.gx.GXDAT
) – DAT source - arg3 (
geosoft.gx.GXREG
) – Parameters (see above)
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
See the notes for
geosoft.gx.GXPGU.dw_gridding_db()
.- ctx (
-
static
dw_gridding_dat_3d
((GXContext)ctx, (GXPG)arg1, (GXDAT)arg2, (GXREG)arg3) → None:¶ geosoft.gx.GXPGU.dw_gridding_dat_3d()
Inverse-distance weighting gridding method, DAT version, 3D.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input 3D PG - arg2 (
geosoft.gx.GXDAT
) – DAT source - arg3 (
geosoft.gx.GXREG
) – Parameters (see above)
Returns: Nothing
Return type: None
New in version 8.0.0.
Note:
See the notes for
geosoft.gx.GXPGU.dw_gridding_db_3d()
.- ctx (
-
static
dw_gridding_db
((GXContext)ctx, (GXPG)arg1, (GXDB)arg2, (int)arg3, (int)arg4, (int)arg5, (GXREG)arg6) → None:¶ geosoft.gx.GXPGU.dw_gridding_db()
Inverse-distance weighting gridding method, DB version.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (
geosoft.gx.GXDB
) – Database - arg3 (int) – X Channel [READONLY]
- arg4 (int) – Y Channel [READONLY]
- arg5 (int) – Data Channel [READONLY]
- arg6 (
geosoft.gx.GXREG
) – Parameters (see above)
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
Grid cells take on the averaged values within a search radius, weighted inversely by distance. Weighting can be controlled using the power and slope properties; weighting = 1 / (distance^wtpower + 1/slope) where distance is in units of grid cells (X dimenstion). Default is 0.0, If the blanking distance is set, all cells whose center point is not within the blanking distance of at least one data point are set to dummy. REG Parameters: X0, Y0, DX, DY: Grid origin, and cell sizes (required) WT_POWER (default=2), WT_SLOPE (default=1) Weighting function parameters SEARCH_RADIUS: Distance weighting limit (default = 4 * SQRT(DX*DY)) BLANKING_DISTANCE: Dummy values farther from data than this distance. (default = 4 * SQRT(DX*DY)) LOG: Apply log transform to input data before gridding (0:No (default), 1:Yes)? LOG_BASE: One of VV_LOG_BASE_10 (default) or VV_LOG_BASE_E LOG_NEGATIVE: One of VV_LOG_NEGATIVE_NO (default) or VV_LOG_NEGATIVE_YES
- ctx (
-
static
dw_gridding_db_3d
((GXContext)ctx, (GXPG)arg1, (GXDB)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (GXREG)arg7) → None:¶ geosoft.gx.GXPGU.dw_gridding_db_3d()
Inverse-distance weighting gridding method, DB version, 3D.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input 3D PG - arg2 (
geosoft.gx.GXDB
) – Database - arg3 (int) – X Channel [READONLY]
- arg4 (int) – Y Channel [READONLY]
- arg5 (int) – Z Channel [READONLY]
- arg6 (int) – Data Channel [READONLY]
- arg7 (
geosoft.gx.GXREG
) – Parameters (see above)
Returns: Nothing
Return type: None
New in version 8.0.0.
Note:
3D cells take on the averaged values within a search radius, weighted inversely by distance. Weighting can be controlled using the power and slope properties; weighting = 1 / (distance^wtpower + 1/slope) where distance is in units of grid cells (X dimenstion). Default is 0.0, If the blanking distance is set, all cells whose center point is not within the blanking distance of at least one data point are set to dummy. REG Parameters: X0, Y0, Z0, DX, DY, DZ: Grid origin, and cell sizes (required) WT_POWER (default=2), WT_SLOPE (default=1) Weighting function parameters SEARCH_RADIUS: Distance weighting limit (default = 4 * CUBE_ROOT(DX*DY*DZ)) BLANKING_DISTANCE: Dummy values farther from data than this distance. (default = 4 * CUBE_ROOT(DX*DY*DZ)) LOG: Apply log transform to input data before gridding (0:No (default), 1:Yes)? LOG_BASE: One of VV_LOG_BASE_10 (default) or VV_LOG_BASE_E LOG_NEGATIVE: One of VV_LOG_NEGATIVE_NO (default) or VV_LOG_NEGATIVE_YES
- ctx (
-
static
dw_gridding_vv
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (GXREG)arg5) → None:¶ geosoft.gx.GXPGU.dw_gridding_vv()
Inverse-distance weighting gridding method, VV version.Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input grid - arg2 (
geosoft.gx.GXVV
) – X locations - arg3 (
geosoft.gx.GXVV
) – Y locations - arg4 (
geosoft.gx.GXVV
) – Data values to grid - arg5 (
geosoft.gx.GXREG
) – Parameters (see above)
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
See the notes for
geosoft.gx.GXPGU.dw_gridding_db()
.- ctx (
-
static
expand
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2, (float)arg3, (int)arg4, (int)arg5, (int)arg6) → None:¶ Expand a pager by filling the dummies for expanded edges
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – original pager obj - arg2 (
geosoft.gx.GXPG
) – expanded pager obj - arg3 (float) – % expansion
- arg4 (int) – option 0 - rectangular, 1 - square
- arg5 (int) – X dimension to expand to (0 for expansion to FFT2D legal dimension)
- arg6 (int) – Y dimension to expand to (0 for expansion to FFT2D legal dimension)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
3D pagers are expanded in X,Y direction the number of slices(Z) is unchanged .
- ctx (
-
static
fill
((GXContext)ctx, (GXPG)arg1, (int)arg2, (float)arg3, (int)arg4, (int)arg5, (int)arg6, (float)arg7, (float)arg8, (int)arg9, (int)arg10, (str)arg11) → None:¶ Replace all dummies in a pager by predict values.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – pager obj - arg2 (int) – Roll off weighting option: 1 - linear, 2 - square
- arg3 (float) – dRollBase - the value to roll off to, GS_R8DM for roll off to mean value line by line.
- arg4 (int) – lRollDist - (at unit of cell dist.) for roll-off. 0 for no roll of, -1 for the default: 2 times of min. dummy edge dim.
- arg5 (int) – lMxf - max. filter length. -1 for no max. entropy. 0 for the default of MIN(minimum dummy edge dim, 32).
- arg6 (int) – lMxp - max. pred. sample 0 for the default of 2*lMxf.
- arg7 (float) – dAmpLmt - limit (abs. value) amplitudes to this level. Amplitudes are limited starting at half this value. <=0.0 for no amp limit.
- arg8 (float) – dEdgeLmt - limit edge (abs. value) amplitudes to this level. <0.0 for no edge limit.
- arg9 (int) – lEdgeWidth - within this dist. (at unit of cell size) for amp. limited. -1 for no edge limit. 0 for the default of minimum dummy edge dim.
- arg10 (int) – iNPass - number of time to pass smooth filter
- arg11 (str) – sRefFil - reference file for smooth filter flag.
Returns: Nothing
Return type: None
New in version 5.0.0.
- ctx (
-
static
fill_value
((GXContext)ctx, (GXPG)arg1, (float)arg2) → None:¶ Set all values in a pager to a single value.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – pager obj - arg2 (float) – Value to set in pager
Returns: Nothing
Return type: None
New in version 5.0.8.
- ctx (
-
static
filt_sym
((GXContext)ctx, (GXPG)arg1, (int)arg2, (int)arg3, (str)arg4, (int)arg5, (GXVV)arg6) → None:¶ Apply 5x5, 7x7 or 9X9 symmetric convolution filter to a PG.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – pager obj - arg2 (int) – number of time to pass smooth filter
- arg3 (int) – flag to use filter file
- arg4 (str) – file for filter values
- arg5 (int) – size of filter window, 5/7/9
- arg6 (
geosoft.gx.GXVV
) – array of 6/10/15 filter coefficients
Returns: Nothing
Return type: None
New in version 5.1.5.
- ctx (
-
static
filt_sym5
((GXContext)ctx, (GXPG)arg1, (int)arg2, (int)arg3, (str)arg4, (GXVV)arg5) → None:¶ Apply 5x5 symmetric convolution filter to a PG.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – pager obj - arg2 (int) – number of time to pass smooth filter
- arg3 (int) – flag to use filter file
- arg4 (str) – file for filter values
- arg5 (
geosoft.gx.GXVV
) – array of 6 filter coefficients at position 00, 10, 11, 20, 21, 22. Symmetric filters look like : 22 21 20 21 22 21 11 10 11 21 20 10 00 10 20 21 11 10 11 21 22 21 20 21 22
Returns: Nothing
Return type: None
New in version 5.0.0.
- ctx (
-
static
grid_peak
((GXContext)ctx, (str)arg1, (int)arg2, (GXVV)arg3, (GXVV)arg4, (GXVV)arg5) → None:¶ Pick grid peaks.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (str) – Grid file name
- arg2 (int) – BLAKEY_TEST constants
- arg3 (
geosoft.gx.GXVV
) – X of found peaks - arg4 (
geosoft.gx.GXVV
) – Y of found peaks - arg5 (
geosoft.gx.GXVV
) – Z values of found peaks
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Blakey test limit defines how grid peaks are to be found. For example, with the BLAKEY_TEST_ONESIDE, a grid point will be picked if its grid value is greater than the value of one or more of its four neighouring points.
- ctx (
-
static
invert_matrix
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2) → None:¶ Inverts a square matrix using LU decomp. and back-substitution
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input matrix - arg2 (
geosoft.gx.GXPG
) – Output inverted matrix (can be same as input).
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This is an "in-place" operation, and set up so that the input and output pagers may be the same handle. (If they are different, the input pager remains unchanged). Pagers and VVs must be type REAL.
- ctx (
-
static
jacobi
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXPG)arg3) → None:¶ Find eigenvalues, eigenvectors of a real symmetric matrix.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input Pager - arg2 (
geosoft.gx.GXVV
) – Eigenvalues (returned) - arg3 (
geosoft.gx.GXPG
) – Eigenvectors (returned)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The number of rows must equal the number of columns. Eienvalues, vectors are sorted in descending order.
- ctx (
-
static
lu_back_sub
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4) → None:¶ Solve a linear system using LU decomposition and back-substitution.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – LU decomposition of A - arg2 (
geosoft.gx.GXVV
) – permutation vector (type INT) - arg3 (
geosoft.gx.GXVV
) – right hand side vector B (input) - arg4 (
geosoft.gx.GXVV
) – solution vector (output)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Solves the system Ax = b for a given b, using the LU decomposition of the matrix a The LU decomposition and the permutation vector are obtained from
geosoft.gx.GXPGU.lu_back_sub()
. Pagers and VVs must be type REAL except for the permutation vector, which should be INT- ctx (
-
static
lu_decomp
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2, (GXVV)arg3) → None:¶ Perform an LU decomposition on a square pager.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input - arg2 (
geosoft.gx.GXPG
) – LU decomposition (may be same pager as input) - arg3 (
geosoft.gx.GXVV
) – permutation vector (type INT)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The L and U matrix are both contained in the returned pager; The "L" matrix is composed of the sub-diagonal elements of the output pager, as well as "1" values on the diagonal. The "U" matrix is composed of the diagonal elements (sub-diagonal elements set to 0). This is an "in-place" operation, and set up so that the input and output pagers may be the same handle. (If they are different, the input pager remains unchanged). The LU decomposition, and the permutation vector are used for
geosoft.gx.GXPGU.lu_back_sub()
. Pagers must be type REAL and the permutation vector type INT- ctx (
-
static
matrix_mult
((GXContext)ctx, (GXPG)arg1, (int)arg2, (GXPG)arg3, (int)arg4, (GXPG)arg5) → None:¶ Multiply two pagers as if they were matrices.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – matrix U - arg2 (int) – TRUE (1) if U should be transposed before multiplication
- arg3 (
geosoft.gx.GXPG
) – matrix V - arg4 (int) – TRUE (1) if V should be transposed before multiplication
- arg5 (
geosoft.gx.GXPG
) – returned matrix U*V
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The matrices must be correctly dimensioned, taking into account whether transposition should occur before multiplication. The input matrices are not altered on output (even if transposition is requested). Assertions if: Matrices are not expected sizes Dummies are treated as 0 values.
- ctx (
-
static
matrix_vector_mult
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Multiply a VV by a pager like a matrix*vector multiply.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – matrix U - arg2 (
geosoft.gx.GXVV
) – vector x - arg3 (
geosoft.gx.GXVV
) – returned vector U*x
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The matrix is input as an M rows (data) by N columns (variables) PG. The vector must be of length N. The output VV is set to length M. The PG and VVs must be type GS_DOUBLE. Terminates if: Matrices, VV are not expected sizes (taken from U) PGs are not REAL. Dummies are treated as 0 values.
- ctx (
-
static
maximum_terrain_steepness
((GXContext)ctx, (GXPG)arg1, (int)arg2) → float:¶ Compute the Maximum Steepness of a topography Pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Topography Pager - arg2 (int) – Annular Size
Returns: Maximum Terrain Steepness Computation.
Return type: float
New in version 7.1.0.
Note:
Calculates forward-looking slopes SX and SY in the X and Y directions using pager locations (ix, iy), (ix+size, iy), (ix, iy+isize) and returns SX*SX + SY*SY. The values in the last "size" rows and columns are not processed. The wrapper was created for testing and development purposes.
- ctx (
-
static
multiply_scalar
((GXContext)ctx, (GXPG)arg1, (float)arg2) → None:¶ Multiply a scalar value and a pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Pager - arg2 (float) – Scalar Value
Returns: Nothing
Return type: None
New in version 7.1.0.
Note:
Only available for FLOAT or DOUBLE pagers
- ctx (
-
static
numeric_to_thematic
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXPG)arg3) → None:¶ geosoft.gx.GXPGU.numeric_to_thematic()
Set index values in a pager based on a numeric pager with translation VV. Returns NothingParameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input numeric PG - arg2 (
geosoft.gx.GXVV
) – Translation VV (see notes above) - arg3 (
geosoft.gx.GXPG
) – Output thematic PG
Return type: None
New in version 7.3.0.
Note:
The values in the input data VV represent the center-of-range values of unique properties with indices 0 to N-1, where N is the number of items in the input VV. This VV is sorted from smallest to largest, and each value in in the input numeric PG is tested to see into which range it goes. The closest range value for each item is used, so the half-way point is the dividing point. The top and bottom-most range widths are determined by the "inside half-width" to the nearest range. The INDEX of the closest range is then inserted into the output PG, so it can be used in a thematic voxel (for instance).
- ctx (
-
static
pc_communality
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2) → None:¶ Determines principal component communalities.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input pager of the principal components - arg2 (
geosoft.gx.GXVV
) – returned communality values
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Calculate communalities (sums of the squares of the column values in each row) Pagers and VVs must be type GS_DOUBLE.
- ctx (
-
static
pc_loadings
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2) → None:¶ Compute the principal component loadings from the standardized data.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – standardized data matrix (M by N) - arg2 (
geosoft.gx.GXPG
) – principal component loadings (N by N)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Works on columns of the PG. Calculates the correlation matrix from the columns of the standardized data, then computes the eigen values and eigenvectors of the correlation matrix. The loadings are the eigenvectors, ordered by descending eigenvalues, scaled by the square root of the eigenvalues. The returned pager must be sized the same as the input pager. Correlations are performed using "PGU_CORR_SIMPLE", so if you want Pearson correlations, or wish to use a modified correlation matrix, use
geosoft.gx.GXPGU.pc_loadings2()
and input the correlation matrix directly.- ctx (
-
static
pc_loadings2
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2) → None:¶ Same as PCLoading_PGU, but input correlation matrix.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – correllation matrix (N by N) - arg2 (
geosoft.gx.GXPG
) – principal component loadings (N by N)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
See
geosoft.gx.GXPGU.pc_loadings()
.- ctx (
-
static
pc_scores
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2, (GXPG)arg3) → None:¶ Compute the principal component scores from the standardized data.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – standardized data matrix (M by N) - arg2 (
geosoft.gx.GXPG
) – principal component loadings (input) (N by L, L<=N) - arg3 (
geosoft.gx.GXPG
) – principal component scores (returned) (M by L, L<=N)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
t -1 Forms the product X Ap (Ap Ap), where X is the standardized data matrix, and Ap is the matrix of principal component loadings (see
geosoft.gx.GXPGU.pc_loadings()
). The loadings must be input, and can be calculated by callinggeosoft.gx.GXPGU.pc_loadings()
. Pagers and VVs must be type GS_DOUBLE.- ctx (
-
static
pc_standardize
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4) → None:¶ Remove/Replace mean and standard deviation
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – matrix to standardize - arg2 (
geosoft.gx.GXVV
) – means - arg3 (
geosoft.gx.GXVV
) – standard deviations - arg4 (int) – PGU_DIRECTION constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Works on columns of the PG.
- ctx (
-
static
pc_standardize2
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (int)arg5) → None:¶ Remove/Replace mean and standard deviation, subset values.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – matrix to standardize - arg2 (
geosoft.gx.GXVV
) – mask VV for data selection (forward only) - arg3 (
geosoft.gx.GXVV
) – means - arg4 (
geosoft.gx.GXVV
) – standard deviations - arg5 (int) – forward or reverse
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
Like
geosoft.gx.GXPGU.pc_standardize()
, except that not all the values are included in the calculation of the means and standard deviations. The inclusion is controlled by a mask VV, The rows where the mask is dummy are not included in the calculation, but ALL the values are standardized.- ctx (
-
static
pc_transform
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (int)arg5) → None:¶ Transform/De-transform data.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – matrix to transform - arg2 (
geosoft.gx.GXVV
) – detection limits for the columns - arg3 (
geosoft.gx.GXVV
) – maximum values for the columns - arg4 (
geosoft.gx.GXVV
) – PGU_TRANS constants - arg5 (int) – PGU_DIRECTION constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Works on columns of the PG. Forward direction: Applies the selected transform to the data. Backward direction: Applies the inverse transform to the data. The detection limits are input with a VV. In the forward transform, data values less than the detection limit are set to the limit. The factor limits are input with a VV. In the forward transform, data values greater than the maximum values are set to the maximum.
- ctx (
-
static
pc_varimax
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2) → None:¶ Perform the Kaiser Varimax transformation on pr. comp. loadings
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – principal component loadings (input) (N by M, M<=N) - arg2 (
geosoft.gx.GXPG
) – rotated principal component loadings (returned) (N by L, L<=M)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Rotates the principal components using the Kaiser's varimax scheme to move move each factor axis to positions so that projections from each variable on the factor axes are either near the extremities or near the origin. Pagers must be type GS_DOUBLE.
- ctx (
-
static
peakedness
((GXContext)ctx, (str)arg1, (int)arg2, (GXVV)arg3, (GXVV)arg4, (GXVV)arg5) → None:¶ Find all peaks in peakedneess grid pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (str) – Grid file name
- arg2 (int) – Cutoff limit for finding peaks
- arg3 (
geosoft.gx.GXVV
) – X of found peaks - arg4 (
geosoft.gx.GXVV
) – Y of found peaks - arg5 (
geosoft.gx.GXVV
) – Z values of found peaks
Returns: Nothing
Return type: None
New in version 5.0.8.
- ctx (
-
static
peakedness_grid
((GXContext)ctx, (str)arg1, (str)arg2, (int)arg3, (float)arg4) → None:¶ Create peakedneess grid from input grid.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (str) – Input grid file name
- arg2 (str) – Output grid (peakedness) file name
- arg3 (int) – Radius
- arg4 (float) – PercentLess
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
This function creates a peakedneess grid from input grid. Radius, is the maximum radius at which the value of the parent pixel is compared to the value of surrounding pixels. PercentLesser, is used to indicate the percentage of pixels at each radii smaller than or equal to Radius that must have value lower than the parent pixel in order to call that radius true or equal to 1. Description: For each pixel in the grid a series of radii are evaluated from 1 to Radius. If the percentage of pixels for a given radius is less than PercentLesser the parent pixel receives an additional 1. For examples if the Radius is set to 5 and the PercentLesser is set to 70%. And radius 1 = 90%, radius 2 = 85%, radius 3 = 75%, radius 4 = 70% and radius 5 = 65% then the parent pixel would receive 1+1+1+1+0 = 4. Use: This function is useful in isolating the anomaly peaks in data that has a large value range for anomalies. For example the 1 mV anomaly could quite possibly have the same representation as the 100 mV anomaly using this function.
- ctx (
-
static
ref_file
((GXContext)ctx, (GXPG)arg1, (str)arg2) → None:¶ Create a reference file (boolean mask flag) from pager.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – PG object - arg2 (str) – Reference file name
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
A reference file is a binary file with the following format: The first 8 bytes are the pager dimensions NX and NY as longs. The remaining bits, one bit per pager cell - (NX * NY)/8 bytes are zero where the pager is dummy, and 1 where the pager is defined. The reference file is used in various operations where it is necessary to mask some output to the original defined cells.
- ctx (
-
static
save_file
((GXContext)ctx, (GXPG)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (GXTR)arg7, (GXIPJ)arg8, (str)arg9) → None:¶ Writes a PG to an image file.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – input PG object - arg2 (float) – X origin
- arg3 (float) – Y origin
- arg4 (float) – DX
- arg5 (float) – DY
- arg6 (float) – rotation angle
- arg7 (
geosoft.gx.GXTR
) – Trend information or NULL - arg8 (
geosoft.gx.GXIPJ
) – Projection or NULL - arg9 (str) – Output file name
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The trend object and projection are optional.
- ctx (
-
static
sv_decompose
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2, (GXVV)arg3, (GXPG)arg4) → None:¶ Do a singular value decomposition on a matrix stored as a PG
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input A matrix, M data (rows), N variables (columns) - arg2 (
geosoft.gx.GXPG
) – The returned U Matrix - arg3 (
geosoft.gx.GXVV
) – Returned weights (W) - arg4 (
geosoft.gx.GXPG
) – Returned V matrix
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The matrix is input as an N rows (data) by M columns (variables) PG. On return, the matrix is decomposed to A = U * W * Vt. If M<N, then an error will be registered. In this case, augment the "A" PG with rows of zero values. The input matrices must be A[M,N], U[M.N] and V[N,N]. The length of the W VV is set by sSVD_PGU to N. The Pagers must be type REAL. Terminates if: U is not M by N. (Taken from size of A) V is not N by N. (Taken from #columns in A). PGs, VV are not REAL
- ctx (
-
static
sv_recompose
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXPG)arg3, (float)arg4, (GXPG)arg5) → None:¶ Reconstitute the original matrix from an SVD.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – U matrix - arg2 (
geosoft.gx.GXVV
) – Weights (W) - arg3 (
geosoft.gx.GXPG
) – V matrix - arg4 (float) – Minimum weight to use (Dummy for all)
- arg5 (
geosoft.gx.GXPG
) – A matrix (returned)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The matrix is input as an N rows (data) by M columns (variables) PG. On return, the matrix is decomposed to A = U * W * Vt. If M<N, then an error will be registered. In this case, augment the "A" PG with rows of zero values. The input matrices must be A[M,N], U[M.N] and V[N,N]. The length of the W VV is set by sSVDecompose_PGU to N. The Pagers must be type GS_DOUBLE. Terminates if: U is not M by N. (Taken from size of A) V is not N by N. (Taken from #columns in A). PGs, VV are not REAL. Dummies are treated as 0 values.
- ctx (
-
static
thematic_to_numeric
((GXContext)ctx, (GXPG)arg1, (GXVV)arg2, (GXPG)arg3) → None:¶ Set numeric values in a pager based on an index pager with translation VV. Returns Nothing
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – Input Index PG - arg2 (
geosoft.gx.GXVV
) – Translation VV - arg3 (
geosoft.gx.GXPG
) – Output Data PG
Return type: None
New in version 7.3.0.
Note:
The items in the input data VV are inserted into the output PG using the indices in the index PG. This function is useful when converting a thematic voxel, which is type GS_LONG and contains indices into its own internal TPAT object, and you provide a numeric mapping VV, calculated using SetupTranslateToNumericVV_TPAT.
- ctx (
-
static
trend
((GXContext)ctx, (GXPG)arg1, (GXPG)arg2, (GXTR)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9) → None:¶ Trend remove or replace back in pager
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXPG
) – original pager obj - arg2 (
geosoft.gx.GXPG
) – trended pager obj - arg3 (
geosoft.gx.GXTR
) – trend obj - arg4 (int) – option 0 - calculate, 1 - given in TR, 2 - replace back from TR
- arg5 (int) – trend base on: 0 - all points, 1 - edge points
- arg6 (float) – trend orogin rXo,
- arg7 (float) – trend orogin rYo,
- arg8 (float) – inclrement in X directon rDx,
- arg9 (float) – inclrement in Y directon rDy
Returns: Nothing
Return type: None
New in version 5.0.0.
- ctx (
-
static
BLAKEY_TEST constants¶
Types of BLAKEY tests
-
gx.
BLAKEY_TEST_ONESIDE
= 1¶
-
gx.
BLAKEY_TEST_TWOSIDE
= 2¶
-
gx.
BLAKEY_TEST_THREESIDE
= 3¶
-
gx.
BLAKEY_TEST_FOURSIDE
= 4¶
PGU_CORR constants¶
Correlation (must be synchronized with \ :ref:`ST2_CORRELATION`\ )
-
gx.
PGU_CORR_SIMPLE
= 0¶
Simple correlation
-
gx.
PGU_CORR_PEARSON
= 1¶
Pearson's correlation (normalized to standard deviations)
PGU_DIRECTGRID constants¶
Type of statistic to use on the data points in each cell.
-
gx.
PGU_DIRECTGRID_MINIMUM
= 0¶
Select the minimum value found in each cell
-
gx.
PGU_DIRECTGRID_MAXIMUM
= 1¶
Select the maximum value found in each cell
-
gx.
PGU_DIRECTGRID_MEAN
= 2¶
Select the mean of all values found in each cell
-
gx.
PGU_DIRECTGRID_ITEMS
= 3¶
The number of valid (non-dummy) items found in each cell