watex.utils.plot_skew#

watex.utils.plot_skew(edis_list, /, method='Bahr', sensitivity='skew', mode='frequency', show_skewness=Ellipsis, view='1d', interpolate=True, threshold_line=None, tolog10=True, interp_method='cubic', fill_value='auto', get_sites_by=None, top_label='Stations', cb_label='Sensitivity (S)', spacing=80, fig=None, fig_size=(7, 5), dpi=300, font_size=5.0, cmap='jet_r', plot_style=None, rotate_xlabel=0.0, plot_contours=Ellipsis, style=None, savefig=None, ax=None, **plot_kws)[source]#

Visualize the phase sensitive skew in one or two dimensional.

Phase Sensitivity Skew (\(\eta\)) is a dimensionality tool that represents a measure of the skew of the phases of the impedance tensor. The parameter is thus unaffected by the distortion effect, unlike the Swift-skew and ellipticity dimensionality tools [1].

Values of \(\eta\) > 0.3 are considered to represent 3D data. Phase-sensitive skews less than 0.1 indicate 1D, 2D or distorted 2D (3-D /2-D) cases. Values of \(\eta\) between 0.1 and 0.3 indicates modified 3D/2D structures [2] according to Bahr’ methods. However, values :math:eta >=0.2` using the Swift methods, the smaller the value \(\eta\) ( close to \(0.\)), the closer the structure to 2D structure and vice versa.However, it is generally considered that an electrical structure of \(\eta < 0.4\) can be treated as a 2D medium. Here as the threshold_line for eta() using the Swift method should be set as 0.4.

Parameters:
  • edis_list (str, watex.edi.Edi) –

    Full path to edifiles.

    Changed in version 0.3.1: The parameter edi_obj is replaced by edis_list which indicate a collection of :term:`EDI`files.

  • method (str, default='Bahr':) – Kind of correction. Can be swift for the remove distorsion proposed by Swift in 1967 [3]. The value close to 0. assume the 1D and 2D structures, and 3D otherwise. Conversly to bahr for the remove distorsion proposed by Bahr in 1991 [2]. The latter threshold is set to 0.3. Above this value the structures is 3D.

  • sensitivity (str, default='skew') –

    phase sensistive visualization. Can be rotational invariant invariant. Note that setting to mu or invariant does not change any interpretation since the distortion of Z are all rotational invariant whatever we’re using the Bahr or swift method.

    Changed in version 0.3.1: The parameter view is deprecated and replaced with sensitivity.

  • mode (str, optional) – X-axis coordinates for visualisation. plot either 'frequency' or 'periods'. The default is 'frequency'

  • show_skewness (bool,default=False) –

    Display the average skewness value.

    New in version 0.3.1: show_skewness display the average value of the whole Z tensor at each frequency.

  • view (str, ['1D', '2D'], default ='1D') – Type of skewness visualisation.

  • interpolate (bool, default=True) – Interpolate the data if NaN is found.

  • tolog10 (bool, default=True) –

    Compute the the logarithm base 10 of the frequency array. If the

    frequency data is passed as log10 values, it should be turned to False.

  • interp_method (bool,default='cubic') – Data interpolation method. It could be [‘nearest’|’linear’|’cubic’].

  • fill_value (float, str, default='auto') – Fill the interpolated grid at the egdes or surrounding NaN with a filled value. The auto uses the forward and backward fill strategy.

  • get_sites_by (str, optional) – Fetch the sites and place names on the map. It should be ['dataid'``|’name’``]. The former uses the names collected in EDI data id whereas the latter generates new names from the sites id and the survey name. In that case, it expects the survey name to be specified. By default, it merely use the sites id.

  • threshold_line (float, optional) –

    Visualize th threshold line. Can be [‘bahr’, ‘swift’, ‘both’]:

    • Note that when method is set to swift, the value close to close to \(0.\) assume the 1D and 2D structures, and 3D otherwise.

    • when method is set to Bahr, \(\mu > 0.3`\) is 3D structures, between \([0.1 - 0.3]\) assumes modified 3D/2D structures whereas \(<0.1\) 1D, 2D or distorted 2D.

  • top_label (str, default='Stations') – Label used to name the xticks in upper.

  • cb_label (str, default='Sensitivity (S)') – The colorbar label.

  • spacing (float, default=80.) – The step in meters between two stations/sites. If given, it creates an array of positions.

  • fig_size (tuple, default= (6, 2)) – Matplotlib figure size.

  • dpi (int, default=300) – Image resolution in dot-per-inch

  • cmap (str, default='jet_r') – Matplotlib colormap

  • plot_style (str, optional) – The kind of plot. It could be [‘pcolormesh’|’imshow’]. The default is pcolormesh.

  • rotate_xlabel (float, Optional) – The degree angle to rotate the station/site label accordingly.

  • prefix (str) – string value to add as prefix of given id. Prefix can be the site name. Default is S.

  • how (str) – Mode to index the station. Default is ‘Python indexing’ i.e. the counting of stations would starts by 0. Any other mode will start the counting by 1.

  • to_log10 (bool, default=False) – Recompute the ar in logarithm base 10 values. Note when True, the y should be also in log10.

  • plot_contours (bool, default=True) – Plot the contours map. Is available only if the plot_style is set to pcolormesh.

  • savefig (str, optional) – Save figure name. The default resolution dot-per-inch is 300.

  • plot_kws (dict,) – Matplotlib Axes scatterplot additional keywords arguments.

  • ax (Matplotlib.pyplot.Axes, optional) – Axe to collect the figure. Could be used to support other axes.

Returns:

ax – Return axis

Return type:

Matplotlib.pyplot.Axis

See also

watex.methods.em.Processing.skew

Skew equation formulations.

watex.view.TPlot.plotSkew

Give a consistent plot where user can customize the plot using the plot parameter of watex.property.BasePlot class.

References

[1]

Bahr, K. (1988) Interpretation of the magnetotelluric impedance tensor: regional induction 395 and local telluric distortion. J. Geophys. Res., 62, 119–127.

[2] (1,2)

Bahr, K. (1991) Geological noise in magnetotelluric data: a classification of distortion types. 397 Phys. Earth Planet. Inter., 66, 24–38.

[3]

Bahr, K., 1991. Geological noise in magnetotelluric data: a classification of distortion types. Physics of the Earth and Planetary Interiors 66 (1–2), 24–38.

Example

>>> import watex as wx
>>> from watex.utils.plotutils import plot_skew
>>> edi_sk = wx.fetch_data ("edis", return_data =True , samples = 20 )
>>> # Get 1d visualization with Swift skewness method
>>> plot_skew (edi_sk, threshold_line= True, method ='Swift',
               fig_size =( 12, 4))
>>> # plot the 2D with Bahr method with period in y-axis
>>> plot_skew (edi_sk, view='2d', show_skewness=True, interpolate=True,
                 get_sites_by='name', mode='periods', fig_size =(6, 2))