watex.utils.vesDataOperator#
- watex.utils.vesDataOperator(AB=None, rhoa=None, data=None, typeofop=None, outdf=False)[source]#
Check the data in the given deep measurement and set the suitable operations for duplicated spacing distance of current electrodes AB.
Sometimes at the potential electrodes (MN), the measurement of AB are collected twice after modifying the distance of MN a bit. At this point, two or many resistivity values are targetted to the same distance AB (AB still remains unchangeable while while MN is changed). So the operation consists whether to average (
mean) the resistiviy values or to take themedianvalues or toleaveOneOut(i.e. keep one value of resistivity among the different values collected at the same point`AB`) at the same spacing AB. Note that for the LeaveOneOut`, the selected resistivity value is randomly chosen.- Parameters:
AB (array-like 1d,) – Spacing of the current electrodes when exploring in deeper. Is the depth measurement (AB/2) using the current electrodes AB. Units are in meters.
rhoa (array-like 1d) – Apparent resistivity values collected by imaging in depth. Units are in \(\Omega {.m}\) not \(log10(\Omega {.m})\)
data (DataFrame,) – It is composed of spacing values AB and the apparent resistivity values rhoa. If data is given, params AB and rhoa should be kept to
None.typeofop (str,['mean'|'median'|'leaveoneout'], default='mean') – Type of operation to apply to the resistivity values rhoa of the duplicated spacing points AB. The default operation is
mean.outdf (bool , default=False,) – Outpout a new dataframe composed of AB and rhoa; data renewed.
- Returns:
- Tuple of (AB, rhoa) (New values computed from typeofop)
- DataFrame (New dataframe outputed only if
outdfisTrue.)
Notes
By convention AB and MN are half-space dipole length which correspond to AB/2 and MN/2 respectively.
Examples
>>> from watex.utils.exmath import vesDataOperator >>> from watex.utils.coreutils import vesSelector >>> data = vesSelector ('data/ves/ves_gbalo.xlsx') >>> len(data) ... (32, 3) # include the potentiel electrode values `MN` >>> df= vesDataOperator(data.AB, data.resistivity, typeofop='leaveOneOut', outdf =True) >>> df.shape ... (26, 2) # exclude `MN` values and reduce(-6) the duplicated values.