GXVA class¶
-
class
GXVA
(handle=0)¶ GXVA class.
The
GXVA
class is the 2-Dimensional analogue to theGXVV
class. When displayed in a database,GXVA
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]. AGXVA
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 aGXVV
can be changed. Data can be added or extracted using VVs, either by row or column.A
GXVA
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 aGXVA
that is 256 elements wide.-
add_elevations_vv_to_depths
(vv, negative_depths)¶ Add one
GXVV
value to each row of theGXVA
, output true elevation.Parameters: New in version 7.2.
License: Geosoft End-User License
Note: Adds each value in an input elevation
GXVV
to all the values at the same fid in a depthsGXVA
. Includes an option for negative depths down (e.g. a relative level).
-
append
(v_aa)¶ Appends VAs
Parameters: v_aa (GXVA) – GXVA
to appendNew in version 5.1.3.
License: Geosoft Open License
Note: If the VAs have different numbers of columns, the smaller number is used in the copy operation.
-
average
(vv, rc)¶ Average elements in a
GXVA
by row or columnParameters: - vv (GXVV) –
GXVV
in which to place average results - rc (int) – VA_AVERAGE constants
New in version 5.0.
License: Geosoft Open License
Note: The output
GXVV
will be dimensioned by the number of rows or columns in the inputGXVV
depending on the VA_AVERAGE constants setting.Dummies are not included in the average.
- vv (GXVV) –
-
check_for_repeating
(vv_t, subtract_vv, vv_sub, tol)¶ Window a
GXVA
to aGXVV
based on fractional frameParameters: - vv_t (GXVV) – Items to test for repeats (length equal to the number of columns in the
GXVA
) - subtract_vv (int) – If set to 1, subtract single values in the following
GXVV
from every array row item before testing (e.g. an elevation value) - vv_sub (GXVV) – Values to subtract from each row before doing the comparison test (length equal to the length of the
GXVA
). Can be VV_NULL (-1) if above subtraction parameter is zero - tol (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.
License: Geosoft End-User License
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
GXVV
. 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.- vv_t (GXVV) – Items to test for repeats (length equal to the number of columns in the
-
check_for_repeating2
(vv_t, subtract_vv, vv_sub, tol, bad_row, bad_col)¶ Window a
GXVA
to aGXVV
based on fractional frameParameters: - vv_t (GXVV) – Items to test for repeats (length equal to the number of columns in the
GXVA
) - subtract_vv (int) – If set to 1, subtract single values in the following
GXVV
from every array row item before testing (e.g. an elevation value) - vv_sub (GXVV) – Values to subtract from each row before doing the comparison test (length equal to the length of the
GXVA
). Can be VV_NULL (-1) if above subtraction parameter is zero - tol (float) – Comparison tolerance - set to zero or dummy for exact match
- bad_row (int_ref) – Row index of first mismatch
- bad_col (int_ref) – Column index of first mismatch
Returns: 1 if rows repeat, 0 if not.
Return type: int
New in version 8.2.
License: Geosoft End-User License
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
GXVV
. 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.- vv_t (GXVV) – Items to test for repeats (length equal to the number of columns in the
-
col
()¶ Return number of columns in
GXVA
Returns: Columns in GXVA
Return type: int New in version 5.0.
License: Geosoft Open License
Note:
len
returns the number of rows.
-
copy
(v_as)¶ Copy one
GXVA
to another.Parameters: v_as (GXVA) – source New in version 5.0.
License: Geosoft Open License
-
copy2
(d_row, d_col, v_as, s_row, s_col, rows, cols)¶ Copy part of a vector into part of another vector.
Parameters: New in version 5.0.
License: Geosoft Open License
Note: 1. Unlike
copy
destinationGXVA
is not reallocated, nor are the dimensions changed. The caller must make any desired changes.2. All
GXVA
types are supported and will be converted using Convert_GS if necessary.
-
classmethod
create
(type, rows, cols)¶ Create a
GXVA
.Parameters: - type (int) – GEO_VAR constants
- rows (int) – Maximum number of rows in the
GXVA
, >= 0 - cols (int) – Number of columns in the
GXVA
, > 0
Returns: GXVA
ObjectReturn type: New in version 5.0.
License: Geosoft Open License
-
classmethod
create_ext
(type, rows, cols)¶ Create a
GXVA
, using one of the GS_TYPES constants special data types.Parameters: - type (int) – GS_TYPES constants
- rows (int) – Maximum number of rows in the
GXVA
, >= 0 - cols (int) – Number of columns in the
GXVA
, > 0
Returns: GXVA
, aborts if creation failsReturn type: New in version 5.0.
License: Geosoft Open License
Note: See
GXVV.create
-
classmethod
create_vv
(vv, rows, columns)¶ Create a
GXVA
using the data in aGXVV
.Parameters: Returns: GXVA
, aborts if creation failsReturn type: New in version 7.2.1.
License: Geosoft Open License
Note: See
GXVV.create
-
get_array
(start_row, start_col, rows, cols, data, gs_type)¶ Get an array of data from a
GXVA
.Parameters: - start_row (int) – Starting Row
- start_col (int) – Starting Column
- rows (int) – # rows
- cols (int) – # cols
- data (bytearray) – Data buffer to copy
GXVA
data into - gs_type (int) – GS_TYPES constants
New in version 5.0.
License: Geosoft Open License
-
get_double
(row, col)¶ Get a real element from a
GXVA
.Parameters: - row (int) – Row
- col (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.
License: Geosoft Open License
Note: Type conversions are performed if necessary. Dummy values are converted to “*” string.
-
get_fid_incr
()¶ Gets the Fiducial increment from a
GXVA
Returns: Fiducial increment of the GXVA
.Return type: float New in version 5.0.
License: Geosoft Open License
-
get_fid_start
()¶ Gets the Fiducial start from a
GXVA
Returns: Fiducial start of the GXVA
.Return type: float New in version 5.0.
License: Geosoft Open License
-
get_full_vv
()¶ Get the full
GXVV
from theGXVA
.Returns: GXVV
ObjectReturn type: GXVV New in version 5.0.
License: Geosoft Open License
Note: No data is copied, this is the handle to the data
GXVV
in theGXVA
. The fid start/increment of theGXVA
is passed to theGXVV
at the time of the call. If a newGXVA
is read, you must call GetFull_VV_VA to get the new fid in theGXVV
.
-
get_int
(row, col)¶ Get an integer element from a
GXVA
.Parameters: - row (int) – Row
- col (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.
License: Geosoft Open License
Note: Type conversions are performed if necessary. Dummy values are converted to “*” string.
-
get_string
(row, col, str_val)¶ Get a string element from a
GXVA
.Parameters: - row (int) – Row
- col (int) – Column
- str_val (str_ref) – String in which to place element
New in version 5.0.
License: Geosoft Open License
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
(no, row_col, vv)¶ Get a row or column of data as a
GXVV
from an array.Parameters: - no (int) – Row or Column # (0 is first)
- row_col (int) – VA_OBJECT constants
- vv (GXVV) –
GXVV
in which to place data
New in version 5.0.
License: Geosoft Open License
-
classmethod
index_order
(vv, va)¶ Reorder a
GXVA
based on an indexGXVV
Parameters: New in version 5.1.
License: Geosoft Open License
Note: Given a row index
GXVV
(of type INT), this method reorders aGXVA
. Please make sure that the index holds valid information.
-
is_null
()¶ Check if this is a null (undefined) instance
Returns: True if this is a null (undefined) instance, False otherwise. Return type: bool
-
len
()¶ Return length (number of rows) in a
GXVA
.Returns: Length of GXVA
Return type: int New in version 5.0.
License: Geosoft Open License
Note:
col
returns the number of columns.
-
lookup_index
(vvi, var)¶ Lookup a
GXVA
from anotherGXVA
using an indexGXVV
.Parameters: New in version 6.4.2.
License: Geosoft End-User License
Note: Fractional values in the
GXVV
will interpolate between the value at the whole integer value and the next whole integer, dummy if outside theGXVA
.
-
range_double
(min, max)¶ Computes the minimum and maximum range of the data, in doubles, in a vector while ignoring dummies.
Parameters: New in version 5.0.
License: Geosoft Open License
-
re_fid
(start, incr, length)¶ Re-sample a
GXVA
to a new fid start/icrementParameters: - start (float) – New fid start
- incr (float) – New fid increment
- length (int) – New length
New in version 5.0.
License: Geosoft Open License
-
reverse
()¶ Reverses the order of the rows in a
GXVA
.New in version 5.1.5.
License: Geosoft Open License
-
set_array
(start_row, start_col, rows, cols, data, gs_type)¶ Set a range of data in an array
Parameters: - start_row (int) – Starting Row
- start_col (int) – Starting Column
- rows (int) – # rows
- cols (int) – # cols
- data (bytearray) – Data buffer to copy into
GXVA
- gs_type (int) – GS_TYPES constants
New in version 5.0.
License: Geosoft Open License
-
set_double
(row, col, value)¶ Set a real element in a
GXVA
.Parameters: - row (int) – Row
- col (int) – Column
- value (float) – Value to set
New in version 5.0.
License: Geosoft Open License
Note: Element being set cannot be < 0. If the element is > current
GXVA
length, theGXVA
length is increased.
-
set_fid_incr
(incr)¶ Sets the Fiducial increment of a
GXVA
Parameters: incr (float) – New increment New in version 5.0.
License: Geosoft Open License
-
set_fid_start
(start)¶ Sets the Fiducial start of a
GXVA
Parameters: start (float) – New start New in version 5.0.
License: Geosoft Open License
-
set_int
(row, col, value)¶ Set an integer element in a
GXVA
.Parameters: - row (int) – Row
- col (int) – Column
- value (int) – Value to set
New in version 5.0.
License: Geosoft Open License
Note: Element being set cannot be < 0. If the element is > current
GXVA
length, theGXVA
length is increased.
-
set_ln
(rows)¶ Set the length (number of rows) of the
GXVA
Parameters: rows (int) – Length New in version 5.0.
License: Geosoft Open License
Note: The number of columns in a
GXVA
is fixed, and cannot be altered once theGXVA
is created.
-
set_string
(row, col, value)¶ Set a string element in a
GXVA
.Parameters: - row (int) – Row
- col (int) – Column
- value (str) – String to set
New in version 5.0.
License: Geosoft Open License
Note: Element being set cannot be < 0. If the element is > current
GXVA
length, theGXVA
length is increased.
-
set_vv
(no, row_col, vv)¶ Set a row or column of data in an array from a
GXVV
.Parameters: - no (int) – Row or Column # (0 is first)
- row_col (int) – VA_OBJECT constants
- vv (GXVV) –
GXVV
from which to get data
New in version 5.0.
License: Geosoft Open License
-
trans
(base, mult)¶ Translate (
GXVA
+ base ) * multParameters: - base (float) – Base value
- mult (float) – Mult value
New in version 7.2.
License: Geosoft End-User License
Note: Supports all
GXVA
types using an internal doubleGXVV
.
-
window
(start, count, vv)¶ Window a
GXVA
to aGXVV
based in intergral frameParameters: New in version 5.0.
License: Geosoft Open License
Note: The defined window must be within the
GXVA
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
(start, end, vv)¶ Window a
GXVA
to aGXVV
based on fractional frameParameters: New in version 5.0.
License: Geosoft Open License
Note: The defined window must be within the
GXVA
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.
-