GXVA class¶
-
class
geosoft.gx.
GXVA
¶ The VA class is the 2-Dimensional analogue to the VV class. When displayed in a database, VA objects are displayed graphically as profiles, one to a cell, and can also be displayed one column of data at a time by specifying an index; e.g. CH[0]. A VA object is declared with a fixed number of columns, which cannot be altered. The number of rows, however can be changed, in the same way that the length of a VV can be changed. Data can be added or extracted using VVs, either by row or column. A VA is used to store an array of data in which each element may have multiple elements. For example, 256-channel radiometric data can be stored in a VA that is 256 elements wide.
-
add_elevations_vv_to_depths
((GXVV)arg1, (int)arg2) → None:¶ Add one VV value to each row of the VA, output true elevation.
Parameters: - arg1 (
geosoft.gx.GXVV
) – Elevations to add - arg2 (int) – Use negative VA depths (0:No, 1:Yes)?
Returns: Nothing
Return type: None
New in version 7.2.0.
Note:
Adds each value in an input elevation VV to all the values at the same fid in a depths VA. Includes an option for negative depths down (e.g. a relative level).
- arg1 (
-
append
((GXVA)arg1) → None:¶ Appends VAs
Parameters: arg1 ( geosoft.gx.GXVA
) – VA to appendReturns: Nothing Return type: None New in version 5.1.3.
Note:
If the VAs have different numbers of columns, the smaller number is used in the copy operation.
-
average
((GXVV)arg1, (int)arg2) → None:¶ Average elements in a VA by row or column
Parameters: - arg1 (
geosoft.gx.GXVV
) – VV in which to place average results - arg2 (int) – VA_AVERAGE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The output VV will be dimensioned by the number of rows or columns in the input VV depending on the VA_AVERAGE constants setting. Dummies are not included in the average.
- arg1 (
-
check_for_repeating
((GXVV)arg1, (int)arg2, (GXVV)arg3, (float)arg4) → int:¶ Window a VA to a VV based on fractional frame
Parameters: - arg1 (
geosoft.gx.GXVV
) – Items to test for repeats (length equal to the number of columns in the VA) - arg2 (int) – If set to 1, subtract single values in the following VV from every array row item before testing (e.g. an elevation value)
- arg3 (
geosoft.gx.GXVV
) – values to subtract from each row before doing the comparison test (length equal to the length of the VA). Can be VV_NULL (-1) if above subtraction parameter is zero - arg4 (float) – comparison tolerance - set to zero or dummy for exact match
Returns: 1 if rows repeat, 0 if not.
Return type: int
New in version 8.2.0.
Note:
Returns 1 if all rows contain values which match the input values. Optionally, row values can be offset by amounts specified with a secondary VV. This function was designed to detect "depth" array channels, including those which might have been offset with topography on each row. An absolute tolerance can be specified to ignore numerical noise.
- arg1 (
-
check_for_repeating2
((GXVV)arg1, (int)arg2, (GXVV)arg3, (float)arg4, (int_ref)arg5, (int_ref)arg6) → int:¶ Window a VA to a VV based on fractional frame
Parameters: - arg1 (
geosoft.gx.GXVV
) – Items to test for repeats (length equal to the number of columns in the VA) - arg2 (int) – If set to 1, subtract single values in the following VV from every array row item before testing (e.g. an elevation value)
- arg3 (
geosoft.gx.GXVV
) – values to subtract from each row before doing the comparison test (length equal to the length of the VA). Can be VV_NULL (-1) if above subtraction parameter is zero - arg4 (float) – comparison tolerance - set to zero or dummy for exact match
- arg5 (
geosoft.gx.int_ref
) – row index of first mismatch - arg6 (
geosoft.gx.int_ref
) – column index of first mismatch
Returns: 1 if rows repeat, 0 if not.
Return type: int
New in version 8.2.0.
Note:
Returns 1 if all rows contain values which match the input values. Optionally, row values can be offset by amounts specified with a secondary VV. This function was designed to detect "depth" array channels, including those which might have been offset with topography on each row. An absolute tolerance can be specified to ignore numerical noise. This version returns the row and column index of first mismatch.
- arg1 (
-
col
() → int:¶ Return number of columns in VA
Returns: Columns in VA Return type: int New in version 5.0.0.
Note:
geosoft.gx.GXVA.len()
returns the number of rows.
-
copy
((GXVA)arg1) → None:¶ Copy one VA to another.
Parameters: arg1 ( geosoft.gx.GXVA
) – sourceReturns: Nothing Return type: None New in version 5.0.0.
-
copy2
((int)arg1, (int)arg2, (GXVA)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7) → None:¶ Copy part of a vector into part of another vector.
Parameters: - arg1 (int) – Destination start row
- arg2 (int) – Destination start column
- arg3 (
geosoft.gx.GXVA
) – Source VA (can be the same as Destination) - arg4 (int) – Source start row
- arg5 (int) – Source start column
- arg6 (int) – Number of rows
- arg7 (int) – Number of columns
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
1. Unlike
geosoft.gx.GXVA.copy()
destination VA is not reallocated, nor are the dimensions changed. The caller must make any desired changes. 2. All VA types are supported and will be converted using Convert_GS if necessary.
-
static
create
((GXContext)ctx, (int)arg1, (int)arg2, (int)arg3) → GXVA:¶ Create a VA.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (int) – GEO_VAR constants
- arg2 (int) – Maximum number of rows in the VA, >= 0
- arg3 (int) – Number of columns in the VA, > 0
Returns: VA Object
Return type: New in version 5.0.0.
- ctx (
-
static
create_ext
((GXContext)ctx, (int)arg1, (int)arg2, (int)arg3) → GXVA:¶ Create a VA, using one of the GS_TYPES constants special data types.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (int) – GS_TYPES constants
- arg2 (int) – Maximum number of rows in the VA, >= 0
- arg3 (int) – Number of columns in the VA, > 0
Returns: VA, aborts if creation fails
Return type: New in version 5.0.0.
Note:
See
geosoft.gx.GXVV.create()
- ctx (
-
static
create_vv
((GXContext)ctx, (GXVV)arg1, (int)arg2, (int)arg3) → GXVA:¶ Create a VA using the data in a VV.
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXVV
) – VV with the data - arg2 (int) – # of rows
- arg3 (int) – # of columns
Returns: VA, aborts if creation fails
Return type: New in version 7.2.1.
Note:
See
geosoft.gx.GXVV.create()
- ctx (
-
get_array_np
((int)start_row, (int)start_column, (int)num_rows, (int)num_columns, (object)dtype) → ndarray:¶ Gets a numpy ndarray from data in a VA.
Parameters: - start_row (int) – starting row
- start_column (int) – starting column
- num_rows (int) – number of rows
- num_columns (int) – number of columns
- dtype (object) – object that describes the required numpy datatype (e.g. np.float64)
Return type: ndarray
-
get_double
((int)arg1, (int)arg2) → float:¶ Get a real element from a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
Returns: Element wanted, rDUMMY, iDUMMY or blank string if the value is dummy or outside of the range of data.
Return type: float
New in version 5.0.0.
Note:
Type conversions are performed if necessary. Dummy values are converted to "*" string.
-
get_fid_incr
() → float:¶ Gets the Fiducial increment from a VA
Returns: Fiducial increment of the VA. Return type: float New in version 5.0.0.
-
get_fid_start
() → float:¶ Gets the Fiducial start from a VA
Returns: Fiducial start of the VA. Return type: float New in version 5.0.0.
-
get_full_vv
() → GXVV:¶ Get the full VV from the VA.
Returns: VV Object Return type: geosoft.gx.GXVV
New in version 5.0.0.
Note:
No data is copied, this is the handle to the data VV in the VA. The fid start/increment of the VA is passed to the VV at the time of the call. If a new VA is read, you must call GetFull_VV_VA to get the new fid in the VV.
-
get_int
((int)arg1, (int)arg2) → int:¶ Get an integer element from a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
Returns: Element wanted, rDUMMY, iDUMMY or blank string if the value is dummy or outside of the range of data.
Return type: int
New in version 5.0.0.
Note:
Type conversions are performed if necessary. Dummy values are converted to "*" string.
-
get_string
((int)arg1, (int)arg2, (str_ref)arg3) → None:¶ Get a string element from a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
- arg3 (
geosoft.gx.str_ref
) – string in which to place element
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Returns element wanted, rDUMMY, iDUMMY or blank string if the value is dummy or outside of the range of data. Type conversions are performed if necessary. Dummy values are converted to "*" string.
-
get_vv
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Get a row or column of data as a VV from an array.
Parameters: - arg1 (int) – Row or Column # (0 is first)
- arg2 (int) – VA_OBJECT constants
- arg3 (
geosoft.gx.GXVV
) – VV in which to place data
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
index_order
((GXContext)ctx, (GXVV)arg1, (GXVA)arg2) → None:¶ Reorder a VA based on an index VV
Parameters: - ctx (
geosoft.gx.GXContext
) – The GX execution context - arg1 (
geosoft.gx.GXVV
) – Index VV of type INT - arg2 (
geosoft.gx.GXVA
) – VA to order
Returns: Nothing
Return type: None
New in version 5.1.0.
Note:
Given a row index VV (of type INT), this method reorders a VA. Please make sure that the index holds valid information.
- ctx (
-
is_null
() → bool¶ Check if the instance of
geosoft.gx.GXVA is null (undefined)
Returns: True if this is a null instance of geosoft.gx.GXVA
, False otherwise.Return type: bool`
-
len
() → int:¶ Return length (number of rows) in a VA.
Returns: Length of VA Return type: int New in version 5.0.0.
Note:
geosoft.gx.GXVA.col()
returns the number of columns.
-
lookup_index
((GXVV)arg1, (GXVA)arg2) → None:¶ Lookup a VA from another VA using an index VV.
Parameters: - arg1 (
geosoft.gx.GXVV
) – Index VV of REAL - arg2 (
geosoft.gx.GXVA
) – VA to output results (same type as Data VA)
Returns: Nothing
Return type: None
New in version 6.4.2.
Note:
Fractional values in the VV will interpolate between the value at the whole integer value and the next whole integer, dummy if outside the VA.
- arg1 (
-
static
null
() → GXVA¶ A null (undefined) instance of
geosoft.gx.GXVA
Returns: A null geosoft.gx.GXVA
Return type: geosoft.gx.GXVA
-
range_double
((float_ref)arg1, (float_ref)arg2) → None:¶ Computes the minimum and maximum range of the data, in doubles, in a vector while ignoring dummies.
Parameters: - arg1 (
geosoft.gx.float_ref
) – Minimum value - returned - arg2 (
geosoft.gx.float_ref
) – Maximum value - returned
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
re_fid
((float)arg1, (float)arg2, (int)arg3) → None:¶ Re-sample a VA to a new fid start/icrement
Parameters: - arg1 (float) – New fid start
- arg2 (float) – New fid increment
- arg3 (int) – New length
Returns: Nothing
Return type: None
New in version 5.0.0.
-
reverse
() → None:¶ Reverses the order of the rows in a VA.
Returns: Nothing Return type: None New in version 5.1.5.
-
set_array_np
((int)start_row, (int)start_column, (ndarray)array) → None:¶ Transfers data from numpy ndarray into a VA.
Parameters: - start_row (int) – starting row
- start_column (int) – starting column
- array (ndarray) – array of values to set into the VA (has to be 2D)
Return type: None
-
set_double
((int)arg1, (int)arg2, (float)arg3) → None:¶ Set a real element in a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
- arg3 (float) – value to set
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Element being set cannot be < 0. If the element is > current VA length, the VA length is increased.
-
set_fid_incr
((float)arg1) → None:¶ Sets the Fiducial increment of a VA
Parameters: arg1 (float) – New increment Returns: Nothing Return type: None New in version 5.0.0.
-
set_fid_start
((float)arg1) → None:¶ Sets the Fiducial start of a VA
Parameters: arg1 (float) – New start Returns: Nothing Return type: None New in version 5.0.0.
-
set_int
((int)arg1, (int)arg2, (int)arg3) → None:¶ Set an integer element in a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
- arg3 (int) – value to set
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Element being set cannot be < 0. If the element is > current VA length, the VA length is increased.
-
set_ln
((int)arg1) → None:¶ Set the length (number of rows) of the VA
Parameters: arg1 (int) – length Returns: Nothing Return type: None New in version 5.0.0.
Note:
The number of columns in a VA is fixed, and cannot be altered once the VA is created.
-
set_string
((int)arg1, (int)arg2, (str)arg3) → None:¶ Set a string element in a VA.
Parameters: - arg1 (int) – Row
- arg2 (int) – Column
- arg3 (str) – string to set
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Element being set cannot be < 0. If the element is > current VA length, the VA length is increased.
-
set_vv
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Set a row or column of data in an array from a VV.
Parameters: - arg1 (int) – Row or Column # (0 is first)
- arg2 (int) – VA_OBJECT constants
- arg3 (
geosoft.gx.GXVV
) – VV from which to get data
Returns: Nothing
Return type: None
New in version 5.0.0.
-
trans
((float)arg1, (float)arg2) → None:¶ Translate (VA + base ) * mult
Parameters: - arg1 (float) – base value
- arg2 (float) – mult value
Returns: Nothing
Return type: None
New in version 7.2.0.
Note:
Supports all VA types using an internal double VV.
-
window
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Window a VA to a VV based in intergral frame
Parameters: - arg1 (int) – first element in the window
- arg2 (int) – number of elements in the window
- arg3 (
geosoft.gx.GXVV
) – VV in which to place results
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The defined window must be within the VA element dimensions. The windowed result will be the simple sum of all values in the window. If any values are dummy, the result will be dummy.
-
window2
((float)arg1, (float)arg2, (GXVV)arg3) → None:¶ Window a VA to a VV based on fractional frame
Parameters: - arg1 (float) – start point (from 0.0)
- arg2 (float) – end point (< VA elements - 1.0)
- arg3 (
geosoft.gx.GXVV
) – VV in which to place results
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The defined window must be within the VA element dimensions. The windowed result will be the simple sum of all values in the window. If any values are dummy, the result will be dummy.
-