All information about the a priori model are defined in the Matlab structure called prior which can specify any number of the following types of a priori models:
The functions sippi_prior, sippi_plot_model, and sippi_plot_prior can be used to handle and visualize a priori models in SIPPI.
The function sippi_prior generates a realization of the prior model.
The function sippi_plot_model visualize a realization of the prior model.
The function sippi_plot_prior generates a sample (a number of realizations) of the prior model and visulaizes these.
The exmamples below should serve as inspiration to the type of a priori models that can be handled by SIPPI
A simple 2D a priori model defining a multivariate Gaussian model, N(m0,Cm), with mean m0 of 2000, and covariance Cm defined by an isotropic Gaussian type covariance model with a range of 30, and a sill/variance of 200, can be defined using
im=1;
prior{im}.name='Traditional gaussian'; % [optional] specifies name to prior
prior{im}.type='FFTMA'; % the type of a priori model
prior{im}.x=[0:1:100]; % specifies the scales of the 1st (X) dimension
prior{im}.y=[19:1:90]; % specifies the scales of the 2nd (Y) dimension
prior{im}.m0=2000; % the a priori mean value (default m0=0, if not set)
prior{im}.Cm='200 Sph(30)'; % the a priori covariance/semivariogram model
prior=sippi_prior_init(prior); % initialize the prior model
A realization of the prior model, given in the Matlab structure m, can be generated and visualized using
m=sippi_prior(prior); % generate a realization from the prior model
sippi_plot_model(prior,m) % visualize the realization in 'm' from the prior
sippi_plot_prior(prior) % visualize a sample from the prior


im=im+1;
prior{im}.name='Traditional gaussian (VISIM)'; % [optional] specifies name to prior
prior{im}.type='VISIM'; % the type of a priori model
prior{im}.x=[0:1:100]; % specifies the scales of the 1st (X) dimension
prior{im}.y=[10:1:90]; % specifies the scales of the 2nd (Y) dimension
prior{im}.m0=2000; % the a priori mean value (default m0=0, if not set)
prior{im}.Cm='200 Sph(30)'; % the a priori covariance/semivariogram model
prior=sippi_prior_init(prior); % initialize the prior model
m=sippi_prior(prior); % generate a realization from the prior model
sippi_plot_model(prior,m,im) % visualize the realization from the prior
print_mul('prior_example_2_2d_visim')

A simple 2D a priori model defining a multivariate Gaussian model, N(m0,Cm), with mean m0 of 2000, and covariance Cm defined by an AN-isotropic Gaussian type covariance model with a range of 30 at a direction striking 40 degrees clockwise from north, and perpendicular range of 10 (anisotropy of 0.3), and a sill/variance of 200, can be defined using
im=1;
prior{im}.name='Traditional gaussian (FFTMA aniosotropic)'; % [optional] specifies name to prior
prior{im}.type='FFTMA'; % the type of a priori model
prior{im}.x=[0:1:100]; % specifies the scales of the 1st (X) dimension
prior{im}.y=[10:1:90]; % specifies the scales of the 2nd (Y) dimension
prior{im}.m0=2000; % the a priori mean value (default m0=0, if not set)
prior{im}.Cm='200 Sph(30,40,.33)'; % the a priori covariance/semivariogram model
prior=sippi_prior_init(prior); % initialize the prior model
m=sippi_prior(prior); % generate a realization from the prior model
sippi_plot_model(prior,m) % visualize the realization in 'm' from the prior

im=1;
prior{im}.name='Sequential Indicator Simulation (SISIM)'; % [optional] specifies name to prior
prior{im}.type='SISIM'; % the type of a priori model
prior{im}.x=[0:1:100]; % specifies the scales of the 1st (X) dimension
prior{im}.y=[10:1:90]; % specifies the scales of the 2nd (Y) dimension
prior{im}.Va='1 Gau(30,40,.33)'; % the a priori covariance/semivariogram model
prior{im}.marginal_prob=[0.4 0.2 .4]; % marginal probabilities of facies (here 3 facies)
prior=sippi_prior_init(prior); % initialize the prior model
m=sippi_prior(prior); % generate a realization from the prior model
sippi_plot_model(prior,m,im) % visualize the realization from the prior

im=1;
prior{im}.name='Sequential Indicatot Simulation (SISIM)'; % [optional] specifies name to prior
prior{im}.type='SNESIM'; % the type of a priori model
prior{im}.x=[0:1:100]; % specifies the scales of the 1st (X) dimension
prior{im}.y=[10:1:90]; % specifies the scales of the 2nd (Y) dimension
prior{im}.S=sgems_get_par('snesim_std'); % Get default SGeMS parameter file, with default training image
prior{im}.scaling=0.5; % scaling of the training image
prior{im}.rotation=30; % rotation of the training image
prior=sippi_prior_init(prior); % initialize the prior model
m=sippi_prior(prior); % generate a realization from the prior model
sippi_plot_model(prior,m,im) % visualize the realization from the prior
