watex.view.TPlot.plot_corrections#
- TPlot.plot_corrections(fltr='ama', ss_fx=None, ss_fy=None, r=1000.0, nfreq=21, skipfreq=5, tol=0.12, rotate=0.0, distortion=None, distortion_err=None, mode='TE', scale='period', sites=None, seed=None, how='py', show_site=True, survey=None, style=None, errorbar=True, spad=0.5, n_sites=1, mcolors=None, markers=None, **kws)[source]#
Plot apparent resistivity/phase curves and corrections.
Changed in version 0.2.1: Can henceforth display multiple sites by providing the sites as a collection.
- Parameters:
fltr (str , default='ama') –
Type of filter to apply.
ssis used to remove the static shift using spatial median filter. Whereasdistis for distorsion removal. Note that distortion might be provided otherwise an error raises. Can also be [‘tma’|’ama’|’flma’] for EMAP filters.tmafor trimming moving-averageamafor adaptative moving-averageflmafor fixed-length moving-average
distortion_tensor (np.ndarray(2, 2, dtype=real)) – Real distortion tensor as a 2x2
error (np.ndarray(2, 2, dtype=real), Optional) – Propagation of errors/uncertainties included
ss_fx (float, Optional) – static shift factor to be applied to x components (ie z[:, 0, :]). This is assumed to be in resistivity scale. If None should be automatically computed using the spatial median filter.
ss_fy (float, optional) – static shift factor to be applied to y components (ie z[:, 1, :]). This is assumed to be in resistivity scale. If
None, should be computed using the spatial filter median.r (float, default=1000.) – radius to look for nearby stations, in meters.
nfreq (int, default=21) – number of frequencies calculate the median static shift. This is assuming the first frequency is the highest frequency. Cause usually highest frequencies are sampling a 1D earth.
skipfreq (int, default=5) – number of frequencies to skip from the highest frequency. Sometimes the highest frequencies are not reliable due to noise or low signal in the AMT deadband. This allows you to skip those frequencies.
tol (float, default=0.12) – Tolerance on the median static shift correction. If the data is noisy the correction factor can be biased away from 1. Therefore the shift_tol is used to stop that bias. If
1-tol < correction < 1+tolthen the correction factor is set to1rotate (float, default=0.) – Rotate Z array by angle alpha in degrees. All angles are referenced to geographic North, positive in clockwise direction. (Mathematically negative!). In non-rotated state, X refs to North and Y to East direction.
mode (str, default='TE',) – Electromagnetic mode. Can be [‘TM’ |’both’]. If
both, components xy and yx are expected in the data.scale (str, default='period') – Visualization on axis labell. can be
'frequency'.sites (int,str, optional) – index of name of the site to plot. site must be composed of a position number. For instance
'S13'. If not provided, a random station is selected instead.seed (int, optional) – Get the same site if site is not provided. seed fetches a random number of site. T
how (str, default='py') – The way the site is fetched for plot. For instance, in Python indexing (default), the site is numbered from 0. For instance ‘site05’ will fetch the data at index 4. If this positioning is not wished, set to ‘None’.
show_site (bool, default=True,) – Display the number of site.
survey (str, optional) – Method used for the survey. e.g., ‘AMT’ for Audio-Magnetotellurics.
style (str, default='default') – Matplotlib style.
errorbar (bool, default=True) – display the error bar.
spad (float, default=.5,) –
pad to display the station in the top of each section plot.
Added in version 0.2.1.
n_sites (int, default =1.) – Number of random sites to select for visualizing. It cannot work if the names of sites are given.
mcolors (str, list, optional) – The list of colors for resistivy and phase.
- markersstr, list, optional
The list of marker for resistivy and phase.
markers = None,
- kws: dict,
Addfitional keywords arguments passed to Matplotlib.Axes.Scatter plots.
Examples
>>> import numpy as np >>> import watex as wx >>> edi_data = wx.fetch_data ('edis', return_data =True, samples =27) >>> wx.methods.TPlot(show_grid=True).fit(edi_data).plot_corrections ( seed =52, ) >>> distortion = np.array([[1.1 , 0.6 ],[0.23, 1.9 ]]) >>> wx.methods.TPlot(show_grid=True).fit(edi_data).plot_corrections ( seed =52, mode ='tm', fltr ='dist', distortion =distortion )