GXVV class¶
- class GXVV(handle=0)[source]¶
GXVV class.
The
GXVVclass 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 theGXVMfunctions except that you cannot access data directly and therefore you cannot use aGXVVto 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_vmfunction to pass a pointer to the data on to the external function.See
GXVVUfor more utility methods.- abs()[source]¶
Take the absolute value of values in a
GXVV.New in version 7.1.
License: Geosoft Open License
- add(vv_b, vv_c)[source]¶
Add two VVs: VV_A + VV_B = VV_C
New in version 5.0.8.
License: Geosoft Open License
- add2(f1, vv_b, f2, vv_c)[source]¶
Add two VVs with linear factors: VV_A*f1 + VV_B*f2 = VV_C
- Parameters:
New in version 5.0.8.
License: Geosoft Open License
Note: The multipliers must be defined and within the
GS_R8MNGS_R8MXrange.
- amplitude_3d(v_vx, v_vy, v_vz)[source]¶
Calculate the 3D length for XYZ component VVs
- Parameters:
New in version 8.0.1.
License: Geosoft Open License
- append(vv_a)[source]¶
Appends
GXVV’sNew in version 5.0.
License: Geosoft Open License
- copy(vv_s)[source]¶
Copy one
GXVVto another.- Parameters:
vv_s (GXVV) – Source
New in version 5.0.
License: Geosoft Open License
- copy2(dest, vv_s, source, n)[source]¶
Copy part of a vector into part of another vector.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: 1. Unlike Copy_VV destination
GXVVis not reallocated, nor is the length changed. The caller must make any desired changes.2. All
GXVVtypes are supported and will be converted using Convert_GS if necessary.
- count_dummies(start, elem)[source]¶
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)[source]¶
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)[source]¶
Compute the CRC value of a
GXVVand 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:
pul_crc (int) – Previous CRC
CRC_INIT_VALUEfloat_bits (int) – VV_FLOAT_CRC_BITS constants
double_bits (int) – VV_DOUBLE_CRC_BITS constants
- 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)[source]¶
Create a
GXVV.- Parameters:
type (int) – GEO_VAR constants
elements (int) – Maximum number of elements in the
GXVV, >= 0
- Returns:
GXVVObject- Return type:
New in version 5.0.
License: Geosoft Open License
Note: To set the fiducial start and increment for the data in the
GXVVyou need to callset_fid_startandset_fid_incr.If you are basing the
GXVVdata on fiducial information from a differentGXVV, call GetFidStart_VV and GetFidIncr_VV to obtain thatGXVV’s fiducial information. Do this prior to setting the newGXVV’s fiducial start and increment.If you do not know the required length for a
GXVV, use 0 and theGXVVlength will be adjusted as needed. This is a bit less efficient than setting the length when you know it.
- classmethod create_ext(type, elements)[source]¶
Create a
GXVV, using one of the GS_TYPES constants special data types.- Parameters:
type (int) – GS_TYPES constants
elements (int) – Maximum number of elements in the
GXVV, >= 0
- Returns:
GXVVObject- Return type:
New in version 5.0.
License: Geosoft Open License
Note: See
createDo not use data type flags:
GS_INTorGS_REAL, this will result in a respective data type of unsigned byte or short for theGXVV.
- classmethod create_s(bf)[source]¶
Create a
GXVVfrom serialized source.New in version 5.0.
License: Geosoft Open License
- diff(n)[source]¶
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)[source]¶
Divide one
GXVVby another: VV_A / VV_B = VV_CNew in version 5.0.8.
License: Geosoft Open License
- fid_norm(vv2)[source]¶
Re-sample a pair of
GXVV’s to match each other.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)[source]¶
Fill a
GXVVwith a real value.- Parameters:
val (float) – Value to fill with
New in version 5.0.
License: Geosoft Open License
- fill_int(value)[source]¶
Fill a
GXVVwith an int value.- Parameters:
value (int) – Value to fill with
New in version 5.0.
License: Geosoft Open License
- fill_string(str_val)[source]¶
Fill a
GXVVwith a string value.- Parameters:
str_val (str) – String
New in version 5.0.
License: Geosoft Open License
- find_dum(start, end, yn, order)[source]¶
Finds the first dummy or non-dummy value in a
GXVV- Parameters:
- Returns:
The index of the first dummy or non-dummy value. -1 if not found, 0 if the length of the
GXVVis 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)[source]¶
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
GXVVgs_type (int) – GS_TYPES constants
New in version 5.0.
License: Geosoft Open License
- get_double(element)[source]¶
Get a real element from a
GXVV.- Parameters:
element (int) – Element wanted
- Returns:
Element wanted, or
rDUMMYif 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_ext_type()[source]¶
Return the internal data type of this VV
- Returns:
The internal VV data type GS_TYPES constants
- Return type:
int
New in version 9.6.
License: Geosoft Open License
- get_fid_expansion()[source]¶
Gets the Fiducial expansion from a
GXVVNew in version 6.4.
License: Geosoft Open License
- get_fid_incr()[source]¶
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()[source]¶
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)[source]¶
Get an integer element from a
GXVV.- Parameters:
element (int) – Element wanted
- Returns:
Element wanted, or
iDUMMYif 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)[source]¶
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)[source]¶
Insert items into a
GXVVusing an indexGXVV.- Parameters:
New in version 6.2.
License: Geosoft Open License
Note: The items in the input data
GXVVare inserted into the outputGXVVusing the indices in the indexGXVV. Values not referenced are not altered, so the outputGXVVshould be pre-initialized. The outputGXVVlength will NOT be changed, and index values referencing beyond the end of the outputGXVVdata 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 theinit_indexfunction, and when you remove the dummies, remove the corresponding index values as well. After processing, init aGXVVto dummies, then useindex_insertto put the processed values at the correct locations in the dataGXVVbefore you write it back to the channel.
- index_max(max)[source]¶
Get the index where the maximum value occurs.
- Parameters:
max (float_ref) – Maximum value (
rDUMMYif all dummies or no data)- Returns:
Index of the maximum value,
iDUMMYif 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)[source]¶
Reorder a
GXVV.New in version 5.0.
License: Geosoft End-User License
Note: Given an index
GXVV(of type INT), this method reorders aGXVV. Please make sure that the index holds valid information.
- init_index(n)[source]¶
Initialize an index
GXVVto 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
GXVVwith the values 0, 1, 2, 3, 4 etc., to be used for various indexing functions, such asindex_insertorindex_order.
- inv_log(log_base, log_mode, log_min)[source]¶
Inverse of the
logfunction.- Parameters:
log_base (int) – VV_LOG_BASE constants
log_mode (int) – VV_LOGMODE constants
log_min (float) – Minimum value for VV_LOG_NEGATIVE
New in version 7.3.
License: Geosoft Open License
Note: This is the inverse function for
log, with the same inputs.
- is_null()[source]¶
Check if this is a null (undefined) instance
- Returns:
True if this is a null (undefined) instance, False otherwise.
- Return type:
bool
- length()[source]¶
Returns current
GXVVlength.- 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)[source]¶
Convert a 2D Line segment
GXVVinto 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 specialGXVVwhere 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 typeGS_DOUBLE(REAL). N lines produces 2*N X and Y values.
- log(log_base, log_mode, log_min)[source]¶
Apply log to the vv.
- Parameters:
log_base (int) – VV_LOG_BASE constants
log_mode (int) – VV_LOGMODE constants
log_min (float) – Minimum value for VV_LOG_NEGATIVE
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)[source]¶
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)[source]¶
Lookup a
GXVVfrom anotherGXVVusing an indexGXVV.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 ResultGXVVat the input indices contained in the IndexGXVV.If the input Data
GXVVis string type, then only values at the integral index values are returned.See also
setup_indexfor an example of how this can be implemented.
- make_mem_based()[source]¶
Make this
GXVVuse 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 basedGXVV, 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 theGXVVthrough theGXGEO.get_ptr_vvfunction (see gx_extern.h).See also
GXGEO.get_ptr_vvin gx_extern.h
- mask(vv_m)[source]¶
Mask one
GXVVagainst another.New in version 5.0.
License: Geosoft Open License
Note: All elements in the mask
GXVVthat are dummies will replace the value in the originalGXVVwith a dummy.The modified
GXVVwill always be the same length as the maskGXVVafter this call. If the mask is longer than the target, the target will be lengthenned with dummies.
- mask_and(vv_y, vv_z)[source]¶
Create mask from logical AND of two VVs.
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)[source]¶
Create mask from logical OR of two VVs.
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)[source]¶
Mask one
GXVVagainst another using a string.New in version 5.0.
License: Geosoft End-User License
Note: All elements in the mask
GXVVthat are same as string will replace the originalGXVVwith a 1.The modified
GXVVwill 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)[source]¶
Multiply two VVs: VV_A * VV_B = VV_C
New in version 5.0.8.
License: Geosoft Open License
- order(rep)[source]¶
Identifies the data size order of the elements.
- Parameters:
rep (int_ref) – Returned: Do any values repeat (0: No, 1: Yes)?
- Returns:
- Return type:
int
New in version 6.4.
License: Geosoft End-User License
- polygon_mask(yvv, rvv, pply, dummy)[source]¶
Mask a
GXVVusing 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)[source]¶
This method projects an X and Y
GXVV.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)[source]¶
This method projects an X,Y,Z
GXVV.New in version 5.0.
License: Geosoft End-User License
Note: This function is equivalent to
GXPJ.convert_vv3.
- range_double(min, max)[source]¶
Get the min. and max. values of a
GXVVwhile ignoring dummies.New in version 5.0.
License: Geosoft Open License
Note: Minimum and maximum become
GS_R8DMif entireGXVVis dummy.
- re_fid(start, incr, length)[source]¶
Re-sample a
GXVVto 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)[source]¶
Re-sample a
GXVVto match anotherGXVV.New in version 5.0.
License: Geosoft Open License
Note: This method will honor the
GXVVFID Expansion and will expand/contractGXVV’s based on this flag if it is used.
- re_sample(c_start, c_incr, n_start, n_incr, length, unused)[source]¶
Resamples a
GXVVfrom 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
unused (int) – This parameter is not used
New in version 5.1.1.
License: Geosoft Open License
- reverse()[source]¶
Reverses the order of the data in a
GXVV.New in version 5.1.3.
License: Geosoft End-User License
- serial(bf)[source]¶
Serialize
New in version 5.0.
License: Geosoft Open License
- set_data(start, elements, data, gs_type)[source]¶
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
GXVVgs_type (int) – GS_TYPES constants
New in version 5.0.
License: Geosoft Open License
- set_double(element, value)[source]¶
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
GXVVlength, theGXVVlength is increased. It is good practice to set the length ahead of time to the expected maximum value, as someGXVVprocesses rely on the current maximum length of theGXVVwhen 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)[source]¶
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
GXVVlength, theGXVVlength is increased.
- set_fid_expansion(expand)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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
GXVVlength, theGXVVlength is increased. It is good practice to set the length ahead of time to the expected maximum value, as someGXVVprocesses rely on the current maximum length of theGXVVwhen 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)[source]¶
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
GXVVlength, theGXVVlength is increased.
- set_len(size)[source]¶
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
GXVVsize, new elements are set to dummies.It is good practice to set the length ahead of time to the expected maximum value, as some
GXVVprocesses rely on the current maximum length of theGXVVwhen 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)[source]¶
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
GXVVlength, theGXVVlength is increased. It is good practice to set the length ahead of time to the expected maximum value, as someGXVVprocesses rely on the current maximum length of theGXVVwhen 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)[source]¶
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
GXVVlength, theGXVVlength is increased.
- setup_index(vvq, vvi, mode, space)[source]¶
Setup an index
GXVVfrom VV1 to VV2.- Parameters:
New in version 5.0.
License: Geosoft End-User License
Note: The input reference
GXVVmust be in ascending numerical order. If your reference data is NOT ordered, then use thesort_index1function to create an order index, then sort both the reference and data VVs using this indexGXVVbefore you callsetup_index.Example: You have a reference data set taken at specific times,
hVVt,hVVyand you want to calculate/estimate/interpolate the valueshVVy2at a second set of timeshVVt2Step 1: Create an index,
hVVi, typeGS_DOUBLE, and callsetup_index.with:
hVVt2, hVVi, VV_LOOKUP_XXX, rSpacingInternally, 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 inhVVt2.Step 2: To determine what the lookup values
hVVy2should be at timeshVVt2, call thelookup_indexfunction for hVVy withhVVi, hVVy2Internally, 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 ofhVVy2at the input indices contained inhVVi.
- sort(order)[source]¶
Sort a
GXVV.- Parameters:
order (int) – VV_SORT constants
New in version 5.1.5.
License: Geosoft End-User License
- sort_index(ivv)[source]¶
Sort index
GXVVbased on a dataGXVV.New in version 5.0.
License: Geosoft End-User License
Note: Create an Index
GXVV(of typeGS_LONG) based on a dataGXVV. This index vv can then be used by the IndexOrder method to order a group ofGXVV’s.
- sort_index1(ivv, ord1)[source]¶
Sort index
GXVVbased on 1 dataGXVV- set orders.- Parameters:
ord1 (int) – VV_SORT constants
New in version 5.0.2.
License: Geosoft End-User License
Note: Create an Index
GXVV(of typeGS_LONG) based on a dataGXVV. This index vv can then be used by the IndexOrder method to order a group ofGXVV’s. The individual VVs may be ordered in ascending or descending order. If the primaryGXVVvalues of two indices are the same, then the secondaryGXVVvalues are compared. If the secondary values are the same, the ternary values are compared, etc.
- sort_index2(d2_vv, ivv, ord1, ord2)[source]¶
Sort index
GXVVbased on 2 data VVs - set orders.- Parameters:
ord1 (int) – Primary Sort order VV_SORT constants
ord2 (int) – Secondary Sort order VV_SORT constants
New in version 5.0.2.
License: Geosoft End-User License
Note: Create an Index
GXVV(of typeGS_LONG) based on a dataGXVV. This index vv can then be used by the IndexOrder method to order a group ofGXVV’s. The individual VVs may be ordered in ascending or descending order. If the primaryGXVVvalues of two indices are the same, then the secondaryGXVVvalues 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)[source]¶
Sort index
GXVVbased on 3 data VVs - set orders.- Parameters:
ord1 (int) – Primary Sort order VV_SORT constants
ord2 (int) – Secondary sort order VV_SORT constants
ord3 (int) – Third Sort order VV_SORT constants
New in version 5.0.2.
License: Geosoft End-User License
Note: Create an Index
GXVV(of typeGS_LONG) based on a dataGXVV. This index vv can then be used by the IndexOrder method to order a group ofGXVV’s. The individual VVs may be ordered in ascending or descending order. If the primaryGXVVvalues of two indices are the same, then the secondaryGXVVvalues 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)[source]¶
Sort index
GXVVbased on 4 data VVs - set orders.- Parameters:
ord1 (int) – Primary Ssort order VV_SORT constants
ord2 (int) – Secondary Sort order VV_SORT constants
ord3 (int) – Third Sort order VV_SORT constants
ord4 (int) – Fourth Sort order VV_SORT constants
New in version 5.0.2.
License: Geosoft End-User License
Note: Create an Index
GXVV(of typeGS_LONG) based on a dataGXVV. This index vv can then be used by the IndexOrder method to order a group ofGXVV’s. The individual VVs may be ordered in ascending or descending order. If the primaryGXVVvalues of two indices are the same, then the secondaryGXVVvalues are compared. If the secondary values are the same, the third values are compared, etc
- classmethod statistics(st, vv)[source]¶
-
New in version 5.0.
License: Geosoft End-User License
- subtract(vv_y, vv_z)[source]¶
Subtract one
GXVVfrom another: VV_A - VV_B = VV_CNew in version 5.0.8.
License: Geosoft Open License
- sum()[source]¶
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()[source]¶
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)[source]¶
Translate (
GXVV+ base ) * mult- Parameters:
base (float) – Base value
mult (float) – Mult value
New in version 5.0.
License: Geosoft Open License
Note: All
GXVVtypes now supported.
- weighted_mean(vv_weights)[source]¶
Calculate the weighted average of the values.
- Parameters:
- 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)[source]¶
Limit the elements of a vv to a range.
- Parameters:
min (float) – Min Val
max (float) – Max Val
mode (int) – VV_WINDOW constants
New in version 5.0.
License: Geosoft End-User License
- write_xml(file, format, decimal)[source]¶
Write the
GXVVdata 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_FLOAT_CRC_BITS constants¶
Number of bits to use in float CRC’s
VV_LOG_BASE constants¶
Type of log to use
VV_LOGMODE constants¶
Ways to handle negatives
- VV_LOGMODE_SCALED¶
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_linearfunction if decades in results are required.- gxapi.VV_LOGMODE_SCALED = 1¶
VV_LOOKUP constants¶
Lookup style
- 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_MASK constants¶
Where to mask
VV_ORDER constants¶
Specify if the data is montonically increasing or decreasing.
VV_SORT constants¶
Sort order
VV_WINDOW constants¶
How to handle GXVV limits