libGP library

Submodules

libGP.libGP module

GP library for field work 2023-06-30 Georg Kaufmann

libGP.libGP.addERTCoordElevation(fileERT, elecPoints, path='./', control=False)[source]

Add profile length and elevation along ERT profile to Res2DInv file

Parameters:
  • fileERT (str) – file name of ERT profile in Res2DInv format

  • elecPoints (2D float array) – List of coordinates, elevations, and distances for profile electrodes [m] elecPoints[:,0] - easting [m] elecPoints[:,1] - northing [m] elecPoints[:,2] - elevation [m] elecPoints[:,3] - distance [m]

  • path (str) – Path to input file, default: ./

  • control (bool) – Control output, default: None

Return type:

-none-

Notes

Read the ERT file in Res2DInv format and replaces last section with elevation data

libGP.libGP.createERTCoordElevation(nameERT, nElectrodes, sElectrodes, GPSPoints, easting, northing, elevation, path='./', control=False, plot=False)[source]

Read GPS coordinates taken along ERT profile, create coordinates for every electrode position and interpolate elevation for electrode from topo data

Parameters:
  • nameERT (str) – name of ERT profile

  • nElectrodes (int) – number of electrodes along profile

  • sElectrodes (int) – electrode spacing [m]

  • GPSPoints (2D float array) – List of GPS points easting,northing) along profile

  • easting (1D float array) – List of easting coordinates [m] (from readTopography.py)

  • northing (1D float array) – List of northing coordinates [m] (from readTopography.py)

  • elevation (1D float array) – List of elevations [m] (from readTopography.py)

  • control (bool) – Control output, default: None

  • plot (bool) – plot simple map, default: None

Returns:

elecPoints – List of coordinates, elevations, and distances for profile electrodes [m] elecPoints[:,0] - easting [m] elecPoints[:,1] - northing [m] elecPoints[:,2] - elevation [m] elecPoints[:,3] - distance [m]

Return type:

2D float array

Notes

Sample parameter values for 25 electrodes, 3m spacing, and two GPS points:

nElectrodes = 25 sElectrodes = 3 GPSPoints = np.array([ [605503.44,5714171.93], [605450.70,5714227.35] ])

libGP.libGP.createGPRCoordElevation(nameGPR, lProfile, sProfile, GPSPoints, easting, northing, elevation, traceInc=0, path='./', control=False, plot=False)[source]

Read GPS coordinates taken along GPR profile, create coordinates for every nth trace icrement and interpolate elevation for traces from topo data

Parameters:
  • nameGPR (str) – name of GPR profile

  • lProfile (float) – length of GPR profile [m]

  • sProfile (float) – spacing distance for profile [m]

  • GPSPoints (2D float array) – List of GPS points easting,northing) along profile

  • easting (1D float array) – List of easting coordinates [m] (from readTopography.py)

  • northing (1D float array) – List of northing coordinates [m] (from readTopography.py)

  • elevation (1D float array) – List of elevations [m] (from readTopography.py)

  • traceInc (float) – trace increment (from GPS recording)

  • control (bool) – Control output, default: None

  • plot (bool) – plot simple map, default: None

Returns:

gprPoints – List of coordinates, elevations, and distances for profile electrodes [m] gprPoints[:,0] - easting [m] gprPoints[:,1] - northing [m] gprPoints[:,2] - elevation [m] gprPoints[:,3] - distance [m]

Return type:

2D float array

Notes

Sample parameter values for 100m long GPR profile, sample every 1m, trace increment 0.01, and two GPS points:

lProfile = 100. sProfile = 1. traceInc = 0.01 GPSPoints = np.array([ [605503.44,5714171.93], [605450.70,5714227.35] ])

libGP.libGP.createGravityCoordElevation(fileGrav, path='./', irepeat=1, control=False, plot=False)[source]

Read coordinates of gravity stations along with leveling data

Parameters:
  • fileGrav (str) – Full name of input file (gravity coord file)

  • path (str) – Path to input file, default: ./

  • irepeat (int) – Repeat cooordinate irepeat times, default: 1

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

Returns:

  • easting (1D numpy array) – List of easting coordinates [m]

  • northing (1D numpy array) – List of northing coordinates [m]

  • elevation (1D numpy array) – List of elevations [m]

