Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS3D
Commits
70daff4f
Commit
70daff4f
authored
Jul 01, 2016
by
Betty Heller
Browse files
Changed y and z axes
parent
4f7bcecb
Changes
2
Show whitespace changes
Inline
Side-by-side
mfiles/slice3D_toy_grad.m
View file @
70daff4f
...
@@ -2,15 +2,15 @@
...
@@ -2,15 +2,15 @@
clear
all
;
clear
all
;
nx
=
160
;
ny
=
18
4
;
nz
=
160
;
nx
=
160
;
ny
=
18
6
;
nz
=
160
;
%ny:vertical
outx
=
1
;
outy
=
1
;
outz
=
1
;
outx
=
1
;
outy
=
1
;
outz
=
1
;
dh
=
0.8
;
dh
=
0.8
;
nx
=
nx
/
outx
;
ny
=
ny
/
outy
;
nz
=
nz
/
outz
;
nx
=
nx
/
outx
;
ny
=
ny
/
outy
;
nz
=
nz
/
outz
;
fignum
=
71
;
fignum
=
71
;
file_inp1
=
'../par/grad/toy_grad.v
p
_160.00Hz_it1
001
'
;
%preconditioned gradient
file_inp1
=
'../par/grad/toy_grad.v
s
_160.00Hz_it1'
;
%preconditioned gradient
: it1001
file_inp2
=
'../par/grad/toy_grad.vp_160.00Hz_it1'
;
%"raw" gradient
file_inp2
=
'../par/grad/toy_grad.vp_160.00Hz_it1'
;
%"raw" gradient
: it1
...
@@ -26,10 +26,12 @@ rotaxes=[1,0,0]; %direction rotation axes [0,1,0] rotation of plane around verti
...
@@ -26,10 +26,12 @@ rotaxes=[1,0,0]; %direction rotation axes [0,1,0] rotation of plane around verti
%viewpoint=[122,26];
%viewpoint=[122,26];
viewpoint
=
[
-
20
,
12
];
viewpoint
=
[
-
20
,
12
];
caxis_value_1
=-
1
;
% caxis_value_1=-1; % preconditioned
caxis_value_2
=
1
;
% caxis_value_2=1; % preconditioned
% caxis_value_1 = -0.02; % raw, vp
% caxis_value_2 = 0.02; % raw, vp
caxis_value_1
=
-
0.03
;
% raw, vs
caxis_value_2
=
0.03
;
% raw, vs
xcut1
=
10
;
xcut2
=
149
;
xcut1
=
10
;
xcut2
=
149
;
ycut1
=
10
;
ycut2
=
139
;
ycut1
=
10
;
ycut2
=
139
;
...
@@ -37,11 +39,11 @@ zcut1=10; zcut2=149;
...
@@ -37,11 +39,11 @@ zcut1=10; zcut2=149;
fid_rot
=
fopen
(
file_inp1
,
'r'
,
'ieee-le'
);
fid_rot
=
fopen
(
file_inp1
,
'r'
,
'ieee-le'
);
rot1
=
zeros
(
n
z
/
out
z
,
nx
/
outx
,
n
y
/
out
y
);
rot1
=
zeros
(
n
y
/
out
y
,
nx
/
outx
,
n
z
/
out
z
);
rot1
=
fread
(
fid_rot
,(
nx
*
ny
*
nz
),
'float'
);
rot1
=
fread
(
fid_rot
,(
nx
*
ny
*
nz
),
'float'
);
fid_div
=
fopen
(
file_inp2
,
'r'
,
'ieee-le'
);
fid_div
=
fopen
(
file_inp2
,
'r'
,
'ieee-le'
);
div1
=
zeros
(
n
z
/
out
z
,
nx
/
outx
,
n
y
/
out
y
);
div1
=
zeros
(
n
y
/
out
y
,
nx
/
outx
,
n
z
/
out
z
);
div1
=
fread
(
fid_div
,(
nx
*
ny
*
nz
),
'float'
);
div1
=
fread
(
fid_div
,(
nx
*
ny
*
nz
),
'float'
);
...
@@ -53,8 +55,8 @@ rot1=-rot1./max(max(rot1));
...
@@ -53,8 +55,8 @@ rot1=-rot1./max(max(rot1));
%rot1=log10(rot1);
%rot1=log10(rot1);
rot
=
reshape
(
rot1
,
n
z
/
out
z
,
nx
/
outx
,
n
y
/
out
y
);
rot
=
reshape
(
rot1
,
n
y
/
out
y
,
nx
/
outx
,
n
z
/
out
z
);
rot
=
rot
(
z
cut1
:
z
cut2
,
xcut1
:
xcut2
,
y
cut1
:
y
cut2
);
rot
=
rot
(
y
cut1
:
y
cut2
,
xcut1
:
xcut2
,
z
cut1
:
z
cut2
);
nx
=
xcut2
-
xcut1
+
1
;
nx
=
xcut2
-
xcut1
+
1
;
ny
=
ycut2
-
ycut1
+
1
;
ny
=
ycut2
-
ycut1
+
1
;
...
@@ -74,7 +76,7 @@ z=zp1:dh*outz:zp2*outz;
...
@@ -74,7 +76,7 @@ z=zp1:dh*outz:zp2*outz;
%z=zcut1:dh*outz:zcut2*outz;
%z=zcut1:dh*outz:zcut2*outz;
figure
(
12
)
%
figure(12)
[
Z
,
X
,
Y
]
=
meshgrid
(
z
,
x
,
y
);
[
Z
,
X
,
Y
]
=
meshgrid
(
z
,
x
,
y
);
xmin
=
min
(
X
(:));
ymin
=
min
(
Y
(:));
zmin
=
min
(
Z
(:));
xmin
=
min
(
X
(:));
ymin
=
min
(
Y
(:));
zmin
=
min
(
Z
(:));
xmax
=
max
(
X
(:));
ymax
=
max
(
Y
(:));
zmax
=
max
(
Z
(:));
xmax
=
max
(
X
(:));
ymax
=
max
(
Y
(:));
zmax
=
max
(
Z
(:));
...
@@ -135,7 +137,7 @@ zd3 = get(hslicez,'ZData');
...
@@ -135,7 +137,7 @@ zd3 = get(hslicez,'ZData');
rot
=
permute
(
rot
,[
2
,
1
,
3
]);
rot
=
permute
(
rot
,[
2
,
3
,
1
]);
%rott=size(rot)
%rott=size(rot)
%size(rot)
%size(rot)
%size(Z)
%size(Z)
...
@@ -205,9 +207,9 @@ hold on
...
@@ -205,9 +207,9 @@ hold on
hold
off
hold
off
xlabel
(
'
y
in m'
);
xlabel
(
'
z
in m'
);
ylabel
(
'x in m'
);
ylabel
(
'x in m'
);
zlabel
(
'
z
in m'
);
zlabel
(
'
y
in m'
);
set
(
gca
,
'xDir'
,
'reverse'
)
set
(
gca
,
'xDir'
,
'reverse'
)
set
(
gca
,
'yDir'
,
'normal'
)
set
(
gca
,
'yDir'
,
'normal'
)
set
(
gca
,
'zDir'
,
'normal'
)
set
(
gca
,
'zDir'
,
'normal'
)
...
@@ -223,7 +225,8 @@ hold on
...
@@ -223,7 +225,8 @@ hold on
set
(
gca
,
'Linewidth'
,
1.0
);
set
(
gca
,
'Linewidth'
,
1.0
);
cb
=
colorbar
(
'vert'
);
cb
=
colorbar
(
'vert'
);
xlabel
(
cb
,
'gradient v_p'
);
xlabel
(
cb
,
'norm. \newline gradient v_s'
);
set
(
gca
,
'FontSize'
,
14
);
set
(
gca
,
'FontSize'
,
14
);
load
(
'MyColormapsgrad'
,
'mycmap'
);
load
(
'MyColormapsgrad'
,
'mycmap'
);
...
@@ -238,3 +241,7 @@ view(viewpoint);
...
@@ -238,3 +241,7 @@ view(viewpoint);
box
on
box
on
exportfig
(
fignum
,
'rawgrad_it1_vs.eps'
,
'bounds'
,
'tight'
,
'color'
,
'rgb'
,
...
'preview'
,
'none'
,
'resolution'
,
200
,
'lockaxes'
,
1
);
mfiles/slice3D_toy_model.m
View file @
70daff4f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
clear
all
;
clear
all
;
nx
=
160
;
ny
=
18
4
;
nz
=
160
;
%ny:vertical
nx
=
160
;
ny
=
18
6
;
nz
=
160
;
%ny:vertical
outx
=
1
;
outy
=
1
;
outz
=
1
;
outx
=
1
;
outy
=
1
;
outz
=
1
;
dh
=
0.8
;
dh
=
0.8
;
nx
=
nx
/
outx
;
ny
=
ny
/
outy
;
nz
=
nz
/
outz
;
nx
=
nx
/
outx
;
ny
=
ny
/
outy
;
nz
=
nz
/
outz
;
...
@@ -11,7 +11,7 @@ fignum=12;
...
@@ -11,7 +11,7 @@ fignum=12;
%file_inp1='/data14/sdunkl/3DAWAIT/trunk_JURECA/results_toy/model/toy_real.vp';
%file_inp1='/data14/sdunkl/3DAWAIT/trunk_JURECA/results_toy/model/toy_real.vp';
%file_inp2='/data14/sdunkl/3DAWAIT/trunk_JURECA/results_toy/model/toy_real.vp';
%file_inp2='/data14/sdunkl/3DAWAIT/trunk_JURECA/results_toy/model/toy_real.vp';
file_inp1
=
'../par/model/toy.v
s_it0
'
;
file_inp1
=
'../par/model/toy.v
p.true
'
;
file_inp2
=
'../par/model/toy.vs_it60'
;
file_inp2
=
'../par/model/toy.vs_it60'
;
...
@@ -27,10 +27,10 @@ rotaxes=[1,0,0]; %direction rotation axes [0,1,0] rotation of plane around verti
...
@@ -27,10 +27,10 @@ rotaxes=[1,0,0]; %direction rotation axes [0,1,0] rotation of plane around verti
%viewpoint=[122,26];
%viewpoint=[122,26];
viewpoint
=
[
-
20
,
12
];
viewpoint
=
[
-
20
,
12
];
caxis_value_1
=
3300
;
%vs
%
caxis_value_1=3300;%vs
caxis_value_2
=
3900
;
%vs
%
caxis_value_2=3900;%vs
%
caxis_value_1=5700;%vp
caxis_value_1
=
5700
;
%vp
%
caxis_value_2=6700;%vp
caxis_value_2
=
6700
;
%vp
...
@@ -157,7 +157,7 @@ figure(fignum)
...
@@ -157,7 +157,7 @@ figure(fignum)
'EdgeColor'
,
'none'
,
...
'EdgeColor'
,
'none'
,
...
'DiffuseStrength'
,
.
8
)
'DiffuseStrength'
,
.
8
)
hold
on
hold
on
%h2 = slice(Z,X,Y,rot,zd3,xd3,yd3);set(h2,'FaceColor','interp',...
%
h2 = slice(Z,X,Y,rot,zd3,xd3,yd3);set(h2,'FaceColor','interp',...
% 'EdgeColor','none',...
% 'EdgeColor','none',...
% 'DiffuseStrength',.8)
% 'DiffuseStrength',.8)
...
@@ -209,9 +209,9 @@ hold on
...
@@ -209,9 +209,9 @@ hold on
hold
off
hold
off
xlabel
(
'
y
in m'
);
xlabel
(
'
z
in m'
);
ylabel
(
'x in m'
);
ylabel
(
'x in m'
);
zlabel
(
'
z
in m'
);
zlabel
(
'
y
in m'
);
set
(
gca
,
'xDir'
,
'reverse'
)
set
(
gca
,
'xDir'
,
'reverse'
)
set
(
gca
,
'yDir'
,
'normal'
)
set
(
gca
,
'yDir'
,
'normal'
)
set
(
gca
,
'zDir'
,
'normal'
)
set
(
gca
,
'zDir'
,
'normal'
)
...
@@ -227,7 +227,8 @@ hold on
...
@@ -227,7 +227,8 @@ hold on
set
(
gca
,
'Linewidth'
,
1.0
);
set
(
gca
,
'Linewidth'
,
1.0
);
colormap
(
'jet'
)
colormap
(
'jet'
)
cb
=
colorbar
(
'vert'
);
cb
=
colorbar
(
'vert'
);
xlabel
(
cb
,
'v_p'
);
xlabel
(
cb
,
'v_p in m/s'
);
%set(cb,'YTick',[5800:200:6600]); % v_p
set
(
gca
,
'FontSize'
,
14
);
set
(
gca
,
'FontSize'
,
14
);
%load('MyColormapsgrad','mycmap');
%load('MyColormapsgrad','mycmap');
...
@@ -241,4 +242,5 @@ view(viewpoint);
...
@@ -241,4 +242,5 @@ view(viewpoint);
% axis tight
% axis tight
box
on
box
on
exportfig
(
fignum
,
'toy_model_real_vp.eps'
,
'bounds'
,
'tight'
,
'color'
,
'rgb'
,
...
'preview'
,
'none'
,
'resolution'
,
200
,
'lockaxes'
,
1
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment