watex.utils.erpSmartDetector#
- watex.utils.erpSmartDetector(constr, erp, station=None, coerce=False, return_cz=False, view=False, raise_warn=True, **plot_kws)[source]#
Automatically detect the drilling location by involving the constraints observed in the survey area.
Consider the constraints on the survey area and detect the suitable drilling location. Commonly the station is not needed when using the constraintssince the station indicates that the user is aware about the reason to select this station. However in the case, doubts raise, user can set the parameter coerce to
True.- Parameters:
constr (list, dict) –
List of restricted station. The constraint or restricted stations are the station where to ignore when selecting the best drilling location. Indeed, this is useful since in DWSC, not the station are presumed to be suitable to propose the drilling in technical view. For instance, if some stations are close to the household waste site, the stations must be list and ignored.
If the constr is passed in a dictionnary, it might be contain, the key for the restricted stations and the value for the reason why the station is restricted. For instance:
constr = {"s02": "station close to the household waste" "S25": "station is located in a marsh area." }
erp (array-like 1d) – DC profiling ERP resistivity values
station (str, optional) – The station of the presumed location for drilling operations. Commonly the station is not need when using the constraints. If the station is given whereas
coerce=Falsean errors will raise top warnm the users, To force considering the station in the auto-detection,coercemust be set toTrue.coerce (bool, default=False,) – Allow the station to be consider in the auto-detection.
raise_warn (bool, default=True,) – warn the user whether a suitable location is found or not. Returns
Noneotherwise.view (bool, default=False,) – Plot the conductive zone and restricted stations.
plot_kws (dict,) – Additional plotting keywords arguments passed to
plotAnomaly().
- Returns:
(station |None) or cz, cs – staion for the drilling operations detected automatically. If no station is detected, will return
None. if return_cz isTrue, station and the conductive zone are returned as well as the restricted station position number.- Return type:
str,
See also
watex.plotAnomalyPlot DC profiling ERP and conductive zone.
Examples
>>> import numpy as np >>> from watex.datasets import make_erp >>> from watex.utils.coreutils import erpSmartDetector >>> resistivity = make_erp (n_stations =50 , as_frame=True, seed=125).resistivity >>> # get the min value of the resistivity >>> resmin_index = np.where ( resistivity==resistivity.min()) 42 >>> erpSmartDetector (constr =['s42'], resistivity ) 'S13' >>> # S42 is rejected and selected another zone presumed to be better. >>> constraints ={"S00": "Marsh area. ", "S10": " Municipality square, no authorization to make drill", "S29": "Heritage site", "S46": "Household waste site", "S42": "Household waste site" } >>> erpSmartDetector (constraints, resistivity) 'S16' >>> erpSmartDetector (['s12', 's40'], resistivity) 'S29' >>> # station 42 close s40 is rejected too.