.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "glr_examples/utils/plot_strike.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_glr_examples_utils_plot_strike.py: =================================== Plot strike =================================== plot the strike estimated from the invariants and phase tensor in either a rose diagram of xy plot. .. GENERATED FROM PYTHON SOURCE LINES 9-12 .. code-block:: Python # Author: L.Kouadio # Licence: BSD-3-clause .. GENERATED FROM PYTHON SOURCE LINES 13-23 :func:`~watex.utils.plot_strike` plots strike angle as determined by phase tensor azimuth (Weaver et al.2003 [1]_ ; Caldwell et al. 2004 [2]_) and invariants of the impedance tensor. In the following example, we called a sample of :term:`EDI` collected in Huayuan locality, Hunan province, China, stored as inner datasets. Moreover, :func:`~watex.utils.plot_strike` uses either :term:`MTpy` or :term:`pyCSAMT` as dependency. Use ``pip`` for installation if is not installed yet: .. code-block:: bash pip install mtpy # or pip install pycsamt .. GENERATED FROM PYTHON SOURCE LINES 25-26 We start by importing the required modules as: .. GENERATED FROM PYTHON SOURCE LINES 26-31 .. code-block:: Python 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 .. GENERATED FROM PYTHON SOURCE LINES 32-34 Before we'll make a collection of :term:`EDI` data and call :func:`watex.utils.plot_strike` for plotting as: .. GENERATED FROM PYTHON SOURCE LINES 34-40 .. code-block:: Python fetch_data ( 'huayuan', samples = 25 ) # store 25 edis in cache edi_fn_lst = [os.path.join(get_data(),f) for f in os.listdir(get_data()) if f.endswith('.edi')] plot_strike(edi_fn_lst ) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_strike_001.png :alt: Strike (Z), PT Azimuth :srcset: /glr_examples/utils/images/sphx_glr_plot_strike_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 41-44 by default, :func:`~watex.utils.plot_strike` plots all period ranges into one polar diagram for each strike angle estimation with ``kind=2``. To plot individual decades into one plot, set the ``kind`` parameter to ``1`` as: .. GENERATED FROM PYTHON SOURCE LINES 44-46 .. code-block:: Python plot_strike(edi_fn_lst , kind = 1 ) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_strike_002.png :alt: 10$^{-5}$ - 10$^{-4}$ s, 10$^{-4}$ - 10$^{-3}$ s, 10$^{-3}$ - 10$^{-2}$ s, 10$^{-2}$ - 10$^{-1}$ s :srcset: /glr_examples/utils/images/sphx_glr_plot_strike_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 47-55 .. topic:: References .. [1] Weaver J.T, Lilley F.E.M.(2003) Invariants of rotation of axes and indicators of dimensionality in magnetotellurics, Australian National University, University of Victoria; http://bib.gfz-potsdam.de/emtf/2007/pdf/lilley.pdf .. [2] T. Grant Caldwell, Hugh M. Bibby, Colin Brown, The magnetotelluric phase tensor, Geophysical Journal International, Volume 158, Issue 2, August 2004, Pages 457–469, https://doi.org/10.1111/j.1365-246X.2004.02281.x .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.766 seconds) .. _sphx_glr_download_glr_examples_utils_plot_strike.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/watex/watex/0.3.X?urlpath=lab/tree/notebooks/glr_examples/utils/plot_strike.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_strike.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_strike.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_