GXVV class

class geosoft.gx.GXVV
The VV class stores very long vector (array) data (such
as channel data from an OASIS database) in memory and
performs specific actions on the data. This set of
functions is similar to the VM functions except that
you cannot access data directly and therefore you cannot
use a VV to pass data to an external (non-Geosoft)
Dynamic Link Library (DLL) object function.

If you want to pass data to a DLL, you must move a subset
of the data stored in memory to a small vector object and
then use the geosoft.gx.GXGEO.get_ptr_vm() function to pass a pointer to the
data on to the external function.

See VVU for more utility methods.
abs() → None:
Take the absolute value of values in a VV.
Returns:Nothing
Return type:None

New in version 7.1.0.

add((GXVV)arg1, (GXVV)arg2) → None:
Add two VVs: VV_A + VV_B = VV_C
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.8.

add2((float)arg1, (GXVV)arg2, (float)arg3, (GXVV)arg4) → None:
Add two VVs with linear factors: VV_A*f1 + VV_B*f2 = VV_C
Parameters:
  • arg1 (float) – multiplier f1 for A
  • arg2 (geosoft.gx.GXVV) – VV B
  • arg3 (float) – multiplier f2 for B
  • arg4 (geosoft.gx.GXVV) – VV C (returned), C = A*f1 + B*f2
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

