Plot Res, Z and phase tensors#

Plot impedances/resistivity and phase tensors from AMT data after applying essential corrections.

# Author: L.Kouadio
# Licence: BSD-3-clause

plot_tensors() plots the impendances/resistivity and phase tensors. In the following example, we called a sample of EDI collected in Huayuan locality, Hunan province, China, stored as inner datasets then we apply the three basic corrections such as:

  • removing noises: Drop a possible existences of factories noises, power lines effects , …

  • static shift: Shift the TE and TM tensors at each station.

  • drop frequencies: Drop frequencies is usefull to control the safety of the EM data collected in an area with severe interferences.

We start by importing the required modules as:

import os
from watex.datasets import fetch_data
from watex.utils.plotutils import plot_strike
from watex.datasets.io import get_data # get edidata stored in cache
from watex.methods import EM, MT
from watex.utils.plotutils import plot_tensors
import matplotlib.pyplot as plt
plt.style.use ("seaborn")

Before we’ll make a collection of EDI data and call watex.utils.plot_strike() for plotting as:

fetch_data ( 'huayuan', samples = 20) # store 20 edis in cache
#
# edipath = r'D:\project-Tayuan\data\1\1one'
edi_fn_lst = [os.path.join(get_data(),f) for f in os.listdir(get_data())
         if f.endswith('.edi')]
# edi_fn_lst = [os.path.join(edipath,f) for f in os.listdir(edipath)
#         if f.endswith('.edi')]
  • Plot the raw tensors

We can plot the raw tensors without applying any corrections at the first station S00.

emo_r = EM().fit(edi_fn_lst)
plot_tensors(emo_r.ediObjs_, station =0)
Station 0
<watex.externals.z.Z object at 0x7f676c551480>

Then we can visualize the strike using the raw data as

plot_strike(edi_fn_lst )
Strike (Z), PT Azimuth
GDAL_DATA environment variable is not set  Please see https://trac.osgeo.org/gdal/wiki/FAQInstallationAndBuilding#HowtosetGDAL_DATAvariable
Ignore GDAL as it is not working. Will use pyproj
  • Plot corrected tensors

We applied three essential corrections to EDI objets via a chaining method supplied by the watex.methods.MT class. We first drop the bad frequencies with a severity set to 10% tolerance. Then removing the static shift effect. After TM and ME mode data are automatically (nfreq=auto) shifted by asserting all stations, the noises such as the power lines or interferences can be removed. Note that the all processing step can be applied differently, it does not need to follow a certain order.

mo = MT().fit(edi_fn_lst).drop_frequencies (
    tol =0.1).remove_static_shift (nfreq='auto' ).remove_noises (method ='base')

# we then visualized the new corrected tensors at the station 0
plot_tensors ( mo.ediObjs_, station =0 )
Station 0
/home/docs/checkouts/readthedocs.org/user_builds/watex/envs/0.3.1/lib/python3.10/site-packages/pyproj/crs/crs.py:141: FutureWarning:

'+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6


<watex.externals.z.Z object at 0x7f677087b880>

Total running time of the script: (0 minutes 16.338 seconds)

Gallery generated by Sphinx-Gallery