watex.utils.get_aquifer_sections#
- watex.utils.get_aquifer_sections(*data, zname, kname, return_index=False, return_data=False, error='ignore', **kws)[source]#
Get the section of each aquifer form multiple dataframes.
The unique section ‘upper’ and ‘lower’ is the valid range of the whole data to consider as a valid data. The use of the index is necessary to shrunk the data of the whole boreholes. Mosly the data from the section is consided the valid data as the predictor Xr. Out of the range of aquifers ection, data can be discarded or compressed to top Xr.
Returns valid section indexes if ‘return_index’ is set to
True.- Parameters:
data (list of pandas dataframe) – Data that contains mainly the aquifer values. It needs to specify the name of the depth column zname as well as the name of permeabiliy kname column.
zname (str, int) – Name of depth columns. zname allows to retrieve the depth column in a dataframe. If integer is passed, it assumes the index of the dataframe fits the depth column. Integer value must not be out the dataframe size along axis 1. Commonly `zname`needs to be supplied when a dataframe is passed to a function argument.
kname (str, int) –
- Name of permeability coefficient columns. kname allows to retrieve the
permeability coefficient ‘k’ in a specific dataframe. If integer is passed, it assumes the index of the dataframe fits the ‘k’ columns. Note that integer value must not be out the dataframe size along axis 1. Commonly
- kname needs to be supplied when a dataframe is passed as a positional
or keyword argument.
z (array-like 1d, pandas.Series) – Array of depth or a pandas series that contains the depth values. Two dimensional array or more is not allowed. However when z is given as a dataframe and zname is not supplied, an error raises since zname is used to fetch and overwritten z from the dataframe.
return_index (bool, default =False ,) – Returns the positions (indexes) of the upper and lower sections of the each aquifer found in each dataframe.
error (str, default='ignore') – Raise errors if trouble occurs when computing the section of each aquifer. If ‘ignore’, a UserWarning is displayed if invalid data is found. Any other value of error will set error to raise.
return_data (bool, default=False,) – Return valid data. It is usefull when ‘error’ is set to ‘ignore’ to collect the valid data.
kws (dict,) – Additional keywords arguments passed to
get_aquifer_sections().
- Returns:
up, low –
(upix, lowix ): Tuple of indexes of lower and upper sections
(up, low): Tuple of aquifer sections (upper and lower)
- (upix, lowix), (up, low)positions and sections values of aquifers
if return_index and return_sections` are
True.
- Return type:
list of upper and lower section values of aquifer.
See also
watex.utils.hydroutils.get_aquifer_sectionscompute multiples aquifer sections
Example
>>> from watex.datasets import load_hlogs >>> from watex.utils.hydroutils import get_aquifer_sections >>> data = load_hlogs ().frame >>> get_aquifer_sections (data, data , zname ='depth', kname ='k' ) ... [[197.12, 369.71], [197.12, 369.71]] >>> get_aquifer_sections (data, data , zname ='depth', kname ='k' , return_index =True ) ... [[16, 29], [16, 29]]