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.
Variogram map¶
-
pyLPM.gammapy.varmap(dataset, X, Y, head, tail, azimuth, dip, nlags, lagdistance, ndirections, type_var, Z=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, X, Y, head, tail, Z=None, choice=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, X, Y, head, tail, type_c, nlags, lagsize, lineartol, htol, vtol, hband, vband, azimuth, dip, omni, 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) – 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, X, Y, head, tail, ndirections, 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 coorcinates 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.
Variogram modeling¶
-
pyLPM.gammapy.modelling(experimental_dict, rotation_max, rotation_med, rotation_min, nugget, inverted, rangemax, rangemed, rangemin, model, contribution, show_pairs=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:
-
pyLPM.gammapy.interactive_modelling(experimental_dataframe, number_of_structures, show_pairs=False)[source]¶ Opens the interactive modeling controlls. Store the results in a global variable gammapy.return_model_var.
Parameters: - experimental_dataframe (DataFrame) – Experimental variogram DataFrame. Assessed by gammapy.return_exp_var
- directions (lst of lsts) – directions to model variogram. Example [[166.,76],[0.,0.]] for modeling in direction azimuth = 166, dip = 0 and azimuth = 76 and dip = 0.
- number_of_structures (int) – number of structures
- show_pairs (bool, optional) – show number of pairs flag. Defaults to False.