geosoft.gxpy.vv submodule

Geosoft vector.

GXvv data vector

VA and VV classes are related based on a key called a fiducial, which has a start value and increment between values. The refid() method can be used to resample vector data to the same fiducial so that vector-to-vector operations can be performed.


Regression tests provide usage examples: vv tests

class GXvv(array=None, dtype=None, fid=(0.0, 1.0), unit_of_measure='')

Bases: object

VV class wrapper.

  • array – array-like, None to create an empty VV
  • dtype – numpy data type. For unicode strings ‘U#’, where # is a string length. If not specified the type is taken from first element in array, of if no array the default is ‘float’.
  • fid – (start, increment) fiducial
  • unit_of_measure – unit of measure for the contained data.

vv geosoft.gxapi.GXvv instance fid (start, increment) fiducial length number of elements in the VV gxtype GX data type dtype numpy data type

New in version 9.1.

Changed in version 9.2: support construction directly from arrays

Changed in version 9.3: added unit_of_measure


numpy data type

New in version 9.1.


fid tuple (start,increment), can be set

New in version 9.1.

get_data(dtype=None, start=0, n=None)

Return vv data in a numpy array

  • start – index of first value, must be >=0
  • n – number of values wanted
  • dtype – numpy data type wanted

(data, (fid_start, fid_incr))

New in version 9.1.


GX data type

New in version 9.1.


geosoft.gxapi.GXVV instance


True if a base integer type


number of elements in the VV, can be set

New in version 9.1.

Changed in version 9.3: can be set


Return the content of the VV as a list.

New in version 9.2.


Numpy array of VV data, in the data type of the VV. Use get_data() to get a numpy array in another dtype.

Note that changing the data in the numpy array does NOT change the data in the VV. Use set_data to change data in the VV.

New in version 9.2.

refid(fid, length)

Resample VV to a new fiducial and length

  • fid – (start,incr)
  • length – length

New in version 9.1.

set_data(data, fid=None)

Set vv data from an array. If the array is float type numpy.nan are

  • data – data array, must be dimension 1
  • fid – fid tuple (start,increment), default does not change

New in version 9.1.

Changed in version 9.3: default fid leaves fid unchanged


data unit of measurement

exception VVException

Bases: Exception

Exceptions from geosoft.gxpy.vv.

New in version 9.1.