Variography¶
This module houses tools for spatial continuity analysis and variogram calculation and modeling. All interactive functions opens an interactive parameters input widget, non interactive versions are usefull for scripting your workflow.
H-scatterplot¶
-
pyLPM.gammapy.hscatterplots(dataset, X: str, Y: str, head: str, tail: str, lagsize: float, nlags: int, azimuth: float, dip: float, lineartol: float, htol: float, vtol: float, hband: float, vband: float, Z: str = None, choice: float = 1.0, figsize=(700, 700))[source]¶ Plots H-scatterplot for n lags
Parameters: - dataset (pd.DataFrame) – Pandas DataFrame
- X (str) – x coordinates column name
- Y (str) – y coordinates column name
- head (str) – head variable name
- tail (str) – tail variable name
- lagsize (float) – lag size
- nlags (int) – number of lags
- azimuth (float) – azimuth
- dip (float) – dip
- lineartol (float) – linear tolerance
- htol (float) – angular horizontal tolerance in degrees
- vtol (float) – angular vertical tolerance in degrees
- hband (float) – horinztal bandwidth
- vband (float) – vertical bandwidth
- Z (str, optional) – z coordinates column name. Defaults to None.
- choice (float, optional) – pool a random number of data to calculate the variogram. Defaults to 1.0.
Variogram map¶
-
pyLPM.gammapy.varmap(dataset: callable, X: str, Y: str, head: str, tail: str, azimuth: float, dip: float, nlags: int, lagdistance: float, ndirections: int, type_var: str, Z: str = None, choice=1.0)[source]¶ Plots a variogram map.
Parameters: - dataset (DataFrame) – Point set DataFrame
- X (str) – x coordinates column name
- Y (str) – y coordinates column name
- head (str) – head variable name
- tail (str) – tail variable name
- azimuth (float) – azimuth
- dip (float) – dip
- nlags (int) – number of lags
- lagdistance (float) – lag distance
- ndirections (int) – number of directions
- type_var (str) – covariance funcrion type. Variogram, Correlogram …
- Z (str, optional) – z coordinates variable name. Defaults to None.
- choice (float, optional) – pool a random number of data to calculate the variogram. Defaults to 1.0.
-
pyLPM.gammapy.interactive_varmap(dataset: callable, X: str, Y: str, head: str, tail: str, Z: str = None, choice: float = 1.0)[source]¶ Opens interactive variogram map controls.
Parameters: - dataset (DataFrame) – Data points DataFrame
- X (str) – x column coordinates name
- Y (str) – y column cordinates name
- head (str) – head property name
- tail (str) – tail property name
- Z (str, optional) – z coordinates column name. Defaults to None.
- choice (float, optional) – pool a random number of data to calculate the variogram. Defaults to 1.0.
Experimental variogram¶
-
pyLPM.gammapy.experimental(dataset: callable, X: str, Y: str, head: str, tail: str, type_c: str, nlags: list, lagsize: list, lineartol: list, htol: list, vtol: list, hband: list, vband: list, azimuth: list, dip: list, omni: bool, show_pairs: bool = False, Z: str = None, choice: float = 1.0)[source]¶ Calculates experimental variogram. Store the results in a global variable gammapy.return_exp_var.
Parameters: - dataset (DataFrame) – point set DataFrame
- X (str) – x coordinates column name
- Y (str) – y coordinates column name
- head (str) – head variable name
- tail (str) – tail variable name
- type_c (lst of str) – covariance funcrion type list. Variogram, Correlogram …
- nlags (lst) – list of lag number for each direction
- lagsize (lst) – list of lag size for each direction
- lineartol (lst) – list of linear tolerance for each direction
- htol (lst) – list of horizontal tolerance for each direction
- vtol (lst) – liist of vertical tolerance for each direction
- hband (lst) – list of horizontal band for each direction
- vband (lst) – list of vertical band for each direction
- azimuth (lst) – azimuth
- dip (lst) – dip
- omni (bool) – omnidirectionl flag
- show_pairs (bool, optional) – show pairs flag. Defaults to False.
- Z (str, optional) – z coordinates column name. Defaults to None.
- choice (float, optional) – pool a random number of data to calculate the variogram. Defaults to 1.0.
Returns: experimental variogram DataFrame
Return type:
-
pyLPM.gammapy.interactive_experimental(dataset: callable, X: str, Y: str, head: str, tail: str, ndirections: int, show_pairs=False, Z=None, choice=1.0)[source]¶ Calculates experimental variogram. Store the results in a global variable gammapy.return_exp_var.
Parameters: - dataset (DataFrame) – data points DataFrame
- X (str) – x coordinates column name
- Y (str) – y coordinates column name
- head (str) – head variable
- tail (str) – tail variable
- ndirections (int) – number of directions
- show_pairs (bool, optional) – show number of pairs flag. Defaults to False.
- Z (str, optional) – z coordinates column name. Defaults to None.
- choice (float, optional) – pool a random number of data to calculate the variogram. Defaults to 1.0.
Returns: experimental variogram DataFrame
Return type:
Variogram modeling¶
-
pyLPM.gammapy.modelling(experimental_dict: callable, rotation_max: float, rotation_med: float, rotation_min: float, nugget: int, inverted: bool, rangemax: list, rangemed: list, rangemin: list, model: list, contribution: list, show_pairs: bool = False)[source]¶ Variogram modeling function without interactive controlls.
Parameters: - experimental_dict (dict) – experimental variogram
- rotation_max (float) – azimuth
- rotation_med (float) – dip
- rotation_min (float) – rake
- nugget (float) – nugget contribution
- inverted (bool) – inverted model flag
- rangemax (lst) – list of ranges in maximum continuity direction for each structure
- rangemed (lst) – list of ranges in intermediate continuity direction for each structure
- rangemin (lst) – list of ranges in minumim continuity direction for each structure
- model (lst of str) – lst of models for each structure. Spherical, Exponential or Gaussian.
- contribution (lst of floats) – list of contributions for each structure
- show_pairs (bool, optional) – Show pairs flag. Defaults to False.
Returns: variogram model DataFrame
Return type: