General Tools

UBC Geology Mapper

class PVGeo.ubc.general.GeologyMapper(filename=None, delimiter=',', **kwargs)[source]

Bases: FilterPreserveTypeBase

A filter to load a GIF geology definition file and map its values to a given data array in an input data object.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

SetFileName(filename)[source]

Set the file name to read

SetInputArrayToProcess(idx, port, connection, field, name)[source]

Used to set the input array(s)

Parameters:
  • idx (int) – the index of the array to process

  • port (int) – input port (use 0 if unsure)

  • connection (int) – the connection on the port (use 0 if unsure)

  • field (int) – the array field (0 for points, 1 for cells, 2 for field, and 6 for row)

  • name (int) – the name of the array

static _map_values(geol, arr)[source]

Map the values defined by geol dataframe to the values in arr. The first column (name should be Index) will be used for the mapping.

static _read_definitions(filename, delimiter)[source]

Reades the geology definition file as a pandas DataFrame

description = 'PVGeo: UBC Geology Mapper'
set_delimiter(deli)[source]

Set the delimiter of the ASCII file

set_file_name(filename)[source]

Set the file name to read

GIF Gravity Gradiometry Observations

class PVGeo.ubc.general.GravGradReader(**kwargs)[source]

Bases: DelimitedPointsReaderBase

Read GIF Gravity Gradiometry Observations file.

_extract_header(content)[source]

Internal helper to parse header details for UBC Gravity Gradiometry files

description = 'PVGeo: GIF Gravity Gradiometry Observations'
extensions = 'grv gg txt dat'

UBC Gravity Observations

class PVGeo.ubc.general.GravObsReader(**kwargs)[source]

Bases: DelimitedPointsReaderBase

Read GIF Gravity Observations file.

_extract_header(content)[source]

Internal helper to parse header details for UBC Gravity Observation files

description = 'PVGeo: GIF Gravity Observations'
extensions = 'grv txt dat'

UBC Magnetic Observations

class PVGeo.ubc.general.MagObsReader(**kwargs)[source]

Bases: DelimitedPointsReaderBase

Read GIF Magnetic Observations file.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to get data for current timestep and populate the output data object.

_extract_header(content)[source]

Internal helper to parse header details for UBC Magnetic Observations files

static convert_vector(incl, decl, mag=1)[source]

Converts inclination, declinations, and magnitude to an XYZ vector

description = 'PVGeo: GIF Magnetic Observations'
extensions = 'mag loc txt dat pre'

GIF Topo Reader

class PVGeo.ubc.general.TopoReader(copy_z=True, **kwargs)[source]

Bases: DelimitedPointsReaderBase

A reader to handle .topo files in UBC format to create a topography surface.

_extract_header(content)[source]

Internal helper to parse header details for UBC Topo files

description = 'PVGeo: UBC 3D Topo Files'
extensions = 'topo txt dat'