Notes

sample input file. INFO lines not needed BASE line needed, holds reference elevation DATA line(s) needed, holds point coordinates, for target point (‘to’) and back- and forward view from leveling

INFO Base point with absolute coordinates BASE G01 none 51.155896000564098 10.03715998493135 300 INFO Points levelled DATA G01 Z01 51.155896000564098 10.03715998493135 13.2 4.5 DATA Z01 G02 51.155896000564098 10.03715998493135 30.6 24.4 ~~~~~~~~~~~~~~~

Raises:

ValueError – if path+fileGrav does not exist, aborts

libGP.libGP.readBouguerAnomaly(fileGrav, path='./', iskip=1, control=False, plot=False)[source]

Read Bouguer anomaly data from geodyn5 file

Parameters:
  • fileGrav (str) – Full name of input file (in geodyn5 format)

  • path (str) – Path to input file, default: ./

  • iskip (int) – Read in only iskip line, default: 10

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

Returns:

  • easting (1D numpy array) – List of easting coordinates [m]

  • northing (1D numpy array) – List of northing coordinates [m]

  • topo (1D numpy array) – List of elevations [m]

  • boug (1D numpy array) – List of elevations [m]

Notes

Raises:

ValueError – if path/fileGrav does not exist, aborts

libGP.libGP.readERTprofile(fileERT, path='./', control=False, plot=False)[source]

Read ERT data data from geodyn5 file

Parameters:
  • fileERT (str) – Full name of input file (in geodyn5 format)

  • path (str) – Path to input file, default: ./

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

Returns:

  • ert (2D numpy array) – List of easting, northing, elevation, offset [m], rho [Ohmm], profile [m]

  • points (2D numpy array) – List of profile, offset [m]

  • tri (object) – trianulation object

Notes

Raises:

ValueError – if path/fileERT does not exist, aborts

libGP.libGP.readGPRprofile(fileGPR, path='./', iskip=1, control=False, plot=False, reversed=False, scale=500000.0, xoffset=0.0)[source]

Read GPR data data from geodyn5 file

Parameters:
  • fileGPR (str) – Full name of input file (in geodyn5 format)

  • path (str) – Path to input file, default: ./

  • iskip (int) – Read in only iskip line, default: 1

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

  • reversed (bool) – reverse xprofile direction, default: no

  • scale (float) – scale reflection amplitude, default: 5e5

  • xoffset (float) – offset for profile, default: 0 m

Returns:

  • gpr (2D numpy array) – List of easting, northing, elevation, offset [m], amplitude [-], profile [m]

  • points (2D numpy array) – List of profile, offset [m]

  • tri (object) – trianulation object

  • total (1D numpy array) – List of total-field values [m]

Notes

Raises:

ValueError – if path/fileGPR does not exist, aborts

libGP.libGP.readTopography(fileTopo, path='./', iskip=10, control=False, plot=False)[source]

Read topography data from geodyn5 file

Parameters:
  • fileTopo (str) – Full name of input file (topography in geodyn5 format)

  • path (str) – Path to input file, default: ./

  • iskip (int) – Read in only iskip line, default: 10

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

Returns:

  • easting (1D numpy array) – List of easting coordinates [m]

  • northing (1D numpy array) – List of northing coordinates [m]

  • elevation (1D numpy array) – List of elevations [m]

Notes

Raises:

ValueError – if path/fileTopo does not exist, aborts

libGP.libGP.readTotalField(fileMAG, path='./', iskip=1, control=False, plot=False)[source]

Read Total-field anomaly data from geodyn5 file

Parameters:
  • fileMAG (str) – Full name of input file (in geodyn5 format)

  • path (str) – Path to input file, default: ./

  • iskip (int) – Read in only iskip line, default: 10

  • control (bool) – Control output, default: None

  • plot (bool) – plot map, default: None

Returns:

  • easting (1D numpy array) – List of easting coordinates [m]

  • northing (1D numpy array) – List of northing coordinates [m]

  • topo (1D numpy array) – List of elevations [m]

  • total (1D numpy array) – List of total-field values [m]

Notes

Raises:

ValueError – if path/fileMAG does not exist, aborts

Module contents