GXVVU class¶
-
class
geosoft.gxapi.
GXVVU
¶ These methods are not a class. Utility methods perform various operations on VV objects, including pruning, splining, clipping and filtering.
-
static
average_repeat
((GXVV)arg1, (GXVV)arg2) → None:¶ Average repeat values.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – reference VV - arg2 (
geosoft.gxapi.GXVV
) – data VV to average
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Repeated values in the reference VV will be averaged in the data VV. The first value in the data VV will be set to the average and subsequent data VV values will be dummied out. Data is processed only to the minimum length of the input VV lengths.
See also
- arg1 (
-
static
average_repeat2
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Average repeat values based on 2 reference channels.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – reference VV - arg2 (
geosoft.gxapi.GXVV
) – reference VV - arg3 (
geosoft.gxapi.GXVV
) – data VV to average
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Repeated values in the reference VV will be averaged in the data VV. The first value in the data VV will be set to the average and subsequent data VV values will be dummied out. Data is processed only to the minimum length of the input VV lengths. Both the reference VV values must repeat for the averageing to occur. This version is useful for averaging on repeated (X,Y) locations.
See also
RemoveDummy_VV
- arg1 (
-
static
average_repeat2_ex
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4) → None:¶ Average repeat values based on 2 reference channels.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – reference VV - arg2 (
geosoft.gxapi.GXVV
) – reference VV - arg3 (
geosoft.gxapi.GXVV
) – data VV to average - arg4 (int) – VVU_MODE constants
Returns: Nothing
Return type: None
New in version 8.0.1.
Note:
Repeated values in the reference VV will be set to the mean, median, minimum or maximum value in the data VV. The first value in the data VV will be reset and subsequent data VV values will be dummied out. Data is processed only to the minimum length of the input VV lengths. Both the reference VV values must repeat for the averageing to occur. This version is useful for averaging on repeated (X,Y) locations.
See also
RemoveDummy_VV
- arg1 (
-
static
average_repeat_ex
((GXVV)arg1, (GXVV)arg2, (int)arg3) → None:¶ Average repeat values.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – reference VV - arg2 (
geosoft.gxapi.GXVV
) – data VV to average - arg3 (int) – VVU_MODE constants
Returns: Nothing
Return type: None
New in version 8.0.1.
Note:
Repeated values in the reference VV will be set to the mean, median, minimum or maximum value in the data VV. For minimum and maximum, the index in the data VV containing the minimum or maximum value is retained, and the other repeated values are dummied out. For mean and median, the first value in the data VV will be reset and subsequent data VV values will be dummied out. Data is processed only to the minimum length of the input VV lengths.
See also
- arg1 (
-
static
binary_search
((GXVV)arg1, (float)arg2, (int_ref)arg3, (int_ref)arg4) → None:¶ Search numeric value in a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (float) – value to search for.
- arg3 (
geosoft.gxapi.int_ref
) – Minmum Location - arg4 (
geosoft.gxapi.int_ref
) – Maximum Location
Returns: Nothing
Return type: None
New in version 7.1.0.
Note:
The VV should be sorted.Search comparison is made on double comparison of the data.
- arg1 (
-
static
box_cox
((GXVV)arg1, (float)arg2) → None:¶ Run Box-Cox (lambda) Transformation on VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – [i/o] VV - arg2 (float) – [i] Lambda Value
Returns: Nothing
Return type: None
New in version 5.1.8.
- arg1 (
-
static
bp_filt
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4, (int)arg5) → None:¶ Band-pass filter to the specified.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (
geosoft.gxapi.GXVV
) – filtered VV - arg3 (float) – Short wavelength cutoff, 0 for highpass
- arg4 (float) – Long wavelength cutoff, 0 for lowpass
- arg5 (int) – Filter Length, 0 for default length
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the short and long wavelengths are <= 0, the input channel is simply copied to the output channel without filtering. The wavelengths are in fiducials.
- arg1 (
-
static
clip
((GXVV)arg1, (float)arg2, (float)arg3, (int)arg4) → None:¶ Clip a VV to a range.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to clip - arg2 (float) – minimum value, rDUMMY for no minimum clip
- arg3 (float) – maximum value, rDUMMY for no maximum clip
- arg4 (int) – VVU_CLIP constants
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
clip_to_detect_limit
((GXVV)arg1, (float)arg2, (int)arg3) → None:¶ Apply detection limit clipping of data.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input data vv (altered). - arg2 (float) – Detection limit
- arg3 (int) – Auto-convert negatives?
Returns: Nothing
Return type: None
New in version 5.1.6.
Note:
Flow: 1. If auto-converting negatives, then all negative values are replaced by -0.5*value, and detection limit is ignored. 2. If not auto-converting negatives, and the detection limit is not rDUMMY, then values less than the detection limit are converted to one-half the detection limit. This function is identical to
geosoft.gxapi.GXCHIMERA.clip_to_detect_limit()
.- arg1 (
-
static
close_xy
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4) → int:¶ Find the closest point to an input point (XY).
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X locations - arg2 (
geosoft.gxapi.GXVV
) – Y locations - arg3 (float) – input X
- arg4 (float) – input Y
Returns: Index of closest point, -1 if no valid locations, or data is masked.
Return type: int
New in version 5.1.8.
Note:
Input X and Y location VVs, and a location. Returns the index of the point in the VV closest to the input point.
- arg1 (
-
static
close_xym
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5) → int:¶ Find the closest point to an input point, with mask (XY).
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X locations - arg2 (
geosoft.gxapi.GXVV
) – Y locations - arg3 (
geosoft.gxapi.GXVV
) – Mask values - arg4 (float) – input X
- arg5 (float) – input Y
Returns: Index of closest point, -1 if no valid locations, or data is masked.
Return type: int
New in version 5.1.8.
Note:
Input X and Y location VVs, and a location. Returns the index of the point in the VV closest to the input point. This skips points where the mask value is dummy. If no valid points are in the VVs, or all the mask VV values are dummy, the returned index is -1.
- arg1 (
-
static
close_xyz
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6) → int:¶ Find the closest point to an input point (XYZ).
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X locations - arg2 (
geosoft.gxapi.GXVV
) – Y locations - arg3 (
geosoft.gxapi.GXVV
) – Z locations - arg4 (float) – input X
- arg5 (float) – input Y
- arg6 (float) – input Z
Returns: Index of closest point, -1 if no valid locations, or data is masked.
Return type: int
New in version 5.1.8.
Note:
Input X, Y and Z location VVs, and a location. Returns the index of the point in the VV closest to the input point.
- arg1 (
-
static
close_xyzm
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5, (float)arg6, (float)arg7) → int:¶ Find the closest point to an input point, with mask (XYZ).
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X locations - arg2 (
geosoft.gxapi.GXVV
) – Y locations - arg3 (
geosoft.gxapi.GXVV
) – Z locations - arg4 (
geosoft.gxapi.GXVV
) – Mask values - arg5 (float) – input X
- arg6 (float) – input Y
- arg7 (float) – input Z
Returns: Index of closest point, -1 if no valid locations, or data is masked.
Return type: int
New in version 5.1.8.
Note:
Input X, Y and Z location VVs, and a location. Returns the index of the point in the VV closest to the input point. This skips points where the mask value is dummy. If no valid points are in the VVs, or all the mask VV values are dummy, the returned index is -1.
- arg1 (
-
static
decimate
((GXVV)arg1, (int)arg2) → None:¶ Decimate a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (int) – decimation factor (must be > 0)
Returns: Nothing
Return type: None
New in version 6.1.0.
Note:
For a decimation factor N, will remove all values except those with indices equal to MN, where M is an integer.
- arg1 (
-
static
deviation
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (int)arg8) → None:¶ Calculate distance of point locations to a straight line
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV,REAL VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV,REAL VV - arg3 (
geosoft.gxapi.GXVV
) – Output deviation VV,REAL VV - arg4 (float) – X of 1st point to define straight line
- arg5 (float) – Y of 1st point to define straight line
- arg6 (float) – X of 2nd point or line azimuth in degrees (North is 0 degree)
- arg7 (float) – Y of 2nd point or GS_R8DM if line azimuth is defined
- arg8 (int) – VVU_LINE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
distance
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7) → None:¶ Create a cumulative distance VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV,REAL VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV,REAL VV - arg3 (
geosoft.gxapi.GXVV
) – Output distance VV,REAL VV - arg4 (float) – X VV fid start
- arg5 (float) – X VV fid incr
- arg6 (float) – Y VV fid start
- arg7 (float) – Y VV fid incr
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
distance_3d
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (GXVV)arg5) → None:¶ Create a cumulative distance VV from X, Y and Z VVs
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV,REAL VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV,REAL VV - arg3 (
geosoft.gxapi.GXVV
) – Z VV,REAL VV - arg4 (float) – Distance at first location
- arg5 (
geosoft.gxapi.GXVV
) – Output distance VV,REAL VV
Returns: Nothing
Return type: None
New in version 8.0.1.
Note:
The output VV is the length of the shortest X,Y or Z input VV. Any values with dummies are ignored - the distance at that point is equal to the distance at the previous valid point. The returned VV is the cumulative straight-line distance between the points. No re-sampling is performed. VVs of any type are supported.
- arg1 (
-
static
distance_non_cumulative
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7) → None:¶ Create a non cumulative distance VV i.e each distance element is the distance of the corresponding (X,Y) element and the previous element.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV,REAL VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV,REAL VV - arg3 (
geosoft.gxapi.GXVV
) – Output distance VV,REAL VV - arg4 (float) – X VV fid start
- arg5 (float) – X VV fid incr
- arg6 (float) – Y VV fid start
- arg7 (float) – Y VV fid incr
Returns: Nothing
Return type: None
New in version 7.2.0.
Note:
The fist distace element is rDUMMY.
- arg1 (
-
static
dummy_back_tracks
((GXVV)arg1) → int:¶ Dummy all points that keep a VV from being monotonically increasing.
Parameters: arg1 ( geosoft.gxapi.GXVV
) – VV handleReturns: The number of items dummied in order to render the VV montonically increasing. Return type: int New in version 7.0.0.
Note:
The VV length remains the same. Any point that is less than or equal to the previous (valid) point in the VV is dummied.
-
static
dummy_range
((GXVV)arg1, (float)arg2, (float)arg3, (int)arg4, (int)arg5) → None:¶ Dummy values inside or outside a range in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV handle - arg2 (float) – Minimum range value
- arg3 (float) – Maximum range value
- arg4 (int) – If TRUE, dummy inside the range
- arg5 (int) – If TRUE, include Min, Max in the range.
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the Inside flag is TRUE, values within the specified range are set to dummy. If the inside flag is FALSE, values outside the range are set to dummy. If the Inclusive flag is TRUE, then dMin and dMax are considered part of the range. If it is FALSE, then < or > are used, and dMin and dMax lie outside the range.
- arg1 (
-
static
dummy_range_ex
((GXVV)arg1, (float)arg2, (float)arg3, (int)arg4, (int)arg5, (int)arg6) → None:¶ Like DummyRangeVVU, with inclusion options for both ends.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV handle - arg2 (float) – Minimum range value
- arg3 (float) – Maximum range value
- arg4 (int) – If TRUE, dummy inside the range
- arg5 (int) – If TRUE, include Min in the range.
- arg6 (int) – If TRUE, include Max in the range.
Returns: Nothing
Return type: None
New in version 5.0.7.
Note:
If the Inside flag is TRUE, values within the specified range are set to dummy. If the inside flag is FALSE, values outside the range are set to dummy. If the Inclusive flag is TRUE, then dMin and dMax are considered part of the range. If it is FALSE, then < or > are used, and dMin and dMax lie outside the range.
- arg1 (
-
static
dummy_repeat
((GXVV)arg1, (int)arg2) → None:¶ dummy repeat values in a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (int) – VVU_DUMMYREPEAT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Either the first, middle or last point will be left. Use
geosoft.gxapi.GXVVU.interp()
to interpolate after if desired.- arg1 (
-
static
dup_stats
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4) → None:¶ Calculate means and differences for duplicate sample pairs
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Duplicate data VV - arg2 (
geosoft.gxapi.GXVV
) – Sample Type VV - arg3 (
geosoft.gxapi.GXVV
) – Mean values VV (returned) - arg4 (
geosoft.gxapi.GXVV
) – Diff values VV (returned)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Created for duplicate sample handling in CHIMERA. On input, a numeric VV containing data values, and a sample type VV. Sample pairs have types "1" and "2". This routine searches for types in order "1 2 1 2", and writes the mean values of pairs to the mean value VV, and the differences with the mean (equal values, negative and positive) to the difference VV. Results for samples out of order, for unmatched values, or when the sample type does not equal "1" or "2" are set to dummy.
- arg1 (
-
static
exp_dist
((GXVV)arg1, (int)arg2, (float)arg3, (int)arg4) → None:¶ Fill with exponentially distributed values.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (int) – Random number generator seed
- arg3 (float) – Mean value of distribution (> 0.0)
- arg4 (int) – Number of values (-1 for all)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
VV is set to input length (except for -1) See RAND for a short discription of the random number generator used.
- arg1 (
-
static
filter
((GXVV)arg1, (GXVV)arg2, (GXFLT)arg3) → None:¶ Apply a convolution filter to a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (
geosoft.gxapi.GXVV
) – filtered VV - arg3 (
geosoft.gxapi.GXFLT
) – Filter handle (see FLT)
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
find_dummy
((GXVV)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → int:¶ Find the first dummy|non-dummy value in VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV handle - arg2 (int) – 0 increasing order 1 decreasing order
- arg3 (int) – 0 to find the first dummy 1 find first non-dummy
- arg4 (int) – start search range at element
- arg5 (int) – end search range at element (-1 for last)
Returns: The index of the first dummy|non-dummy value in VV -1 if not found or if length of VV is 0
Return type: int
New in version 5.0.0.
Note:
Start and end of range are always defined lowest to largest even if decreasing search order. To search entire VV range, specify 0,-1.
- arg1 (
-
static
find_gaps_3d
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (GXVV)arg5) → None:¶ Return indices of locations separated from previous locations by more than the input gap distance.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV,REAL VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV,REAL VV - arg3 (
geosoft.gxapi.GXVV
) – Z VV,REAL VV - arg4 (float) – Gap size (must be greater than zero)
- arg5 (
geosoft.gxapi.GXVV
) – Returned indices of start of sections after gaps (INT VV)
Returns: Nothing
Return type: None
New in version 8.1.0.
Note:
Locate the starting points of line segements determined by an input gap distance. The returned indices indicate where to break the line, given an input gap. The number of returned indices is one less than the number of line segments. (So if there are no gaps the returned VV has zero length).
- arg1 (
-
static
find_string_items
((GXVV)arg1, (GXVV)arg2, (int)arg3, (int)arg4, (int)arg5, (GXVV)arg6) → None:¶ Searches a VV for items in a second VV, returns indices of those found.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – String VV in which to locate items - arg2 (
geosoft.gxapi.GXVV
) – String VV Items to search for - arg3 (int) – Is the first VV already sorted?
- arg4 (int) – Is the second VV already sorted
- arg5 (int) – Case tolerance for string comparisons
- arg6 (
geosoft.gxapi.GXVV
) – GS_LONG VV of returned indices into the first LST.
Returns: Nothing
Return type: None
New in version 7.3.0.
Note:
This is a much more efficient way of determining if items in one VV are found in a second, than by searching repeatedly in a loop. The returned GS_LONG VV contains the same number of items as the "search items" VV, and contains -1 for items where the value is not found, and the index of items that are found. Comparisons are case-tolerant. Non-string VVs are converted to string type VVs (element size 24) internally. The method requires that the VV items be sorted, and will do so internally. Since the input VVs may already be sorted, the method will run faster if this stage can be skipped.
- arg1 (
-
static
fractal_filter
((GXVV)arg1, (int)arg2, (int)arg3, (GXVV)arg4) → None:¶ Fractal filter a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – [i] VV - arg2 (int) – [i] filter order
- arg3 (int) – [i] filter number
- arg4 (
geosoft.gxapi.GXVV
) – [o] filtered VV
Returns: Nothing
Return type: None
New in version 6.0.0.
- arg1 (
-
static
interp
((GXVV)arg1, (int)arg2, (int)arg3) → None:¶ Replace all dummies by interpolating from valid data.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (int) – VVU_INTERP constants
- arg3 (int) – VVU_INTERP_EDGE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Edge behaviour: Dummies at the ends are treated as follows for various combinations of the inside and outside interpolation choices: if ((iOutside==VV_INTERP_EDGE_NEAREST) || (iOutside==VV_INTERP_EDGE_SAME && iInside==VV_INTERP_NEAREST)) // -- Set dummies to the same value as the last defined element else if ((iOutside==VV_INTERP_EDGE_LINEAR) || (iOutside==VV_INTERP_EDGE_SAME && iInside==VV_INTERP_LINEAR)) // --- Set dummies using the slope of the last two defined elements endif In all other cases and combinations of the two interpolation choices, the dummies are left "as is".
- arg1 (
-
static
mask
((GXVV)arg1, (GXVV)arg2) → None:¶ Mask dummies in one VV onto another.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to be masked - arg2 (
geosoft.gxapi.GXVV
) – mask reference VV
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
VV to mask will be resampled to reference VV if required. The returned length of the VV to mask will be the shorter of the reference VV or the mask VV.
- arg1 (
-
static
mask_and
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Create mask from logical AND of two VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV A - arg2 (
geosoft.gxapi.GXVV
) – VV B - arg3 (
geosoft.gxapi.GXVV
) – VV C (returned)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
If both values are non-dummies, then result is 1, else dummy.
- arg1 (
-
static
mask_or
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Create mask from logical OR of two VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV A - arg2 (
geosoft.gxapi.GXVV
) – VV B - arg3 (
geosoft.gxapi.GXVV
) – VV C (returned)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
If either values is non-dummy, then result is 1, else dummy.
- arg1 (
-
static
nl_filt
((GXVV)arg1, (GXVV)arg2, (int)arg3, (float)arg4) → None:¶ Applies a non-linear filter.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (
geosoft.gxapi.GXVV
) – filtered VV - arg3 (int) – Filter Width
- arg4 (float) – Filter Tolerance, 0 for 1% of Std. Dev.
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
noise_check
((GXVV)arg1, (GXVV)arg2, (float)arg3, (int)arg4) → None:¶ Check on deviation of data from variable background in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV on which to apply quality control Required in GS_DOUBLE or GS_FLOAT - arg2 (
geosoft.gxapi.GXVV
) – output flag VV with result 0 and 1. Required in GS_BYTE - arg3 (float) – allowed deviation over a number of data points in input VV (next parameter). Must be >= 0.0
- arg4 (int) – number of data points. Must be > 0
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This function checks vertical deviation of data in input VV against a moving straight line. The straight line at any time is defined by two extreme points of a data segment. Output VV will be 0 if data point in input VV falls within the deviation, otherwise, it will be 1. Output VV will be 0 if the straight line is vertical.
- arg1 (
-
static
noise_check2
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (int)arg5) → None:¶ Like
geosoft.gxapi.GXVVU.noise_check()
, but returns maximum deviation at all points.Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV on which to apply quality control Required in GS_DOUBLE or GS_FLOAT - arg2 (
geosoft.gxapi.GXVV
) – output flag VV with result 0 and 1. Required in GS_BYTE - arg3 (
geosoft.gxapi.GXVV
) – Output maximum deviation VV. - arg4 (float) – allowed deviation over a number of data points in input VV (next parameter). Must be >= 0.0
- arg5 (int) – number of data points in the line segment. Must be > 0
Returns: Nothing
Return type: None
New in version 6.3.0.
Note:
This function checks vertical deviation of data in an input VV against a moving straight line, where the X-axis value is taken to be the data index, and the Y-axis value is the input data VV value. The straight line is drawn between data points at the ends of the line segment, whose length is an input. The output flag VV is set to 0 if data point in input VV falls within the deviation for all the moving line segments of which it is a part, otherwise, it will be set to 1. The output maximum deviation VV contains the maximum deviation at each point for all the moving line segments that it is a part of.
- arg1 (
-
static
normal_dist
((GXVV)arg1, (int)arg2, (float)arg3, (float)arg4, (int)arg5) → None:¶ Fill with normally (Gaussian) distributed values.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (int) – Random number generator seed
- arg3 (float) – Mean value of distribution
- arg4 (float) – Variance of the distribution
- arg5 (int) – Number of values (-1 for all)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
VV is set to input length (except for -1) See RAND for a short discription of the random number generator used.
- arg1 (
-
static
offset_circles
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4, (GXVV)arg5, (GXVV)arg6) → None:¶ Get non-overlapping offset location for circular symbols.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X locations - arg2 (
geosoft.gxapi.GXVV
) – Input Y locations - arg3 (float) – minimum offset distance
- arg4 (float) – symbol radius
- arg5 (
geosoft.gxapi.GXVV
) – Output (offset) X locations - arg6 (
geosoft.gxapi.GXVV
) – Output (offset) Y locations
Returns: Nothing
Return type: None
New in version 5.0.7.
Note:
Often on maps plotted symbols and text overlap each other. This routine accepts of VV of locations and returns a new set of locations offset from the originals, and guaranteed not to overlap, given the size of the original symbols. The returned offset X, Y locations are offset from the original locations by the minimum of a) the input offset, b) the input symbol radius. This is to ensure that the original location is never covered by the offset symbol. Care should be taken when choosing the symbol size, because if the point density is too high, all the points will get pushed to the outside edge and your plot will look like a hedgehog (it also takes a lot longer!).
- arg1 (
-
static
offset_correct
((GXVV)arg1, (GXVV)arg2, (float)arg3, (int)arg4, (GXVV)arg5, (GXVV)arg6) → None:¶ Correct locations based on heading and fixed offset.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X - arg2 (
geosoft.gxapi.GXVV
) – Input Y - arg3 (float) – Offset distance
- arg4 (int) – VVU_OFFSET constants
- arg5 (
geosoft.gxapi.GXVV
) – Output X - arg6 (
geosoft.gxapi.GXVV
) – Output Y
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
In many applications, measurements are taken with an instrument which is towed behind, or pushed ahead of where the locations are recorded. Use this function to estimate the actual location of the instrument. The method determines the heading along the line, using a "thinned" version of the line. The degree of thinning is based on the size of the offset; the larger the offset, the greater the distance between sample locations used to construct the thinned lined used for determining headings. The thinned line is splined at a frequency greater than the sample frequency, and the heading at any given point is determined from the vector formed by the closest two points on the splined line. The correction (behind, in front, left or right) is determined with respect to the heading, and added to the original location. IF this method fails, no dummies, no duplicated locations, no reversals are produced. The algorithm: 1. Determine average distance between each point = D 2. Smoothing interval = MAX(2*D, Offset distance) = I 3. Thin input points to be at least the smoothing interval I apart from each other. 4. Smoothly re-interpolate the thinned points at five times the original average distance D. 5. For each input point, calculate the bearing using the nearest points on the smoothed curve
- arg1 (
-
static
offset_correct2
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4, (GXVV)arg5, (GXVV)arg6) → None:¶ Same as
geosoft.gxapi.GXVVU.offset_correct()
, but for an arbitrary offset angle.Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X - arg2 (
geosoft.gxapi.GXVV
) – Input Y - arg3 (float) – Offset distance
- arg4 (float) – Offset azimuth (degrees counter-clockwise from straight ahead)
- arg5 (
geosoft.gxapi.GXVV
) – Output X - arg6 (
geosoft.gxapi.GXVV
) – Output Y
Returns: Nothing
Return type: None
New in version 5.1.3.
- arg1 (
-
static
offset_correct3
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4, (float)arg5, (GXVV)arg6, (GXVV)arg7) → None:¶ Same as
geosoft.gxapi.GXVVU.offset_correct2()
, but specify smoothing interval.Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X - arg2 (
geosoft.gxapi.GXVV
) – Input Y - arg3 (float) – Offset distance
- arg4 (float) – Offset azimuth (degrees counter-clockwise from straight ahead)
- arg5 (float) – Averaging interval - rDUMMY for default
- arg6 (
geosoft.gxapi.GXVV
) – Output X - arg7 (
geosoft.gxapi.GXVV
) – Output Y
Returns: Nothing
Return type: None
New in version 5.1.4.
Note:
See the algorithm note #2 above for the default smoothing interval.
- arg1 (
-
static
offset_correct_xyz
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (GXVV)arg8, (GXVV)arg9, (GXVV)arg10) → None:¶ Correct locations based on heading and fixed offset.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X - arg2 (
geosoft.gxapi.GXVV
) – Input Y - arg3 (
geosoft.gxapi.GXVV
) – Input Z - arg4 (float) – Offset along-track (+ve forward)
- arg5 (float) – Offset across-track (+ve to the right)
- arg6 (float) – Vertical Offset (+ve up)
- arg7 (float) – Sampling interval - rDUMMY for default
- arg8 (
geosoft.gxapi.GXVV
) – Output X - arg9 (
geosoft.gxapi.GXVV
) – Output Y - arg10 (
geosoft.gxapi.GXVV
) – Output Z
Returns: Nothing
Return type: None
New in version 9.0.
Note:
In many applications, measurements are taken with an instrument which is towed behind, or pushed ahead of where the locations are recorded. Use this function to estimate the actual location of the instrument. The method determines the heading along the line, using a "thinned" version of the line. The default degree of thinning is based on the size of the offset; the larger the offset, the greater the distance between sample locations used to construct the thinned lined used for determining headings. The thinned line is splined at a frequency greater than the sample frequency, and the heading at any given point is determined from the vector formed by the closest two points on the splined line. The correction (behind, in front, left or right) is determined with respect to the heading, and added to the original location. IF this method fails, no dummies, no duplicated locations, no reversals are produced. The algorithm: 1. Determine average distance between each point = D 2. Default smoothing interval = MAX(2*D, Offset distance) = I 3. Thin input points to be at least the smoothing interval I apart from each other. 4. Smoothly re-interpolate the thinned points at five times the original average distance D. 5. For each input point, calculate the bearing using the nearest points on the smoothed curve
- arg1 (
-
static
offset_rectangles
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4, (float)arg5, (GXVV)arg6, (GXVV)arg7) → None:¶ Get non-overlapping offset location for rectangular symbols.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input X locations - arg2 (
geosoft.gxapi.GXVV
) – Input Y locations - arg3 (float) – minimum offset distance
- arg4 (float) – symbol X size (width)
- arg5 (float) – symbol Y size (height)
- arg6 (
geosoft.gxapi.GXVV
) – Output (offset) X locations - arg7 (
geosoft.gxapi.GXVV
) – Output (offset) Y locations
Returns: Nothing
Return type: None
New in version 5.0.7.
Note:
Often on maps plotted symbols and text overlap each other. This routine accepts of VV of locations and returns a new set of locations offset from the originals, and guaranteed not to overlap, given the size of the original symbols. The returned offset X, Y locations are offset from the original locations by the minimum of a) the input offset, b) the input symbol X or Y size. This is to ensure that the original location is never covered by the offset symbol. In addition, the offset symbol is never place directly below the original location, to make it easier to draw a connecting line. Care should be taken when choosing the symbol size, because if the point density is too high, all the points will get pushed to the outside edge and your plot will look like a hedgehog (it also takes a lot longer!).
- arg1 (
-
static
pick_peak
((GXVV)arg1, (GXVV)arg2, (float)arg3, (int)arg4) → None:¶ Find peaks in a VV - method one.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (
geosoft.gxapi.GXVV
) – returned peak VV, all dummies except peak points. - arg3 (float) – minimum value to accept (0.0 to find all)
- arg4 (int) – minimum width to accept (1 to find all)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Peaks are the maximum point within a sequence of positive values in the input VV. The width is the number of points in the positive sequence. A VV may have to be pre-filtered before finding the peak values: Use
geosoft.gxapi.GXVVU.bp_filt()
to smooth the data as required. Usegeosoft.gxapi.GXVVU.filter()
to apply a Laplace filter "-0.5,1.0,-0.5" to make curvature data.- arg1 (
-
static
pick_peak2
((GXVV)arg1, (GXVV)arg2, (float)arg3, (float)arg4) → None:¶ Find peaks in a VV - method two.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV - arg2 (
geosoft.gxapi.GXVV
) – returned peak VV, all dummies except peak points. - arg3 (float) – base level to accept (0.0 to find all)
- arg4 (float) – minimum amplitude to accept
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Peaks are the maximum point within a sequence of values in the input VV. Maximum points must be above the base level and have a local amplitude greater than the minimum amplitude specified. A VV may have to be pre-filtered before finding the peak values.
- arg1 (
-
static
pick_peak3
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (GXVV)arg6, (GXVV)arg7, (GXVV)arg8, (GXVV)arg9) → None:¶ Find peaks in a VV - method two, returning width and half-amplitude widths.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – [i] data VV - arg2 (
geosoft.gxapi.GXVV
) – [i] X VV used to calculate distance - arg3 (
geosoft.gxapi.GXVV
) – [i] Y VV used to calculate distance - arg4 (float) – [i] minimum value to accept (0.0 to find all)
- arg5 (float) – [i] amplitude
- arg6 (
geosoft.gxapi.GXVV
) – [o] Indices with peak locations - arg7 (
geosoft.gxapi.GXVV
) – [o] Amplitudes at the peaks - arg8 (
geosoft.gxapi.GXVV
) – [o] Anomaly widths - arg9 (
geosoft.gxapi.GXVV
) – [o] Anomaly half-amplitude widths
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
Uses Method 2 above, but also returns the anomaly width (defined as the distance between the surrounding troughs), and the width at the half-amplitude. The half-amplitude width is calculated in two parts, individually for each side based on the distance from the maximum to the location where the amplitude is mid-way between the maximum and trough. The returned VVs are packed; no dummies. Instead the indicies of the peak locations are returned.
- arg1 (
-
static
poly_fill
((GXVV)arg1, (int)arg2, (GXVV)arg3) → None:¶ Fill a VV with values from an n'th order polynomial, integral x.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV with output data. (Preset length) - arg2 (int) – order of the polynomial 0-9
- arg3 (
geosoft.gxapi.GXVV
) – VV with polynomial coefficients (input)
Returns: Nothing
Return type: None
New in version 5.0.6.
Note:
The output VV length must be set as desired before calling. The X scale is unitless (1 per element), i.e. 0,1,2,3,...
- arg1 (
-
static
poly_fill2
((GXVV)arg1, (GXVV)arg2, (int)arg3, (GXVV)arg4) → None:¶ Fill a VV with values from an n'th order polynomial, specified X
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV with x spacing (input) - arg2 (
geosoft.gxapi.GXVV
) – VV with output data. (Preset length) - arg3 (int) – order of the polynomial 0-9
- arg4 (
geosoft.gxapi.GXVV
) – VV with polynomial coefficients (order+1 values)
Returns: Nothing
Return type: None
New in version 5.0.6.
Note:
The output VV length must be set as desired before calling. The X scale is defined by a X VV (see Trend_VV for unitless X).
- arg1 (
-
static
polygon_mask
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXPLY)arg4, (int)arg5) → None:¶ Mask a VV using XY data and a polygon.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV - arg3 (
geosoft.gxapi.GXVV
) – VV to be masked - arg4 (
geosoft.gxapi.GXPLY
) – PLY object - arg5 (int) – VVU_MASK constants
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
The VVs have to be the same length
- arg1 (
-
static
prune
((GXVV)arg1, (GXVV)arg2, (int)arg3) → None:¶ Prune values from a VV based on reference VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to prune - arg2 (
geosoft.gxapi.GXVV
) – Reference VV - arg3 (int) – VVU_PRUNE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Pruning will shorten the VV by removing values that are either dummy or non-dummy in the reference VV
- arg1 (
-
static
qc
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (int)arg8) → None:¶ Qualit control on deviation of data from norm in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input VV on which to apply quality control Required in GS_DOUBLE or GS_FLOAT - arg2 (
geosoft.gxapi.GXVV
) – distance VV (NULL if criterion #2 does not apply). In GS_DOUBLE or GS_FLOAT - arg3 (
geosoft.gxapi.GXVV
) – output flag VV with result 0,1,2,3,-1,-2,-3. Required in GS_BYTE - arg4 (float) – nominal reading (required, must not be GS_R8DM)
- arg5 (float) – maximum tolerance/deviation applied to a single reading (criterion #1). GS_R8DM if criterion #1 does not apply. Otherwise, must be positive value including 0.0
- arg6 (float) – allowed tolerance/deviation over a given distance (next parameter) (criterion #2). GS_R8DM if criterion #2 does not apply. Otherwise, must be positive value including 0.0
- arg7 (float) – the specified distance. GS_R8DM if criterion #2 does not apply. Otherwise, must be positive value excluding 0.0
- arg8 (int) – QC_CRITERION constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This function tests data in input VV against two separate criteria. Each element of the output VV will have one of the following indicators: Indicator Meaning --------- -------- 0 Input data passed both tests 1 The input data and is greater than the nominal value plus maximum tolerance/deviation (Criterion #1) 2 The input data over a specified distance is greater than the nominal value plus allowed tolerance (Criterion #2) 3 The input data failed on above two tests -1 The input data and is less than the nominal value minus maximum tolerance (Criterion #1) -2 The input data over a specified distance is less than the nominal value minus allowed tolerance (Criterion #2) -3 The input data failed on above two tests
- arg1 (
-
static
qc_fill_gaps
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5) → int:¶ Calculate fill in line segments
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – input/output X VV on which to operate Required in GS_DOUBLE or GS_FLOAT - arg2 (
geosoft.gxapi.GXVV
) – input/output Y VV on which to operate In GS_DOUBLE or GS_FLOAT - arg3 (
geosoft.gxapi.GXVV
) – input Flag VV Required in GS_BYTE - arg4 (
geosoft.gxapi.GXVV
) – input Gap VV to use for locating the fill inline segments In GS_DOUBLE or GS_FLOAT - arg5 (float) – Min segment length (required)
Returns: 1 if error, 0 if successful
Return type: int
New in version 6.3.0.
Note:
The X & Y VVs are returned as the calculated fill in line segments.
- arg1 (
-
static
range_vector_mag
((GXVV)arg1, (GXVV)arg2, (float_ref)arg3, (float_ref)arg4) → None:¶ Find the range of hypotenuse values of two VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – First VV (X) - arg2 (
geosoft.gxapi.GXVV
) – First VV (Y) - arg3 (
geosoft.gxapi.float_ref
) – Min value (returned) - arg4 (
geosoft.gxapi.float_ref
) – Max value (returned)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
For each value in the VVs, finds sqrt(dV1*dV1 + dV2*dV2) and returns the min and max values.
- arg1 (
-
static
regress
((GXVV)arg1, (GXVV)arg2, (float_ref)arg3, (float_ref)arg4) → None:¶ Calculate linear regression through data
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X data - arg2 (
geosoft.gxapi.GXVV
) – Y data - arg3 (
geosoft.gxapi.float_ref
) – returns slope - arg4 (
geosoft.gxapi.float_ref
) – returns intercept
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
rel_var_dup
((GXVV)arg1, (GXVV)arg2, (float_ref)arg3, (int_ref)arg4) → None:¶ Estimate relative variance of duplicate sample pairs from a database.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Data VV - arg2 (
geosoft.gxapi.GXVV
) – Sample Type VV - arg3 (
geosoft.gxapi.float_ref
) – Returned relative variance - arg4 (
geosoft.gxapi.int_ref
) – Returned number of duplicates used.
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Created for duplicate sample handling in CHIMERA. On input, a numeric or text VV containing data values, and a sample type VV. Sample pairs have types "1" and "2". This routine searches for types in order "1 2 1 2", and calulates the unnormalized relative variance, defined as the sum of the squared differences between duplicates divided by the sum of the squared mean values of the duplicates. (To get the true rel.var., divide by N-1, where N is the number of duplicate pairs used.) Samples out of order, unmatched pairs, or when the sample type does not equal "1" or "2" are ignored.
- arg1 (
-
static
remove_dummy
((GXVV)arg1) → None:¶ Remove dummy values from a VV
Parameters: arg1 ( geosoft.gxapi.GXVV
) – VVReturns: Nothing Return type: None New in version 5.0.0.
-
static
remove_dummy2
((GXVV)arg1, (GXVV)arg2) → None:¶ Remove dummy values from 2 VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (
geosoft.gxapi.GXVV
) – VV object
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
Removes all indices where either VV has a dummy, or is not defined (due to length differences).
- arg1 (
-
static
remove_dummy3
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Remove dummy values from 3 VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (
geosoft.gxapi.GXVV
) – VV object - arg3 (
geosoft.gxapi.GXVV
) – VV object
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
Removes all indices where any VV has a dummy, or is not defined (due to length differences).
- arg1 (
-
static
remove_dummy4
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4) → None:¶ Remove dummy values from 4 VVs.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (
geosoft.gxapi.GXVV
) – VV object - arg3 (
geosoft.gxapi.GXVV
) – VV object - arg4 (
geosoft.gxapi.GXVV
) – VV object
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
Removes all indices where any VV has a dummy, or is not defined (due to length differences).
- arg1 (
-
static
remove_dup
((GXVV)arg1, (GXVV)arg2, (int)arg3) → None:¶ Remove/average duplicate sample pairs from a database.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Data VV - arg2 (
geosoft.gxapi.GXVV
) – Sample Type VV - arg3 (int) – VV_DUP constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Created for duplicate sample handling in CHIMERA. On input, a numeric or text VV containing data values, and a sample type VV. Sample pairs have types "1" and "2". This routine searches for types in order "1 2 1 2", and replaces the pair of values in the data VV according to the VV_DUP constants value. Results for samples out of order, for unmatched pairs, or when the sample type does not equal "1" or "2" remain unchanged.
- arg1 (
-
static
remove_xy_dup
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4) → None:¶ Remove/average duplicate samples with the same (X, Y).
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV - arg3 (
geosoft.gxapi.GXVV
) – (optional) Z VV - arg4 (int) – VV_XYDUP constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Searches for duplicated (X, Y) locations and removes the duplicates (can be more than just a pair). The "Z" values, if defined, are treated according to the value of VV_XYDUP. The returned VVs are shortened to the new length, without duplicates. The Z VV can be set to NULL on input, in which case it is ignored.
- arg1 (
-
static
remove_xy_dup_index
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3) → None:¶ Remove duplicate samples with the same (X, Y) and update index.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X VV - arg2 (
geosoft.gxapi.GXVV
) – Y VV - arg3 (
geosoft.gxapi.GXVV
) – Index VV
Returns: Nothing
Return type: None
New in version 7.2.0.
Note:
Searches for duplicated (X, Y) locations and removes the duplicates (can be more than just a pair). The Index VV is updated accordingly .i.e if (X,Y) location of Index[0] == Index[1] Index[1] is removed.
- arg1 (
-
static
rolling_stats
((GXVV)arg1, (GXVV)arg2, (int)arg3, (int)arg4, (int)arg5) → None:¶ Calculate a statistic in a rolling window.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – Input VV - arg2 (
geosoft.gxapi.GXVV
) – Output VV - arg3 (int) – ST_INFO constants
- arg4 (int) – Window size (>0, increased to nearest odd value)
- arg5 (int) – Shrink window at ends (1:Yes, 0:No)
Returns: Nothing
Return type: None
New in version 5.1.0.
Note:
If the input VVs are not REAL, copies are made to temporary REALs for processing. If the window size is even, it is increased by 1 so that the output value is put at the exact center index of the window. Statistics are calculated on the values in a window surrounding the individual data points. By shrinking the window at the ends, one-sided effects can be eliminated. For instance, if the data is linear to begin with, a rolling mean will not alter the original data. However, if the window size is kept constant, then values near the ends tend to be pulled up or down. With shrinking, the window is shrunk so that it always has the same width on both sides of the data point under analysis; at the end points the window width is 1, at the next point in it is 3, and so on, until the full width is reached. The median value is calculated by sorting the valid data in the window, then selecting the middle value. If the number of valid data points is even, then the average of the two central values is returned. The mode value is defined as the value which occurs most frequently in the data. This value may not even exist, or may not be unique. In this implementation, the following algorithm is used: The valid data in the window is sorted in ascending order. The number of occurrences of each data value is tracked, and if it occurs more times than any value, it becomes the modal value. If all values are different, this procedure returns the smallest value. If two or more values each have the same (maximum) number of occurrences, then the smallest of these values is returned.
- arg1 (
-
static
search_replace
((GXVV)arg1, (float)arg2, (float)arg3) → None:¶ Search and replace numeric values in a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (float) – value to replace
- arg3 (float) – replacement
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Search comparison is made on double comparison of the data.
See also
SearchReplaceText_VV
- arg1 (
-
static
search_replace_text
((GXVV)arg1, (int)arg2, (int)arg3, (str)arg4, (str)arg5, (int)arg6) → None:¶ Search and replace text values in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (int) – string format for numeric VV
- arg3 (int) – decimals for formating numeric VV
- arg4 (str) – formatted string to replace
- arg5 (str) – replacement
- arg6 (int) – VVU_SRCHREPL_CASE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Search comparison is made on string comparison of the data.
See also
SearchReplace_VV
- arg1 (
-
static
search_replace_text_ex
((GXVV)arg1, (int)arg2, (int)arg3, (str)arg4, (str)arg5, (int)arg6, (int_ref)arg7) → None:¶ Search and replace text values in a VV, count items changed.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (int) – string format for numeric VV
- arg3 (int) – decimals for formating numeric VV
- arg4 (str) – formatted string to replace
- arg5 (str) – replacement
- arg6 (int) – VVU_SRCHREPL_CASE constants
- arg7 (
geosoft.gxapi.int_ref
) – number of items replaced (returned)
Returns: Nothing
Return type: None
New in version 6.0.1.
Note:
Search comparison is made on a string comparison of the data.
See also
SearchReplaceText_VV
- arg1 (
-
static
search_text
((GXVV)arg1, (str)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → int:¶ Search for a text value in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to search - arg2 (str) – Text to match
- arg3 (int) – VVU_CASE constants
- arg4 (int) – VVU_MATCH constants
- arg5 (int) – index to begin search (-1 for full VV)
- arg6 (int) – 1: forward search, -1: backward search
Returns: Index of first matching text, -1 if not found.
Return type: int
New in version 5.0.8.
Note:
Search comparison is made on string comparison of the data. Returns index of first item matching the input string. If start index is -1 or dummy, then full VV is searched. Use VVU_MATCH_INPUT_LENGTH to match the first part of a string. This is also recommended for matching numerical values, since the displayed value in the database may not be the same as the stored value.
See also
sSearchReplace_VV
- arg1 (
-
static
spline
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4, (float)arg5, (float)arg6, (float)arg7, (int)arg8, (int)arg9) → None:¶ Spline a Y VV onto an X VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X (no dummies) - arg2 (
geosoft.gxapi.GXVV
) – Y to be splined (no dummies) - arg3 (
geosoft.gxapi.GXVV
) – Y output - arg4 (int) – output Length
- arg5 (float) – Starting Location
- arg6 (float) – Separation Distance
- arg7 (float) – Maximum gap to interpolate across
- arg8 (int) – Number of elements to extend
- arg9 (int) – VVU_SPL constants
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
spline2
((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (int)arg5) → None:¶ Spline a Y VV onto an X VV. Uses specified values of X in X2
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – X (no dummies) - arg2 (
geosoft.gxapi.GXVV
) – Y to be splined (no dummies) - arg3 (
geosoft.gxapi.GXVV
) – X2 (no dummies) - arg4 (
geosoft.gxapi.GXVV
) – Y output - arg5 (int) – VVU_SPL constants
Returns: Nothing
Return type: None
New in version 5.1.3.
- arg1 (
-
static
tokenize_to_values
((GXVV)arg1, (str)arg2) → int:¶ Tokenize a string based on any characters.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to place values in - arg2 (str) – str - String to parse
Returns: number of tokens (length of VV)
Return type: int
New in version 9.0.0.
Note:
Parses a series of space, tab or comma-delimited values to a VV.
- arg1 (
-
static
translate
((GXVV)arg1, (float)arg2, (float)arg3) → None:¶ Translate values in a VV
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV - arg2 (float) – base
- arg3 (float) – scale
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
(new VV) = ((old VV) + base) * scale
- arg1 (
-
static
trend
((GXVV)arg1, (int)arg2, (GXVV)arg3) → None:¶ Calculate an n'th order best-fit polynomial, integral x.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV with input data - arg2 (int) – order of the polynomial 0-9
- arg3 (
geosoft.gxapi.GXVV
) – VV to hold polynomial coefficients (returned).
Returns: Nothing
Return type: None
New in version 5.0.6.
Note:
Returns coefficients c[0] .. c[n] Y(x) = c[0] + c[1]x + c[2](x**2) + ... + c[n](x**n) The X scale is unitless (1 per element), i.e. 0,1,2,3,... The polynomial VV length is set to the number of coefficients (order + 1)
- arg1 (
-
static
trend2
((GXVV)arg1, (GXVV)arg2, (int)arg3, (GXVV)arg4) → None:¶ Calculate an n'th order best-fit polynomial, specified X
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV with x spacing (input) - arg2 (
geosoft.gxapi.GXVV
) – VV with input data - arg3 (int) – order of the polynomial 0-9
- arg4 (
geosoft.gxapi.GXVV
) – VV to hold polynomial coefficients (returned)
Returns: Nothing
Return type: None
New in version 5.0.6.
Note:
Returns coefficients c[0] .. c[n] Y(x) = c[0] + c[1]x + c[2](x**2) + ... + c[n](x**n) The X scale is defined by a X VV (see Trend_VV for unitless X). The polynomial VV length is set to the number of coefficients (order + 1)
- arg1 (
-
static
uniform_dist
((GXVV)arg1, (int)arg2, (float)arg3, (float)arg4, (int)arg5) → None:¶ Fill with uniformly distributed values.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV object - arg2 (int) – Random number generator seed
- arg3 (float) – Minimum of range
- arg4 (float) – Maximum of range
- arg5 (int) – Number of values (-1 for all)
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
VV is set to input length (except for -1) See rand.gxh for a short discription of the random number generator used.
- arg1 (
-
static
QC_CRITERION constants¶
Criterion
-
gxapi.
QC_CRITERION_1
= 0¶
-
gxapi.
QC_CRITERION_2
= 1¶
-
gxapi.
QC_CRITERION_12
= 2¶
TEM_ARRAY constants¶
Array Type
-
gxapi.
TEM_ARRAY_VERTICALSOUNDING
= 0¶
-
gxapi.
TEM_ARRAY_PROFILING
= 1¶
-
gxapi.
TEM_ARRAY_BOREHOLE
= 2¶
VV_DUP constants¶
Duplicate handling mode
-
gxapi.
VV_DUP_AVERAGE
= 0¶
average numeric values (for strings, same as VV_DUP_1)
-
gxapi.
VV_DUP_1
= 1¶
Use first value of the pair
-
gxapi.
VV_DUP_2
= 2¶
Use second value of the pair
-
gxapi.
VV_DUP_DUMMY
= 3¶
Set to dummy
-
gxapi.
VV_DUP_SAMPLE
= 4¶
Set to "3" (cannot use with string data VV)
VVU_CLIP constants¶
Type of clipping
-
gxapi.
VVU_CLIP_DUMMY
= 0¶
clip replaces clipped values with a dummy.
-
gxapi.
VVU_CLIP_LIMIT
= 1¶
clip replaces clipped values with the limit.
VVU_DUMMYREPEAT constants¶
How to deal with repeats
-
gxapi.
VVU_DUMMYREPEAT_FIRST
= 0¶
dummies all but first point.
-
gxapi.
VVU_DUMMYREPEAT_LAST
= 1¶
dummies all but last point.
-
gxapi.
VVU_DUMMYREPEAT_MIDDLE
= 2¶
dummies all but middle point.
VVU_INTERP constants¶
Interpolation method to use
-
gxapi.
VVU_INTERP_NEAREST
= 1¶
-
gxapi.
VVU_INTERP_LINEAR
= 2¶
-
gxapi.
VVU_INTERP_CUBIC
= 3¶
-
gxapi.
VVU_INTERP_AKIMA
= 4¶
-
gxapi.
VVU_INTERP_PREDICT
= 5¶
VVU_INTERP_EDGE constants¶
Interpolation method to use on edges
-
gxapi.
VVU_INTERP_EDGE_NONE
= 0¶
-
gxapi.
VVU_INTERP_EDGE_SAME
= 1¶
-
gxapi.
VVU_INTERP_EDGE_NEAREST
= 2¶
-
gxapi.
VVU_INTERP_EDGE_LINEAR
= 3¶
VVU_MASK constants¶
Type of clipping
-
gxapi.
VVU_MASK_INSIDE
= 0¶
Mask VV is set to dummy at locations inside the PLY.
-
gxapi.
VVU_MASK_OUTSIDE
= 1¶
Mask VV is set to dummy at locations outside the PLY.
VVU_MATCH constants¶
Matching style
-
gxapi.
VVU_MATCH_FULL_STRINGS
= 0¶
entire string
-
gxapi.
VVU_MATCH_INPUT_LENGTH
= 1¶
match the first part of a string.
VVU_MODE constants¶
Statistic to select
-
gxapi.
VVU_MODE_MEAN
= 0¶
-
gxapi.
VVU_MODE_MEDIAN
= 1¶
-
gxapi.
VVU_MODE_MAXIMUM
= 2¶
-
gxapi.
VVU_MODE_MINIMUM
= 3¶
VVU_OFFSET constants¶
Heading
-
gxapi.
VVU_OFFSET_FORWARD
= 0¶
-
gxapi.
VVU_OFFSET_BACKWARD
= 1¶
-
gxapi.
VVU_OFFSET_RIGHT
= 2¶
-
gxapi.
VVU_OFFSET_LEFT
= 3¶