Pseudo Wells
This section contains documentation for the Pseudo Wells module.
Monte Carlo Simulations
- stoneforge.pseudo_wells.monte_carlo_simulations.MCS_spacial_correlation(n, smooth_data, cov)[source]
Determines n Monte Carlo Simulations (MCS) with spatial correlation for a given (Dvorkin et al.[1]).
- Parameters:
n (integer) – Number of simulations to be performed.
smooth_data (array_like) – a smoothed version of the data under examination, or its general trend.
cov (array_like) – Spatial symmetrical covariance matrix of the data.
- Returns:
simulations – n Monte Carlo simulations with spatial correlation for a given property, each line of this matrix represents a different simulation.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.analytical_variogram(distance, gama, initial_guess)[source]
Fits the choosen analytical variogram function (model) to the experimental one Vugrin et al.[2], if no model is choosen, determines the best model to fit, comparing the Gaussian, Exponential and Spherical models Grana et al.[3], de Almeida[4].
- Parameters:
distance (array_like) – 1D array containing all the possible distances between a pair of points in the dataset.
gama (array_like) – 1D experimental variogram of the data under examination.
model (str, optional) –
Analytical variogram model to be fitted. Should be one of:
”exponential”: fits the exponential model
”gaussian”: fits the gaussian model
”spherical”: fits the spherical model
”best-fit”: fits the three models above and verifies which one produces the smallest error.
given (If not)
"best-fit". (default method is)
initial_guess (array_like) – Initial guess for the parameters of the variogram model. It should be a list containing the initial values for the correlation length, sill and nugget.
- Return type:
array
- Returns:
modeled_variogram (array_like) – The variogram model that has been choosen, or the variogram model that fits the best the experimental one.
coeficients (array_like) – The range, sill and nugget optimal values for the modeled variogram.
- stoneforge.pseudo_wells.monte_carlo_simulations.cov_matrix(rho, var)[source]
Determines the 1D spatial symmetrical covariance matrix from a modeled correlation function (Dvorkin et al.[1]).
- Parameters:
rho (array_like) – 1D modeled correlation function of the data under examination.
var (float) – Variance (the square of the standard deviation) of the dataset.
- Returns:
cov – Spatial symmetrical covariance matrix of the data.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.experimental_correlation(data)[source]
Determines the 1D experimental correlation function for a dataset by calculating the Pearson correlation coefficient for each possible separation of samples (Dvorkin et al.[1]).
- Parameters:
data (array_like) – 1D dataset for which the experimental correlation function must be calculated.
- Returns:
rho – 1D experimental correlation function of the data under examination.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.experimental_variogram(data, rho)[source]
Determines the 1D experimental variogram of a dataset (Dvorkin et al.[1]).
- Parameters:
data (array_like) – 1D dataset for which the experimental variogram must be calculated.
rho (array_like) – 1D experimental correlation function of the data under examination.
- Returns:
gama – 1D experimental variogram of the data under examination.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.exponential_variogram_model(distance, correlation_length, sill, nugget=0)[source]
Builds a variogram following the exponential model, using the correlation length, sill and nugget given (Journel and Huijbregts[5], Cressie[6], Chilés and Delfiner[7], Grana et al.[3]).
- Parameters:
distance (array_like) – 1D array containing all the possible distances between a pair of points in the dataset.
correlation_length (float) – The range of the variogram, or the distance where it loses the correlation
sill (float) – The maximum value of the variogram, it is equivalent to the variance of the data
nugget (float) – The nugget effect, y value where the variogam begins
- Returns:
rho – The variogram that follows the exponential model and has the given correlation length, sill and nugget
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.gamma_calc(data, depth, step=100)[source]
Smooth the values of 1D data (Isaaks and Srivastava[8], Isaaks[9], Dvorkin et al.[1]).
- Parameters:
data (array_like) – 1D data samples From where the calculation will be made.
depth (array_like) – 1D array containing the depth of each sample in the dataset.
step (int, optional) – Step between samples, by default 100. This is the number of samples that will be skipped between each calculation of the correlation function.
- Returns:
gamma – 1D array containing the calculated gamma values for each step.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.gaussian_variogram_model(distance, correlation_length, sill, nugget=0)[source]
Builds a variogram following the gaussian model, using the correlation length, sill and nugget given (Journel and Huijbregts[5], Chilés and Delfiner[7], Grana et al.[3]).
- Parameters:
distance (array_like) – 1D array containing all the possible distances between a pair of points in the dataset.
correlation_length (float) – The range of the variogram, or the distance where it loses the correlation
sill (float) – The maximum value of the variogram, it is equivalent to the variance of the data
nugget (float) – The nugget effect, y value where the variogam begins
- Returns:
rho – The variogram that follows the gaussian model and has the given correlation length, sill and nugget
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.modeled_correlation(gama, var)[source]
Determines the 1D modeled correlation function from a variogram model (Dvorkin et al.[1]).
- Parameters:
gama (array_like) – 1D analytical variogram model.
var (float) – variance (the square of the standard deviation) of the dataset.
- Returns:
rho – 1D modeled correlation function of the data under examination.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.p(n, data1, data2, smooth_data1, smooth_data2, cov)[source]
Determines n Monte Carlo Simulations (MCS) using data1 and data2 as correlated variables (Dvorkin et al.[1]).
- Parameters:
n (integer) – Number of simulations to be performed.
data1 (array_like) – A dataset that represents a given porperty, related to data1.
data2 (array_like) – A dataset that represents a given porperty, related to data2.
smooth_data1 (array_like) – A smoothed version of the data1, or its general trend.
smooth_data2 (array_like) – A smoothed version of the data2, or its general trend.
cov (array_like) – Spatial symmetrical covariance matrix representing both data1 and data2.
- Returns:
simulations – n Monte Carlo Simulations with correlated variables for data1 and n Monte Carlo Simulations with correlated variables for data2, in this order.
- Return type:
array_like
- stoneforge.pseudo_wells.monte_carlo_simulations.spherical_variogram_model(distance, correlation_length, sill, nugget=0)[source]
Builds a variogram following the spherical model, using the correlation length, sill and nugget given (BURGESS and WEBSTER[10], Grana et al.[3]).
- Parameters:
distance (array_like) – 1D array containing all the possible distances between a pair of points in the dataset.
correlation_length (float) – The range of the variogram, or the distance where it loses the correlation
sill (float) – The maximum value of the variogram, it is equivalent to the variance of the data
nugget (float) – The nugget effect, y value where the variogam begins
- Returns:
rho – The variogram that follows the spherical model and has the given correlation length, sill and nugget
- Return type:
array_like
- class stoneforge.pseudo_wells.monte_carlo_simulations.variogram_model(dif, depth, step=100)[source]
Bases:
object
_summary_ A class to calculate and visualize the variogram of a dataset, using the exponential model. It can also normalize the data and calculate the variogram for normalized data. It provides methods to graph the variogram, calculate the variogram for a given depth, and normalize and denormalize the data (Isaaks and Srivastava[8], Isaaks[9], Dvorkin et al.[1]).
- graph(correlation_length, sill=False, nugget=0.0)[source]
Graph the variogram of the dataset using the exponential model.
- Parameters:
dif (array_like) – 1D data samples From where the calculation will be made.
depth (array_like) – 1D array containing the depth of each sample in the dataset.
step (int, optional) – Step between samples, by default 100. This is the number of samples that will be skipped between each calculation of the correlation function.
- norm_graph(correlation_length, sill=False, nugget=0.0)[source]
Graph the normalized variogram of the dataset using the exponential model.