watex.utils.get_sections_from_depth#

watex.utils.get_sections_from_depth(z, z_range, return_index=False)[source]#

Gets aquifer sections (‘upper’, ‘lower’) in data ‘z’ from the depth range.

This might be usefull to compute the thickness of the aquifer.

Parameters:
  • z (array-like 1d or pd.Series) – Array or pandas series contaning the depth values

  • z_range (tuple (float),) –

    Section [‘upper’, ‘lower’] of the aquifer at differnt depth. The range of the depth must a pair values and could not be

    greater than the maximum depth of the well.

  • return_index (bool, default=False) – returns the indices of the sections [‘upper’, ‘lower’] of the aquifer and non-valid sections too.

Returns:

  • sections (Tuple (float, float)) – Real values of the upper and lower sections of the aquifer.

  • If return_index is ‘True’, function returns –

    (upix, lowix): Tuple (int, int )

    indices of upper and lower sections in the depth array z

    (invix): list of Tuple (int, int)

    list of indices of invalid sections

Example

>>> from watex.datasets import load_hlogs
>>> from watex.utils.hydroutils import get_sections_from_depth
>>> data= load_hlogs().frame
>>> # get real sections from depth 16.25 to 125.83 m
>>> get_sections_from_depth ( data.depth_top, ( 16.25, 125.83))
...  (22.46, 128.23)
>>> # aquifer depth from 16.25 m to the end
>>> get_sections_from_depth ( data.depth_top, ( 16.25,))
... (22.46, 693.37)
>>> get_sections_from_depth ( data.depth_top, ( 16.25, 125.83),
                             return_index =True )
... ((3, 11), [(0, 3), (11, 180)])
>>> get_sections_from_depth ( data.depth_top, ( 16.25,),
                             return_index =True )
... ((3, 181), [(0, 3)])