The multipliers must be defined and within the GS_R8MN GS_R8MX range.
amplitude_3d((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:
Calculate the 3D length for XYZ component VVs
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.0.1.

append((GXVV)arg1) → None:
Appends VV's
Parameters:arg1 (geosoft.gx.GXVV) – VV to append
Returns:Nothing
Return type:None

New in version 5.0.0.

copy((GXVV)arg1) → None:
Copy one VV to another.
Parameters:arg1 (geosoft.gx.GXVV) – source
Returns:Nothing
Return type:None

New in version 5.0.0.

copy2((int)arg1, (GXVV)arg2, (int)arg3, (int)arg4) → None:
Copy part of a vector into part of another vector.
Parameters:
  • arg1 (int) – Destination start element
  • arg2 (geosoft.gx.GXVV) – Source VV (can be the same as Destination)
  • arg3 (int) – Source start element
  • arg4 (int) – Number of points
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. Unlike Copy_VV destination VV is not reallocated, nor is
the length changed. The caller must make any desired changes.

2. All VV types are supported and will be converted using
Convert_GS if necessary.
count_dummies((int)arg1, (int)arg2) → int:
Count the number of dummies in a VV
Parameters:
  • arg1 (int) – Starting point in VV (0 for all)
  • arg2 (int) – Number of elements to process (-1 for all)
Returns:

The count

Return type:

int

New in version 6.3.0.

crc((int)arg1) → int:
Compute the CRC value of a VV.
Parameters:arg1 (int) – previous CRC CRC_INIT_VALUE constant
Returns:CRC Value
Return type:int

New in version 5.0.0.

crc_inexact((int)arg1, (int)arg2, (int)arg3) → int:
Compute the CRC value of a VV and allows you to specify
number of bits of floats/doubles to drop so that the CRC
will be same even of this are changed.
Parameters:
Returns:

CRC Value

Return type:

int

New in version 5.0.0.

Note:

Very usefull for testing where the last bits of accuracy
are not as important.
static create((GXContext)ctx, (int)arg1, (int)arg2) → GXVV:
Create a VV.
Parameters:
Returns:

VV Object

Return type:

geosoft.gx.GXVV

New in version 5.0.0.

Note:

To set the fiducial start and increment for the data in the VV
you need to call geosoft.gx.GXVV.set_fid_start() and geosoft.gx.GXVV.set_fid_incr().

If you are basing the VV data on fiducial information from a
different VV, call GetFidStart_VV and GetFidIncr_VV to obtain
that VV's fiducial information. Do this prior to setting the
new VV's fiducial start and increment.

If you do not know the required length for a VV, use 0
and the VV length will be adjusted as needed.  This is
a bit less efficient than setting the length when you
know it.
static create_ext((GXContext)ctx, (int)arg1, (int)arg2) → GXVV:
Create a VV, using one of the GS_TYPES constants special data types.
Parameters:
Returns:

VV Object

Return type:

geosoft.gx.GXVV

New in version 5.0.0.

Note:

See geosoft.gx.GXVV.create()

Do not use data type flags: GS_INT or GS_REAL on CreateExt(),
this will result in a respective data type of unsigned byte or
short for the VV.
static create_s((GXContext)ctx, (GXBF)arg1) → GXVV:
Create a VV  from serialized source.
Parameters:
Returns:

VV Object

Return type:

geosoft.gx.GXVV

New in version 5.0.0.

diff((int)arg1) → None:
Calculate differences.
Parameters:arg1 (int) – Number of differences
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

Differences with dummies result in dummies.
An even number of differences locates data accurately.
An odd number of differences locates result 1/2 element lower
in the VV.
divide((GXVV)arg1, (GXVV)arg2) → None:
Divide one VV by another: VV_A / VV_B = VV_C
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.8.

fid_norm((GXVV)arg1) → None:
Re-sample a pair of VV's to match each other.
Parameters:arg1 (geosoft.gx.GXVV) – VV to resample
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

Both VV's will return with the same start
fid and fid increment.  The smaller start fid
and fid increment will be used.
fill_double((float)arg1) → None:
Fill a VV with a real value.
Parameters:arg1 (float) – Value to fill with
Returns:Nothing
Return type:None

New in version 5.0.0.

fill_int((int)arg1) → None:
Fill a VV with an int value.
Parameters:arg1 (int) – Value to fill with
Returns:Nothing
Return type:None

New in version 5.0.0.

fill_string((str)arg1) → None:
Fill a VV with a string value.
Parameters:arg1 (str) – string
Returns:Nothing
Return type:None

New in version 5.0.0.

find_dum((int)arg1, (int)arg2, (int)arg3, (int)arg4) → int:
Finds the first dummy or non-dummy value in a VV
Parameters:
  • arg1 (int) – Lowest element in VV element to search
  • arg2 (int) – Highest element in VV to search
  • arg3 (int) – 0 = find first dummy / 1 = find first non-dummy
  • arg4 (int) – 0 = use increasing order / 1 = use decreasing order
Returns:

The index of the first dummy or non-dummy value. -1 if not found, 0 if the length of the VV is 0.

Return type:

int

New in version 5.0.0.

Note:

If a decreasing order search is performed, it will start
at the highest element specified. (Conversely, an increasing
order starts at the lowest element specified.)
get_data_np((int)start, (int)num_elements, (object)dtype) → ndarray:

Gets a numpy ndarray from data in a VV.

Parameters:
  • start (int) – starting element
  • num_elements (int) – number of elements to get
  • dtype (object) – object that describes the required numpy datatype (e.g. np.float64)
Return type:

ndarray

get_double((int)arg1) → float:
Get a real element from a VV.
Parameters:arg1 (int) – element wanted
Returns:Element wanted, or rDUMMY 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_expansion() → int:
Gets the Fiducial expansion from a VV
Returns:Number of expanions for this VV (see ReFidVV_VV)
Return type:int

New in version 6.4.0.

get_fid_incr() → float:
Gets the Fiducial increment from a VV
Returns:Fiducial increment of the VV.
Return type:float

New in version 5.0.0.

get_fid_start() → float:
Gets the Fiducial start from a VV
Returns:Fiducial start of the VV.
Return type:float

New in version 5.0.0.

get_int((int)arg1) → int:
Get an integer element from a VV.
Parameters:arg1 (int) – element wanted
Returns:Element wanted, or iDUMMY if the value is dummy or outside of the range of data.
Return type:int

New in version 5.0.0.

get_string((int)arg1, (str_ref)arg2) → None:
Get a string element from a VV.
Parameters:
  • arg1 (int) – element wanted
  • arg2 (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, 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.
index_insert((GXVV)arg1, (GXVV)arg2) → None:
Insert items into a VV using an index VV.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.2.0.

Note:

The items in the input data VV are inserted into
the output VV using the indices in the index VV.
Values not referenced are not altered, so the output
VV should be pre-initialized. The output VV length
will NOT be changed, and index values referencing
beyond the end of the output VV data will return an
error.

This function is useful when working with channel data that include
dummies, but where the dummies must be removed before processing.
Create and initialize an index (0, 1, 2...) VV, using the geosoft.gx.GXVV.init_index()
function, and when you remove
the dummies, remove the corresponding index values as well.
After processing, init a VV to dummies, then use geosoft.gx.GXVV.index_insert() to
put the processed values at the correct locations in the data VV
before you write it back to the channel.
index_max((float_ref)arg1) → int:
Get the index where the maximum value occurs.
Parameters:arg1 (geosoft.gx.float_ref) – Maximum value (rDUMMY if all dummies or no data)
Returns:Index of the maximum value, iDUMMY if no valid data.
Return type:int

New in version 6.2.0.

Note:

If more than one value has the same maximum value, the index of the
first is returned.
index_order((GXVV)arg1) → None:
Reorder a VV.
Parameters:arg1 (geosoft.gx.GXVV) – VV to order
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

Given an index VV (of type INT), this method reorders a
VV. Please make sure that the index holds valid information.
init_index((int)arg1) → None:
Initialize an index VV to values 0, 1, 2, etc...
Parameters:arg1 (int) – Final length of VV (-1 to use current length).
Returns:Nothing
Return type:None

New in version 6.2.0.

Note:

Populates a VV with the values 0, 1, 2, 3, 4 etc., to be
used for various indexing functions, such as geosoft.gx.GXVV.index_insert() or
geosoft.gx.GXVV.index_order().
inv_log((int)arg1, (int)arg2, (float)arg3) → None:
Inverse of the Log_VV function.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

This is the inverse function for Log_VV, with the same inputs.

NEGATIVE_NO    - will not return values smaller than the input minimum
NEGATIVE_YES   - if the data is in the range +/- minimum,
it is left alone.  Otherwise, the sign is removed,
the minimum is subtracted, the log of the minimum is added,
and the exponential (base e or base 10) is taken of the
sum. The sign is then reapplied.
Minimum value will be defaulted to 1.0 if it is 0.0 or
less than 0.0
is_null() → bool

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

Returns:True if this is a null instance of geosoft.gx.GXVV, False otherwise.
Return type:bool`
length() → int:
Returns current VV length.
Returns:# of elements in the VV.
Return type:int

New in version 5.0.0.

lines_to_xy((GXVV)arg1, (GXVV)arg2) → None:
Convert a 2D Line segment VV into X and Y VVs.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.0.0.

Note:

Some GX functions (such as geosoft.gx.GXTIN.get_voronoi_edges()) return
a special VV where each element contains the start and end
points of lines, (X_1, Y_1) and (X_2, Y_2).
This GX dumps the individual X and Y values into individual
X and Y VVs of type GS_DOUBLE (REAL). N lines produces 2*N
X and Y values.
log((int)arg1, (int)arg2, (float)arg3) → None:
Apply log to the vv.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Minimum value will be defaulted to 1.0 if it is 0.0 or
less than 0.0
log_linear((float)arg1) → None:
Take the log10 or original value of a VV.
Parameters:arg1 (float) – minimum value
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

If the data is in the range +/- minimum value,
it is left alone. Otherwise, the result is calculated as

d = dMin * (log10(fabs(d)/dMin)+1.0)

Sign is reapplied to d.

Minimum value will be defaulted to 1.0 if it is negative
or 0.
lookup_index((GXVV)arg1, (GXVV)arg2) → None:
Lookup a VV from another VV using an index VV.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

This method assigns index values of 0.0, 1.0, 2.0 etc. to the individual
values in the input Data VV, and uses linear interpolation to calculate the values of
Result VV at the input indices contained in the Index VV.

If the input Data VV is string type, then only values at the integral index values
are returned.

See also geosoft.gx.GXVV.setup_index() for an example of how this can be implemented.
make_mem_based() → None:
Make this VV use regular instead of virtual memory.
Returns:Nothing
Return type:None

New in version 5.1.2.

Note:

This function should be called immediately aftter
geosoft.gx.GXVV.create().

Normal VVs are optimised to prevent thrashing, and to
efficiently support many extremely large VVs, although
there is a small performance penalty.
This function is intended for VV's that you know can be
handled by the operating system virtual memory manager,
and will be used heavily.  By using a memory based VV, you
can achieve some performance improvements provided your
application does not cause the memory manager to "thrash".

External programs that use the GX API may prefer to use
memory-based VV's because you can get direct access to
the VV through the geosoft.gx.GXGEO.get_ptr_vv() function (see gx_extern.h).

See also

geosoft.gx.GXGEO.get_ptr_vv() in gx_extern.h

mask((GXVV)arg1) → None:
Mask one VV against another.
Parameters:arg1 (geosoft.gx.GXVV) – Mask VV
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

All elements in the mask VV that are dummies will replace
the value in the original VV with a dummy.

The modified VV will always be the same length as the mask
VV after this call.  If the mask is longer than the target,
the target will be lengthenned with dummies.
mask_and((GXVV)arg1, (GXVV)arg2) → None:
Create mask from logical AND of two VVs.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

If both values are non-dummies, then result is 1, else dummy.
mask_or((GXVV)arg1, (GXVV)arg2) → None:
Create mask from logical OR of two VVs.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

If either values is non-dummy, then result is 1, else dummy.
mask_str((GXVV)arg1, (str)arg2) → None:
Mask one VV against another using a string.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

All elements in the mask VV that are same as string will replace
the original VV with a 1.

The modified VV will always be expanded to the MaskVV size but
not shortened after this call.  If the mask is longer than the target,
the target will be lengthenned with dummies before applying the mask.
multiply((GXVV)arg1, (GXVV)arg2) → None:
Multiply two VVs: VV_A * VV_B = VV_C
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.8.

static null() → GXVV

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

Returns:A null geosoft.gx.GXVV
Return type:geosoft.gx.GXVV
order((int_ref)arg1) → int:
Identifies the data size order of the elements.
Parameters:arg1 (geosoft.gx.int_ref) – returned: Do any values repeat (0: No, 1: Yes)?
Returns:VV_ORDER constants
Return type:int

New in version 6.4.0.

polygon_mask((GXVV)arg1, (GXVV)arg2, (GXPLY)arg3, (int)arg4) → None:
Mask a VV using XY data and a polygon
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

The VVs has to be the same length
static project((GXContext)ctx, (GXPJ)arg1, (GXVV)arg2, (GXVV)arg3) → None:
This method projects an X and Y VV.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

This function is equivalent to geosoft.gx.GXPJ.convert_vv().
static project_3d((GXContext)ctx, (GXPJ)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4) → None:
This method projects an X,Y,Z VV.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

This function is equivalent to geosoft.gx.GXPJ.convert_vv3().
range_double((float_ref)arg1, (float_ref)arg2) → None:
Get the min. and max. values of a VV while ignoring dummies.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Minimum and maximum become GS_R8DM if entire VV is dummy.
re_fid((float)arg1, (float)arg2, (int)arg3) → None:
Re-sample a VV 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.

re_fid_vv((GXVV)arg1) → None:
Re-sample a VV to match another VV.
Parameters:arg1 (geosoft.gx.GXVV) – VV model (fid increment and start)
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

This method will honor the VV FID Expansion and will expand/contract
VV's based on this flag if it is used.
re_sample((float)arg1, (float)arg2, (float)arg3, (float)arg4, (int)arg5, (int)arg6) → None:
Resamples a VV from one fid/incr to another fid/incr.
Parameters:
  • arg1 (float) – Current start fid
  • arg2 (float) – Current increment
  • arg3 (float) – New fid start
  • arg4 (float) – New fid increment
  • arg5 (int) – New length
  • arg6 (int) – Extrapolate Endpoints (0 - No, 1 - Yes)
Returns:

Nothing

Return type:

None

New in version 5.1.1.

reverse() → None:
Reverses the order of the data in a VV.
Returns:Nothing
Return type:None

New in version 5.1.3.

serial((GXBF)arg1) → None:
Serialize
Parameters:arg1 (geosoft.gx.GXBF) – BF
Returns:Nothing
Return type:None

New in version 5.0.0.

set_data_np((int)start, (ndarray)array) → None:

Transfers data from numpy ndarray into a VV.

Parameters:
  • start (int) – starting element
  • array (ndarray) – array of values to set into the VV
Return type:

None

set_double((int)arg1, (float)arg2) → None:
Set a real element in a VV.
Parameters:
  • arg1 (int) – element to set
  • arg2 (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 VV length, the VV length is
increased.
It is good practice to set the length ahead of time to the
expected maximum value, as some VV processes rely on the
current maximum length of the VV when you pass it in as an
argument, and unexpected results may occur if the length is
not what you expect it to be because of dynamic allocation at
an earlier time.
set_double_n((int)arg1, (int)arg2, (float)arg3) → None:
Set N real elements in a VV.
Parameters:
  • arg1 (int) – start element (>= 0)
  • arg2 (int) – # elements to set (-1 sets all elements to end)
  • 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 VV length, the VV length is
increased.
set_fid_expansion((int)arg1) → None:
Sets the Fiducial expansion from a VV
Parameters:arg1 (int) – Expansion setting (1 or greater)
Returns:Nothing
Return type:None

New in version 6.4.0.

set_fid_incr((float)arg1) → None:
Sets the Fiducial increment of a VV
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 VV
Parameters:arg1 (float) – New start
Returns:Nothing
Return type:None

New in version 5.0.0.

set_int((int)arg1, (int)arg2) → None:
Set an integer element in a VV.
Parameters:
  • arg1 (int) – element to set
  • arg2 (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 VV length, the VV length is
increased.
It is good practice to set the length ahead of time to the
expected maximum value, as some VV processes rely on the
current maximum length of the VV when you pass it in as an
argument, and unexpected results may occur if the length is
not what you expect it to be because of dynamic allocation at
an earlier time.
set_int_n((int)arg1, (int)arg2, (int)arg3) → None:
Set N integer elements in a VV.
Parameters:
  • arg1 (int) – start element (>= 0)
  • arg2 (int) – # elements to set (-1 sets all elements to end)
  • 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 VV length, the VV length is
increased.
set_len((int)arg1) → None:
Set the length of a VV.
Parameters:arg1 (int) – New length (number of elements)
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

If increasing the VV size, new elements are set to dummies.

It is good practice to set the length ahead of time to the
expected maximum value, as some VV processes rely on the
current maximum length of the VV when you pass it in as an
argument, and unexpected results may occur if the length is
not what you expect it to be because of dynamic allocation at
an earlier time.
set_string((int)arg1, (str)arg2) → None:
Set a string element in a VV.
Parameters:
  • arg1 (int) – element to set
  • arg2 (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 VV length, the VV length is
increased.
It is good practice to set the length ahead of time to the
expected maximum value, as some VV processes rely on the
current maximum length of the VV when you pass it in as an
argument, and unexpected results may occur if the length is
not what you expect it to be because of dynamic allocation at
an earlier time.
set_string_n((int)arg1, (int)arg2, (str)arg3) → None:
Set N string elements in a VV.
Parameters:
  • arg1 (int) – start element (>= 0)
  • arg2 (int) – # elements to set (-1 sets all elements to end)
  • 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 VV length, the VV length is
increased.
setup_index((GXVV)arg1, (GXVV)arg2, (int)arg3, (float)arg4) → None:
Setup an index VV from VV1 to VV2.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The input reference VV must be in ascending numerical order.
If your reference data is NOT ordered, then use the the
geosoft.gx.GXVV.sort_index1() function to create an order index, then sort
both the reference and data VVs using this index VV before
you call geosoft.gx.GXVV.setup_index().

Example: You have a reference data set taken at specific times, hVVt, hVVy
and you want to calculate/estimate/interpolate the values hVVy2 at a second set
of times hVVt2

Step 1: Create an index, hVVi, type GS_DOUBLE, and call geosoft.gx.GXVV.setup_index().

e.g. : geosoft.gx.GXVV.setup_index()(hVVt, hVVt2, hVVi, VV_LOOKUP_XXX, rSpacing);

Internally, this assigns index values of 0.0, 1.0, 2.0 etc. to the individual
values in hVVt, then, depending on the lookup method chosen, assigns
fractional index values to the input values in hVVt2.

Step 2: To determine what the lookup values hVVy2 should be at times hVVt2,
call the sLookupIndex_VV function:

e.g. : geosoft.gx.GXVV.lookup_index()(hVVy, hVVi, hVVy2);

Internally, this assigns index values of 0.0, 1.0, 2.0 etc. to the individual
values in hVVy, and uses linear interpolation to calculate the values of
hVVy2 at the input indices contained in hVVi.
sort((int)arg1) → None:
Sort a VV.
Parameters:arg1 (int) – VV_SORT constants
Returns:Nothing
Return type:None

New in version 5.1.5.

sort_index((GXVV)arg1) → None:
Sort index VV based on a data VV.
Parameters:arg1 (geosoft.gx.GXVV) – Index VV of type INT
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

Create an Index VV (of type GS_LONG) based on a data VV.
This index vv can then be used by the IndexOrder method
to order a group of VV's.
sort_index1((GXVV)arg1, (int)arg2) → None:
Sort index VV based on 1 data VV - set orders.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.2.

Note:

Create an Index VV (of type GS_LONG) based on a data VV.
This index vv can then be used by the IndexOrder method
to order a group of VV's. The individual VVs may be ordered
in ascending or descending order.
If the primary VV values of two indices are the same, then
the secondary VV values are compared. If the secondary values
are the same, the ternary values are compared, etc.
sort_index2((GXVV)arg1, (GXVV)arg2, (int)arg3, (int)arg4) → None:
Sort index VV based on 2 data VVs - set orders.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.2.

Note:

Create an Index VV (of type GS_LONG) based on a data VV.
This index vv can then be used by the IndexOrder method
to order a group of VV's. The individual VVs may be ordered
in ascending or descending order.
If the primary VV values of two indices are the same, then
the secondary VV values are compared. If the secondary values
are the same, the ternary values are compared, etc
sort_index3((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4, (int)arg5, (int)arg6) → None:
Sort index VV based on 3 data VVs - set orders.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.2.

Note:

Create an Index VV (of type GS_LONG) based on a data VV.
This index vv can then be used by the IndexOrder method
to order a group of VV's. The individual VVs may be ordered
in ascending or descending order.
If the primary VV values of two indices are the same, then
the secondary VV values are compared. If the secondary values
are the same, the third values are compared, etc
sort_index4((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8) → None:
Sort index VV based on 4 data VVs - set orders.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.2.

Note:

Create an Index VV (of type GS_LONG) based on a data VV.
This index vv can then be used by the IndexOrder method
to order a group of VV's. The individual VVs may be ordered
in ascending or descending order.
If the primary VV values of two indices are the same, then
the secondary VV values are compared. If the secondary values
are the same, the third values are compared, etc
static statistics((GXContext)ctx, (GXST)arg1, (GXVV)arg2) → None:
Add a VV to a ST.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

subtract((GXVV)arg1, (GXVV)arg2) → None:
Subtract one VV from another: VV_A - VV_B = VV_C
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.8.

sum() → float:
Calculate the sum of the values in a VV.
Returns:The sum of the elements.
Return type:float

New in version 7.2.0.

Note:

Dummy value is treated as Zero(0)
swap() → None:
Swaps the bytes of the SHORT, USHORT, LONG, FLOAT and DOUBLE vv's.
Other vv's are not affected by this method. This is used
primarily with changing the order of bytes for other machine
created data.
Returns:Nothing
Return type:None

New in version 5.0.0.

trans((float)arg1, (float)arg2) → None:
Translate (VV + base ) * mult
Parameters:
  • arg1 (float) – base value
  • arg2 (float) – mult value
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

All VV types now supported.
weighted_mean((GXVV)arg1) → float:
Calculate the weighted average of the values.
Parameters:arg1 (geosoft.gx.GXVV) – VV of weights
Returns:The weighted average of the values.
Return type:float

New in version 7.2.0.

Note:

Dummy values are ignored.
window((float)arg1, (float)arg2, (int)arg3) → None:
Limit the elements of a vv to a range.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

write_xml((str)arg1, (int)arg2, (int)arg3) → None:
Write the VV data as an XML object with bytes and formating.
Parameters:
  • arg1 (str) – XML file to create
  • arg2 (int) – format
  • arg3 (int) – Significant digits/decimals
Returns:

Nothing

Return type:

None

New in version 8.0.0.

VV_DOUBLE_CRC_BITS constants

Number of bits to use in double CRC's
gx.VV_DOUBLE_CRC_BITS_EXACT = 0
Exact CRC
gx.VV_DOUBLE_CRC_BITS_DEFAULT = 10
Default inaccuracy in double (10 Bits)
gx.VV_DOUBLE_CRC_BITS_MAX = 51
Maximum number of inaccuracy bits

VV_FLOAT_CRC_BITS constants

Number of bits to use in float CRC's
gx.VV_FLOAT_CRC_BITS_EXACT = 0
Exact CRC
gx.VV_FLOAT_CRC_BITS_DEFAULT = 7
Default inaccuracy in floats (7 Bits)
gx.VV_FLOAT_CRC_BITS_MAX = 22
Maximum number of inaccuracy bits

VV_LOG_BASE constants

Type of log to use
gx.VV_LOG_BASE_10 = 0
Base 10
gx.VV_LOG_BASE_E = 1
Base e

VV_LOG_NEGATIVE constants

Ways to handle negatives
gx.VV_LOG_NEGATIVE_NO = 0
dummies out value less than the minimum.
gx.VV_LOG_NEGATIVE_YES = 1
if the data is in the range +/- minimum,
it is left alone.  Otherwise, the data
is divided by the minimum, the log is
applied, the minimum is added and the
sign is reapplied. Use LogLinear_VV function
if decades in results are required.

VV_LOOKUP constants

Lookup style
gx.VV_LOOKUP_EXACT = 0
only exact matches are used
gx.VV_LOOKUP_NEAREST = 1
nearest match is used (regardless of sampling range)
gx.VV_LOOKUP_INTERPOLATE = 2
interpolate between values (regardless of sampling range)
gx.VV_LOOKUP_NEARESTCLOSE = 3
use nearest match only if within sampling range
gx.VV_LOOKUP_INTERPCLOSE = 4
interpolate only if within sampling range

VV_MASK constants

Where to mask
gx.VV_MASK_INSIDE = 0
gx.VV_MASK_OUTSIDE = 1

VV_ORDER constants

Specify if the data is montonically increasing or decreasing.
gx.VV_ORDER_NONE = 0
There is no specific data size ordering in the VV.
gx.VV_ORDER_INCREASING = 1
Every value is greater than or equal to the previous value.
gx.VV_ORDER_DECREASING = 2
Every value is less than or equal to the previous value.

VV_SORT constants

Sort order
gx.VV_SORT_ASCENDING = 0
gx.VV_SORT_DESCENDING = 1

VV_WINDOW constants

How to handle VV limits
gx.VV_WINDOW_DUMMY = 0
Dummy values outside the limits
gx.VV_WINDOW_LIMIT = 1
Set values outside the limits to the limits