This page was generated from jupyter-notebook/nb_regolith.ipynb. Interactive online version: Binder badge. Download notebook.

Spatial data

This notebook focus on representation of spatial EMI survey using EMagPy Python API.

First let’s start with an example where spatial EMI data were collected on a ~30 cm thick soil over a clay-rich regolith.

[1]:
# import modules
import os
import sys
sys.path.insert(0,'../src/')
testdir = '../src/examples/saprolite/'
from emagpy import Problem
[2]:
# import data
k = Problem()
k.createSurvey(testdir + 'mexpl.csv')
[3]:
k.show()
../_images/gallery_nb_regolith_3_0.png
[4]:
# the X and Y coordinates of the survey are already in British Grid (EPSG:27700)
k.showMap()
../_images/gallery_nb_regolith_4_0.png
[5]:
k.showMap(coil=k.coils[2], contour=True, pts=True) # contouring of third coil
../_images/gallery_nb_regolith_5_0.png

Now one can use the different interpolation method to get a map. Let’s compare them below.

[6]:
k = Problem()
k.createSurvey(testdir + 'regolith.csv')
k.convertFromNMEA()
k.gridData(method='nearest')
k.showMap()
/media/jkl/data/phd/emagpy/jupyter-notebook/../src/emagpy/Survey.py:123: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
  df['x'], df['y'] = pyproj.transform(wgs84, targetCRS,
../_images/gallery_nb_regolith_7_1.png
[7]:
k = Problem()
k.createSurvey(testdir + 'regolith.csv')
k.convertFromNMEA()
k.showMap()
/media/jkl/data/phd/emagpy/jupyter-notebook/../src/emagpy/Survey.py:123: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
  df['x'], df['y'] = pyproj.transform(wgs84, targetCRS,
../_images/gallery_nb_regolith_8_1.png
[8]:
k = Problem() # create an emagpy instance
k.createSurvey(testdir + 'regolith.csv')
k.convertFromNMEA()
k.gridData(method='cubic')
k.showMap()
/media/jkl/data/phd/emagpy/jupyter-notebook/../src/emagpy/Survey.py:123: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
  df['x'], df['y'] = pyproj.transform(wgs84, targetCRS,
../_images/gallery_nb_regolith_9_1.png
[9]:
k = Problem() # create an emagpy instance
k.createSurvey(testdir + 'regolith.csv')
k.convertFromNMEA()
k.gridData(method='idw')
k.showMap()
/media/jkl/data/phd/emagpy/jupyter-notebook/../src/emagpy/Survey.py:123: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
  df['x'], df['y'] = pyproj.transform(wgs84, targetCRS,
../_images/gallery_nb_regolith_10_1.png

Observations

Cubic interpolation seems to perform the best and IDW has this problem of small mountains around the points. This might be solved by changing the exponent of the inverpolation in the function of IDW. Note that we haven’t compare it to kriging yet.

[ ]: