watex.utils.sfi#
- watex.utils.sfi(cz, p=None, s=None, dipolelength=None, view=False, raw=False, return_components=False, **plotkws)[source]#
Compute the pseudo-fracturing index known as sfi.
The sfi parameter does not indicate the rock fracturing degree in the underground but it is used to speculate about the apparent resistivity dispersion ratio around the cumulated sum of the resistivity values of the selected anomaly. It uses a similar approach of IF parameter proposed by `Dieng et al`_ (2004). Furthermore, its threshold is set to \(sqrt{2}\) for symmetrical anomaly characterized by a perfect distribution of resistivity in a homogenous medium. The formula is given by:
\[sfi=\sqrt{(P_a^{*}/P_a )^2+(M_a^{*}/M_a )^2}\]where \(P_a\) and \(M_a\) are the anomaly power and the magnitude respectively. \(P_a^{*}\) is and \(M_a^{*}\) are the projected power and magnitude of the lower point of the selected anomaly.
- Parameters
cz (array-like,) – Selected conductive zone
p (array-like,) – Station positions of the conductive zone.
dipolelength (float. If p is not given, it will be set) – automatically using the default value to match the
czsize. The default value is10..view (bool, default=False,) – Visualize the fitting curve. Default is
False.raw (bool,default=False,) – Overlaining the fitting curve with the raw curve from cz.
return_components (bool, default=False,) – If
True, it returns the different components used for compute sfi especially for external visualization.plotkws (dict) – `Matplotlib plot`_ keyword arguments.
- Returns
sfi – value computed for pseudo-fracturing index
- Return type
float
Examples
>>> import numpy as np >>> from watex.property import P >>> from watex.utils.exmath import sfi >>> rang = np.random.RandomState (42) >>> condzone = np.abs(rang.randn (7)) >>> # no visualization and default value `s` with global minimal rho >>> pfi = sfi (condzone) ... 3.35110143 >>> # visualize fitting curve >>> plotkws = dict (rlabel = 'Conductive zone (cz)', label = 'fitting model', color=f'{P().frcolortags.get("fr3")}', ) >>> sfi (condzone, view= True , s= 5, figsize =(7, 7), **plotkws ) Out[598]: (array([ 0., 10., 20., 30.]), 1)
References
See Numpy Polyfit
- See Stackoverflow
the answer of AkaRem edited by Tobu and Migilson.
- See Numpy Errorstate and
how to implement the context manager.