watex.utils.exmath.get_anomaly_ratio#

watex.utils.exmath.get_anomaly_ratio(erp, czposix=None, cz=None, cz_sfi=None, raise_exception=True, p=None, e_spacing=None, **sfi_kws)[source]#

Computes the selected anomaly ratio (ANR) from the whole ERP line.

The standardized resistivity values`rhoa` of is averaged from \(S_{begin}\) to \(S_{end}\). The ANR is a positive value and the equation is given as:

\[ANR= sfi * \frac{1}{N} * | \sum_{i=1}^{N} \frac{\rho_{a_i} - \bar \rho_a}{\sigma_{\rho_a}} |\]

where \(\sigma_{rho_a}\) and \(\bar \rho_a\) are the standard deviation and the mean of the resistivity values composing the selected anomaly.

Parameters:
  • erp (array_like 1d) – The ERP survey line. The line is an array of resistivity values. Note that if a dataframe is passed, be sure that the frame matches the DC resistivity data (ERP), otherwise an error occurs. At least, the frame columns includes the resistivity and stations.

  • cz_sfi (float,) – The pseudo-fracturing index value. It can be computed from sfi(). It is given , p and e_spacing are not needed.

  • czposix (list of int,) – The selected anomaly station location boundaries indexes. The indexes might correspond to the first and last stations indexes that represents the selected conductive zone. For instance, czposix=[2, 13] means the third ( second+ 1) stations to the 14 (13+1) th stations. Note that the index counts is Python indexes so it starts by 0.

  • p (arraylike,) – is the station positions of the whole ERP line. It must be consistent with the ERP line.

  • e_spacing (float, int,) – The electrode spacing. It is needed in complience with p especially when the czposix is not supplied.

  • raise_exception (bool, default= True,) – Raise exception when the czposix is not given. However another alternative way when the p is not given too, is to use the cz resistivity values from detecting the czposix, however this has a risk of biais the position then raises an exception for user to be aware. Note that user can force this approach to take effect by setting raise_exception to False.

cz: array_like 1d

the selected conductive zone. If None, only the erp should be displayed. Note that cz is an subset of erp array.

Examples

>>> from watex.datasets import make_erp
>>> from watex.utils.exmath import get_anomaly_ratio
>>>  # for data reproducibility seed to 123
>>> d = make_erp (n_stations =70, min_rho =10 , max_rho =1e4 , seed =123 )
>>> selected_cz,* _= defineConductiveZone (d.resistivity , auto=True)
>>> ANR = get_anomaly_ratio (d.resistivity, cz= selected_cz , e_spacing =10)
>>> print(ANR)
... 0.06 #6%