Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
a9ae50d2
Commit
a9ae50d2
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
correction of a bug
parent
68091c71
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/plot/plot_ballooning.m
+19
-10
19 additions, 10 deletions
matlab/plot/plot_ballooning.m
with
19 additions
and
10 deletions
matlab/plot/plot_ballooning.m
+
19
−
10
View file @
a9ae50d2
function
[
FIG
]
=
plot_ballooning
(
data
,
options
)
FIG
.
fig
=
figure
;
iplot
=
1
;
[
~
,
it
]
=
min
(
abs
(
data
.
Ts3D
-
options
.
time_2_plot
));
[
~
,
it0
]
=
min
(
abs
(
data
.
Ts3D
-
options
.
time_2_plot
(
1
)));
[
~
,
it1
]
=
min
(
abs
(
data
.
Ts3D
-
options
.
time_2_plot
(
end
)));
[
~
,
ikyarray
]
=
min
(
abs
(
data
.
ky
-
options
.
kymodes
));
phi_real
=
(
real
(
data
.
PHI
(:,:,:,
it
))
);
phi_imag
=
(
imag
(
data
.
PHI
(:,:,:,
it
))
);
phi_real
=
mean
(
real
(
data
.
PHI
(:,:,:,
it
0
:
it1
)),
4
);
phi_imag
=
mean
(
imag
(
data
.
PHI
(:,:,:,
it
0
:
it1
)),
4
);
% Apply baollooning tranform
for
iky
=
ikyarray
dims
=
size
(
phi_real
);
phib_real
=
zeros
(
dims
(
2
)
*
dims
(
3
)
,
1
);
if
options
.
sheared
idx
=
-
Nkx
:
1
:
Nkx
;
ikxlim
=
dims
(
2
);
else
idx
=
0
;
ikxlim
=
1
;
end
phib_real
=
zeros
(
ikxlim
*
dims
(
3
)
,
1
);
phib_imag
=
phib_real
;
b_angle
=
phib_real
;
for
ikx
=
1
:
dims
(
2
)
for
ikx
=
1
:
ikxlim
start_
=
(
ikx
-
1
)
*
dims
(
3
)
+
1
;
end_
=
ikx
*
dims
(
3
);
phib_real
(
start_
:
end_
)
=
phi_real
(
iky
,
ikx
,:);
...
...
@@ -20,8 +30,7 @@ function [FIG] = plot_ballooning(data,options)
% Define ballooning angle
Nkx
=
numel
(
data
.
kx
)
-
1
;
coordz
=
data
.
z
;
idx
=
-
Nkx
:
1
:
Nkx
;
for
ikx
=
1
:
dims
(
2
)
for
ikx
=
1
:
ikxlim
for
iz
=
1
:
dims
(
3
)
ii
=
dims
(
3
)
*
(
ikx
-
1
)
+
iz
;
b_angle
(
ii
)
=
coordz
(
iz
)
+
2
*
pi
*
idx
(
ikx
);
...
...
@@ -47,8 +56,8 @@ function [FIG] = plot_ballooning(data,options)
legend
(
'real'
,
'imag'
,
'norm'
)
xlabel
(
'$\chi / \pi$'
)
ylabel
(
'$\phi_B (\chi)$'
);
title
([
'
k
y='
,
sprintf
(
'%1.1f'
,
data
.
ky
(
iky
)),
...
',t
=
'
,
sprintf
(
'%1.1f'
,
data
.
Ts3D
(
it
))]);
title
([
'
$k_
y='
,
sprintf
(
'%1.1f'
,
data
.
ky
(
iky
)),
...
',t
_{avg}\in [
'
,
sprintf
(
'%1.1f'
,
data
.
Ts3D
(
it
0
))
,
','
,
sprintf
(
'%1.1f'
,
data
.
Ts3D
(
it1
)),
']$'
]);
iplot
=
iplot
+
1
;
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment