# 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()

[4]:

# the X and Y coordinates of the survey are already in British Grid (EPSG:27700)
k.showMap()

[5]:

k.showMap(coil=k.coils[2], contour=True, pts=True) # contouring of third coil


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,

[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,

[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,

[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,


## 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.

[ ]: