GXVV class

class GXVV(handle=0)

GXVV class.

The GXVV 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 GXVM functions except that you cannot access data directly and therefore you cannot use a GXVV 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 GXGEO.get_ptr_vm function to pass a pointer to the data on to the external function.

See GXVVU for more utility methods.

abs()

Take the absolute value of values in a GXVV.

New in version 7.1.

License: Geosoft Open License

add(vv_y, vv_z)

Add two VVs: VV_A + VV_B = VV_C

Parameters:

New in version 5.0.8.

License: Geosoft Open License

add2(f1, vv_y, f2, vv_z)

Add two VVs with linear factors: VV_A*f1 + VV_B*f2 = VV_C

Parameters:
  • f1 (float) – Multiplier f1 for A
  • vv_y (GXVV) – GXVV B
  • f2 (float) – Multiplier f2 for B
  • vv_z (GXVV) – GXVV C (returned), C = A*f1 + B*f2

New in version 5.0.8.

License: Geosoft Open License

Note: The multipliers must be defined and within the GS_R8MN GS_R8MX range.

amplitude_3d(v_vx, v_vy, v_vz)

Calculate the 3D length for XYZ component VVs

Parameters:

New in version 8.0.1.

License: Geosoft Open License

append(vv_a)

Appends GXVV‘s

Parameters:vv_a (GXVV) – GXVV to append

New in version 5.0.

License: Geosoft Open License

copy(vv_s)

Copy one GXVV to another.

Parameters:vv_s (GXVV) – Source

New in version 5.0.

License: Geosoft Open License

copy2(dest, vv_s, source, n)

Copy part of a vector into part of another vector.

Parameters:
  • dest (int) – Destination start element
  • vv_s (GXVV) – Source GXVV (can be the same as Destination)
  • source (int) – Source start element
  • n (int) – Number of points

New in version 5.0.

License: Geosoft Open License

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

2. All GXVV types are supported and will be converted using Convert_GS if necessary.

count_dummies(start, elem)

Count the number of dummies in a GXVV

Parameters:
  • start (int) – Starting point in GXVV (0 for all)
  • elem (int) – Number of elements to process (-1 for all)
Returns:

The count

Return type:

int

New in version 6.3.

License: Geosoft Open License

crc(pul_crc)

Compute the CRC value of a GXVV.

Parameters:pul_crc (int) – Previous CRC CRC_INIT_VALUE
Returns:CRC Value
Return type:int

New in version 5.0.

License: Geosoft Open License

crc_inexact(pul_crc, float_bits, double_bits)

Compute the CRC value of a GXVV 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.

License: Geosoft Open License

Note: Very useful for testing where the last bits of accuracy are not as important.

classmethod create(type, elements)

Create a GXVV.

Parameters:
Returns:

GXVV Object

Return type:

GXVV

New in version 5.0.

License: Geosoft Open License

Note: To set the fiducial start and increment for the data in the GXVV you need to call set_fid_start and set_fid_incr.

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

If you do not know the required length for a GXVV, use 0 and the GXVV length will be adjusted as needed. This is a bit less efficient than setting the length when you know it.

classmethod create_ext(type, elements)

Create a GXVV, using one of the GS_TYPES constants special data types.

Parameters:
Returns:

GXVV Object

Return type:

GXVV

New in version 5.0.

License: Geosoft Open License

Note: See create

Do not use data type flags: GS_INT or GS_REAL, this will result in a respective data type of unsigned byte or short for the GXVV.

classmethod create_s(bf)

Create a GXVV from serialized source.

Returns:GXVV Object
Return type:GXVV

New in version 5.0.

License: Geosoft Open License

diff(n)

Calculate differences.

Parameters:n (int) – Number of differences

New in version 5.0.

License: Geosoft End-User License

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 GXVV.

divide(vv_y, vv_z)

Divide one GXVV by another: VV_A / VV_B = VV_C

Parameters:

New in version 5.0.8.

License: Geosoft Open License

fid_norm(vv2)

Re-sample a pair of GXVV‘s to match each other.

Parameters:vv2 (GXVV) – GXVV to resample

New in version 5.0.

License: Geosoft End-User License

Note: Both GXVV‘s will return with the same start fid and fid increment. The smaller start fid and fid increment will be used.

fill_double(val)

Fill a GXVV with a real value.

Parameters:val (float) – Value to fill with

New in version 5.0.

License: Geosoft Open License

fill_int(int)

Fill a GXVV with an int value.

Parameters:int (int) – Value to fill with

New in version 5.0.

License: Geosoft Open License

fill_string(str_val)

Fill a GXVV with a string value.

Parameters:str_val (str) – String

New in version 5.0.

License: Geosoft Open License

find_dum(start, end, yn, order)

Finds the first dummy or non-dummy value in a GXVV

Parameters:
  • start (int) – Lowest element in GXVV element to search
  • end (int) – Highest element in GXVV to search
  • yn (int) – 0 = find first dummy / 1 = find first non-dummy
  • order (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 GXVV is 0.

Return type:

int

New in version 5.0.

License: Geosoft Open License

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(start, elements, data, gs_type)

Copy data from user memory to a GXVV

Parameters:
  • start (int) – Start Location
  • elements (int) – Number of Elements
  • data (bytearray) – Data buffer copy data into from GXVV
  • gs_type (int) – GS_TYPES constants

New in version 5.0.

License: Geosoft Open License

get_double(element)

Get a real element from a GXVV.

Parameters:element (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.

License: Geosoft Open License

Note: Type conversions are performed if necessary. Dummy values are converted to “*” string.

get_fid_expansion()

Gets the Fiducial expansion from a GXVV

Returns:Number of expanions for this GXVV (see re_fid_vv)
Return type:int

New in version 6.4.

License: Geosoft Open License

get_fid_incr()

Gets the Fiducial increment from a GXVV

Returns:Fiducial increment of the GXVV.
Return type:float

New in version 5.0.

License: Geosoft Open License

get_fid_start()

Gets the Fiducial start from a GXVV

Returns:Fiducial start of the GXVV.
Return type:float

New in version 5.0.

License: Geosoft Open License

get_int(element)

Get an integer element from a GXVV.

Parameters:element (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.

License: Geosoft Open License

get_string(element, str_val)

Get a string element from a GXVV.

Parameters:
  • element (int) – Element wanted
  • str_val (str_ref) – String in which to place element

New in version 5.0.

License: Geosoft Open License

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(vv_d, vv_i)

Insert items into a GXVV using an index GXVV.

Parameters:
  • vv_d (GXVV) – Data items to insert (must be same type as output data GXVV)
  • vv_i (GXVV) – Index GXVV (must be type INT)

New in version 6.2.

License: Geosoft Open License

Note: The items in the input data GXVV are inserted into the output GXVV using the indices in the index GXVV. Values not referenced are not altered, so the output GXVV should be pre-initialized. The output GXVV length will NOT be changed, and index values referencing beyond the end of the output GXVV 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...) GXVV, using the init_index function, and when you remove the dummies, remove the corresponding index values as well. After processing, init a GXVV to dummies, then use index_insert to put the processed values at the correct locations in the data GXVV before you write it back to the channel.

index_max(max)

Get the index where the maximum value occurs.

Parameters:max (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.

License: Geosoft End-User License

Note: If more than one value has the same maximum value, the index of the first is returned.

index_order(vv_d)

Reorder a GXVV.

Parameters:vv_d (GXVV) – GXVV to order

New in version 5.0.

License: Geosoft End-User License

Note: Given an index GXVV (of type INT), this method reorders a GXVV. Please make sure that the index holds valid information.

init_index(n)

Initialize an index GXVV to values 0, 1, 2, etc...

Parameters:n (int) – Final length of GXVV (-1 to use current length).

New in version 6.2.

License: Geosoft Open License

Note: Populates a GXVV with the values 0, 1, 2, 3, 4 etc., to be used for various indexing functions, such as index_insert or index_order.

inv_log(log_base, log_neg, log_min)

Inverse of the log function.

Parameters:

New in version 7.3.

License: Geosoft Open License

Note: This is the inverse function for log, 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()

Check if this is a null (undefined) instance

Returns:True if this is a null (undefined) instance, False otherwise.
Return type:bool
length()

Returns current GXVV length.

Returns:# of elements in the GXVV.
Return type:int

New in version 5.0.

License: Geosoft Open License

lines_to_xy(vv_x, vv_y)

Convert a 2D Line segment GXVV into X and Y VVs.

Parameters:

New in version 8.0.

License: Geosoft End-User License

Note: Some GX functions (such as GXTIN.get_voronoi_edges) return a special GXVV 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(log_base, log_neg, log_min)

Apply log to the vv.

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: Minimum value will be defaulted to 1.0 if it is 0.0 or less than 0.0

log_linear(log_min)

Take the log10 or original value of a GXVV.

Parameters:log_min (float) – Minimum value

New in version 5.0.

License: Geosoft Open License

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(vvi, vvr)

Lookup a GXVV from another GXVV using an index GXVV.

Parameters:

New in version 5.0.

License: Geosoft End-User License

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

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

See also setup_index for an example of how this can be implemented.

make_mem_based()

Make this GXVV use regular instead of virtual memory.

New in version 5.1.2.

License: Geosoft Open License

Note: This function should be called immediately aftter 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 GXVV‘s that you know can be handled by the operating system virtual memory manager, and will be used heavily. By using a memory based GXVV, 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 GXVV‘s because you can get direct access to the GXVV through the GXGEO.get_ptr_vv function (see gx_extern.h).

See also

GXGEO.get_ptr_vv in gx_extern.h

mask(vv_m)

Mask one GXVV against another.

Parameters:vv_m (GXVV) – Mask GXVV

New in version 5.0.

License: Geosoft End-User License

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

The modified GXVV will always be the same length as the mask GXVV after this call. If the mask is longer than the target, the target will be lengthenned with dummies.

mask_and(vv_y, vv_z)

Create mask from logical AND of two VVs.

Parameters:

New in version 5.1.2.

License: Geosoft End-User License

Note: If both values are non-dummies, then result is 1, else dummy.

mask_or(vv_y, vv_z)

Create mask from logical OR of two VVs.

Parameters:

New in version 5.1.2.

License: Geosoft End-User License

Note: If either values is non-dummy, then result is 1, else dummy.

mask_str(vv_m, str_val)

Mask one GXVV against another using a string.

Parameters:
  • vv_m (GXVV) – Mask GXVV
  • str_val (str) – String to compare

New in version 5.0.

License: Geosoft End-User License

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

The modified GXVV 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(vv_y, vv_z)

Multiply two VVs: VV_A * VV_B = VV_C

Parameters:

New in version 5.0.8.

License: Geosoft Open License

classmethod null()

A null (undefined) instance of GXVV

Returns:A null GXVV
Return type:GXVV
order(rep)

Identifies the data size order of the elements.

Parameters:rep (int_ref) – Returned: Do any values repeat (0: No, 1: Yes)?
Returns:VV_ORDER constants
Return type:int

New in version 6.4.

License: Geosoft End-User License

polygon_mask(yvv, rvv, pply, dummy)

Mask a GXVV using XY data and a polygon

Parameters:

New in version 5.1.3.

License: Geosoft End-User License

Note: The VVs has to be the same length

classmethod project(pj, vv_x, vv_y)

This method projects an X and Y GXVV.

Parameters:

New in version 5.0.

License: Geosoft End-User License

Note: This function is equivalent to GXPJ.convert_vv.

classmethod project_3d(pj, vv_x, vv_y, vv_z)

This method projects an X,Y,Z GXVV.

Parameters:

New in version 5.0.

License: Geosoft End-User License

Note: This function is equivalent to GXPJ.convert_vv3.

range_double(min, max)

Get the min. and max. values of a GXVV while ignoring dummies.

Parameters:
  • min (float_ref) – Minimum value - returned
  • max (float_ref) – Maximum value - returned

New in version 5.0.

License: Geosoft Open License

Note: Minimum and maximum become GS_R8DM if entire GXVV is dummy.

re_fid(start, incr, length)

Re-sample a GXVV to a new fid start/icrement

Parameters:
  • start (float) – New fid start
  • incr (float) – New fid increment
  • length (int) – New length

New in version 5.0.

License: Geosoft Open License

re_fid_vv(vv_m)

Re-sample a GXVV to match another GXVV.

Parameters:vv_m (GXVV) – GXVV model (fid increment and start)

New in version 5.0.

License: Geosoft Open License

Note: This method will honor the GXVV FID Expansion and will expand/contract GXVV‘s based on this flag if it is used.

re_sample(c_start, c_incr, n_start, n_incr, length, extr)

Resamples a GXVV from one fid/incr to another fid/incr.

Parameters:
  • c_start (float) – Current start fid
  • c_incr (float) – Current increment
  • n_start (float) – New fid start
  • n_incr (float) – New fid increment
  • length (int) – New length
  • extr (int) – Extrapolate Endpoints (0 - No, 1 - Yes)

New in version 5.1.1.

License: Geosoft Open License

reverse()

Reverses the order of the data in a GXVV.

New in version 5.1.3.

License: Geosoft End-User License

serial(bf)

Serialize

New in version 5.0.

License: Geosoft Open License

set_data(start, elements, data, gs_type)

Copy data from user memory to a GXVV

Parameters:
  • start (int) – Start Location
  • elements (int) – Number of Elements
  • data (bytearray) – Data buffer to copy into into GXVV
  • gs_type (int) – GS_TYPES constants

New in version 5.0.

License: Geosoft Open License

set_double(element, value)

Set a real element in a GXVV.

Parameters:
  • element (int) – Element to set
  • 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 GXVV length, the GXVV length is increased. It is good practice to set the length ahead of time to the expected maximum value, as some GXVV processes rely on the current maximum length of the GXVV 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(start, n, value)

Set N real elements in a GXVV.

Parameters:
  • start (int) – Start element (>= 0)
  • n (int) – # elements to set (-1 sets all elements to end)
  • 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 GXVV length, the GXVV length is increased.

set_fid_expansion(expand)

Sets the Fiducial expansion from a GXVV

Parameters:expand (int) – Expansion setting (1 or greater)

New in version 6.4.

License: Geosoft Open License

set_fid_incr(incr)

Sets the Fiducial increment of a GXVV

Parameters:incr (float) – New increment

New in version 5.0.

License: Geosoft Open License

set_fid_start(start)

Sets the Fiducial start of a GXVV

Parameters:start (float) – New start

New in version 5.0.

License: Geosoft Open License

set_int(element, value)

Set an integer element in a GXVV.

Parameters:
  • element (int) – Element to set
  • 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 GXVV length, the GXVV length is increased. It is good practice to set the length ahead of time to the expected maximum value, as some GXVV processes rely on the current maximum length of the GXVV 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(start, n, value)

Set N integer elements in a GXVV.

Parameters:
  • start (int) – Start element (>= 0)
  • n (int) – # elements to set (-1 sets all elements to end)
  • 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 GXVV length, the GXVV length is increased.

set_len(size)

Set the length of a GXVV.

Parameters:size (int) – New length (number of elements)

New in version 5.0.

License: Geosoft Open License

Note: If increasing the GXVV 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 GXVV processes rely on the current maximum length of the GXVV 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(element, value)

Set a string element in a GXVV.

Parameters:
  • element (int) – Element to set
  • 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 GXVV length, the GXVV length is increased. It is good practice to set the length ahead of time to the expected maximum value, as some GXVV processes rely on the current maximum length of the GXVV 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(start, n, value)

Set N string elements in a GXVV.

Parameters:
  • start (int) – Start element (>= 0)
  • n (int) – # elements to set (-1 sets all elements to end)
  • 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 GXVV length, the GXVV length is increased.

setup_index(vvq, vvi, mode, space)

Setup an index GXVV from VV1 to VV2.

Parameters:

New in version 5.0.

License: Geosoft End-User License

Note: The input reference GXVV must be in ascending numerical order. If your reference data is NOT ordered, then use the sort_index1 function to create an order index, then sort both the reference and data VVs using this index GXVV before you call 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 setup_index.

with: 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 lookup_index function for hVVy with 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(order)

Sort a GXVV.

Parameters:order (int) – VV_SORT constants

New in version 5.1.5.

License: Geosoft End-User License

sort_index(ivv)

Sort index GXVV based on a data GXVV.

Parameters:ivv (GXVV) – Index GXVV of type INT

New in version 5.0.

License: Geosoft End-User License

Note: Create an Index GXVV (of type GS_LONG) based on a data GXVV. This index vv can then be used by the IndexOrder method to order a group of GXVV‘s.

sort_index1(ivv, ord1)

Sort index GXVV based on 1 data GXVV - set orders.

Parameters:

New in version 5.0.2.

License: Geosoft End-User License

Note: Create an Index GXVV (of type GS_LONG) based on a data GXVV. This index vv can then be used by the IndexOrder method to order a group of GXVV‘s. The individual VVs may be ordered in ascending or descending order. If the primary GXVV values of two indices are the same, then the secondary GXVV values are compared. If the secondary values are the same, the ternary values are compared, etc.

sort_index2(d2_vv, ivv, ord1, ord2)

Sort index GXVV based on 2 data VVs - set orders.

Parameters:

New in version 5.0.2.

License: Geosoft End-User License

Note: Create an Index GXVV (of type GS_LONG) based on a data GXVV. This index vv can then be used by the IndexOrder method to order a group of GXVV‘s. The individual VVs may be ordered in ascending or descending order. If the primary GXVV values of two indices are the same, then the secondary GXVV values are compared. If the secondary values are the same, the ternary values are compared, etc

sort_index3(d2_vv, d3_vv, ivv, ord1, ord2, ord3)

Sort index GXVV based on 3 data VVs - set orders.

Parameters:

New in version 5.0.2.

License: Geosoft End-User License

Note: Create an Index GXVV (of type GS_LONG) based on a data GXVV. This index vv can then be used by the IndexOrder method to order a group of GXVV‘s. The individual VVs may be ordered in ascending or descending order. If the primary GXVV values of two indices are the same, then the secondary GXVV values are compared. If the secondary values are the same, the third values are compared, etc

sort_index4(d2_vv, d3_vv, d4_vv, ivv, ord1, ord2, ord3, ord4)

Sort index GXVV based on 4 data VVs - set orders.

Parameters:

New in version 5.0.2.

License: Geosoft End-User License

Note: Create an Index GXVV (of type GS_LONG) based on a data GXVV. This index vv can then be used by the IndexOrder method to order a group of GXVV‘s. The individual VVs may be ordered in ascending or descending order. If the primary GXVV values of two indices are the same, then the secondary GXVV values are compared. If the secondary values are the same, the third values are compared, etc

classmethod statistics(st, vv)

Add a GXVV to a GXST.

Parameters:

New in version 5.0.

License: Geosoft End-User License

subtract(vv_y, vv_z)

Subtract one GXVV from another: VV_A - VV_B = VV_C

Parameters:

New in version 5.0.8.

License: Geosoft Open License

sum()

Calculate the sum of the values in a GXVV.

Returns:The sum of the elements.
Return type:float

New in version 7.2.

License: Geosoft End-User License

Note: Dummy value is treated as Zero(0)

swap()

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.

New in version 5.0.

License: Geosoft End-User License

trans(base, mult)

Translate (GXVV + base ) * mult

Parameters:
  • base (float) – Base value
  • mult (float) – Mult value

New in version 5.0.

License: Geosoft Open License

Note: All GXVV types now supported.

weighted_mean(vv_weights)

Calculate the weighted average of the values.

Parameters:vv_weights (GXVV) – GXVV of weights
Returns:The weighted average of the values.
Return type:float

New in version 7.2.

License: Geosoft End-User License

Note: Dummy values are ignored.

window(min, max, mode)

Limit the elements of a vv to a range.

Parameters:

New in version 5.0.

License: Geosoft End-User License

write_xml(file, format, decimal)

Write the GXVV data as an XML object with bytes and formating.

Parameters:
  • file (str) – XML file to create
  • format (int) – Format
  • decimal (int) – Significant digits/decimals

New in version 8.0.

License: Geosoft End-User License

VV_DOUBLE_CRC_BITS constants

Number of bits to use in double CRC’s

VV_DOUBLE_CRC_BITS_EXACT

Exact CRC

gxapi.VV_DOUBLE_CRC_BITS_EXACT = 0
VV_DOUBLE_CRC_BITS_DEFAULT

Default inaccuracy in double (10 Bits)

gxapi.VV_DOUBLE_CRC_BITS_DEFAULT = 10
VV_DOUBLE_CRC_BITS_MAX

Maximum number of inaccuracy bits

gxapi.VV_DOUBLE_CRC_BITS_MAX = 51

VV_FLOAT_CRC_BITS constants

Number of bits to use in float CRC’s

VV_FLOAT_CRC_BITS_EXACT

Exact CRC

gxapi.VV_FLOAT_CRC_BITS_EXACT = 0
VV_FLOAT_CRC_BITS_DEFAULT

Default inaccuracy in floats (7 Bits)

gxapi.VV_FLOAT_CRC_BITS_DEFAULT = 7
VV_FLOAT_CRC_BITS_MAX

Maximum number of inaccuracy bits

gxapi.VV_FLOAT_CRC_BITS_MAX = 22

VV_LOG_BASE constants

Type of log to use

VV_LOG_BASE_10

Base 10

gxapi.VV_LOG_BASE_10 = 0
VV_LOG_BASE_E

Base e

gxapi.VV_LOG_BASE_E = 1

VV_LOG_NEGATIVE constants

Ways to handle negatives

VV_LOG_NEGATIVE_NO

Dummies out value less than the minimum.

gxapi.VV_LOG_NEGATIVE_NO = 0
VV_LOG_NEGATIVE_YES

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 log_linear function if decades in results are required.

gxapi.VV_LOG_NEGATIVE_YES = 1

VV_LOOKUP constants

Lookup style

VV_LOOKUP_EXACT

Only exact matches are used

gxapi.VV_LOOKUP_EXACT = 0
VV_LOOKUP_NEAREST

Nearest match is used (regardless of sampling range)

gxapi.VV_LOOKUP_NEAREST = 1
VV_LOOKUP_INTERPOLATE

Interpolate between values (regardless of sampling range)

gxapi.VV_LOOKUP_INTERPOLATE = 2
VV_LOOKUP_NEARESTCLOSE

Use nearest match only if within sampling range

gxapi.VV_LOOKUP_NEARESTCLOSE = 3
VV_LOOKUP_INTERPCLOSE

Interpolate only if within sampling range

gxapi.VV_LOOKUP_INTERPCLOSE = 4

VV_MASK constants

Where to mask

VV_MASK_INSIDE

Inside

gxapi.VV_MASK_INSIDE = 0
VV_MASK_OUTSIDE

Outside

gxapi.VV_MASK_OUTSIDE = 1

VV_ORDER constants

Specify if the data is montonically increasing or decreasing.

VV_ORDER_NONE

There is no specific data size ordering in the GXVV.

gxapi.VV_ORDER_NONE = 0
VV_ORDER_INCREASING

Every value is greater than or equal to the previous value.

gxapi.VV_ORDER_INCREASING = 1
VV_ORDER_DECREASING

Every value is less than or equal to the previous value.

gxapi.VV_ORDER_DECREASING = 2

VV_SORT constants

Sort order

VV_SORT_ASCENDING

Ascending

gxapi.VV_SORT_ASCENDING = 0
VV_SORT_DESCENDING

Descending

gxapi.VV_SORT_DESCENDING = 1

VV_WINDOW constants

How to handle GXVV limits

VV_WINDOW_DUMMY

Dummy values outside the limits

gxapi.VV_WINDOW_DUMMY = 0
VV_WINDOW_LIMIT

Set values outside the limits to the limits

gxapi.VV_WINDOW_LIMIT = 1