-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.m
50 lines (43 loc) · 2.27 KB
/
script.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%% DATA CREATION
clc; clear all; addpath(genpath('./.')); dbstop if error
% This section gather all possible way to create the data. |gen| struct
% store the parameter and |data_generation.m| compute everything
% Grid size
gen.xmax = 120; %total length in unit [m]
gen.ymax = 15; %total hight in unit [m]
% Scale define the subdivision of the grid (multigrid). At each scale, the
% grid size is $(2^gen.sx+1) \times (2^gen.sy+1)$
gen.sx = 8;
gen.sy = 6;
% Generation Method: All method generate with FFTMA a gaussian field.
% 'Normal' with normal distribution \sim N(gen.mu,gen.std)
% 'LogNormal'
% 'fromRho': log transform it with the parameter defined below
% 'fromK': generate with FFTMA a field of Hyraulic conductivity and log transform it with the parameter defined below
gen.method = 'fromPhi';
% Generation parameter
gen.samp = 1; % Method of sampling of K and g | 1: borehole, 2:random. For fromK or from Rho only
gen.samp_n = 3; % number of well or number of point
gen.covar(1).model = 'exponential';
gen.covar(1).range0 = [2.7 27];
gen.covar(1).azimuth = 0;
gen.covar(1).c0 = 1;
gen.covar = kriginginitiaite(gen.covar);
gen.mu = 0.27; % parameter of the first field.
gen.std = .05;
gen.Rho.method = 'R2'; % 'Paolo' (default for gen.method Paolo), 'noise', 'RESINV3D'
% Electrical inversion
gen.Rho.grid.nx = 60;
gen.Rho.grid.ny = 10; % log-spaced grid.
gen.Rho.elec.spacing = 4; % in grid spacing unit.
gen.Rho.elec.config_max = 6000; % number of configuration of electrode maximal
gen.Rho.dmin.res_matrix = 3; % resolution matrix: 1-'sensitivity' matrix, 2-true resolution matrix or 0-none
gen.Rho.dmin.tolerance = 10;
% Other parameter
gen.plotit = true; % display graphic or not (you can still display later with |script_plot.m|)
gen.saveit = true; % save the generated file or not, this will be turn off if mehod Paolo or filename are selected
gen.name = '120x20';
gen.seed = 23456;
% Run the function
data_generation(gen);
%[fieldname, grid_gen, K_true, phi_true, sigma_true, K, sigma, Sigma, gen] = data_generation(gen);