Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multi-area-model
Manage
Activity
Members
Labels
Plan
Issues
7
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IAS-6
multi-area-model
Commits
cb12b23d
Commit
cb12b23d
authored
6 years ago
by
Maximilian Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Remove dependence of seaborn from SchueckerSchmidt2017 scripts
parent
c3a7c534
No related branches found
No related tags found
1 merge request
!1
Add all necessary files for the multi-area model
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
figures/SchueckerSchmidt2017/stabilization.py
+2
-3
2 additions, 3 deletions
figures/SchueckerSchmidt2017/stabilization.py
figures/SchueckerSchmidt2017/utils.py
+2
-5
2 additions, 5 deletions
figures/SchueckerSchmidt2017/utils.py
with
4 additions
and
8 deletions
figures/SchueckerSchmidt2017/stabilization.py
+
2
−
3
View file @
cb12b23d
...
...
@@ -5,8 +5,6 @@ from multiarea_model import MultiAreaModel
from
multiarea_model.multiarea_helpers
import
create_vector_mask
from
multiarea_model.stabilize
import
stabilize
import
utils
import
seaborn
as
sns
cp
=
sns
.
color_palette
()
"""
Initialization
...
...
@@ -68,7 +66,8 @@ for iteration in [1, 2, 3, 4, 5]:
# Scan parameter space to find a good approximation of the
# critical parameter value where the model crosses the
# separatrix for the initial condition of zero rates
if
iteration
<
5
:
# For iteration 5, we just analyze the behavior without performing the stabilization
if
iteration
<
5
:
# For iteration 5, we just analyze the behavior without performing the stabilization
data
[
iteration
]
=
utils
.
compute_iteration
(
7
,
fac_nu_ext_5E_list
,
theory_params
,
M_base
,
threads
=
THREADS
)
else
:
...
...
This diff is collapsed.
Click to expand it.
figures/SchueckerSchmidt2017/utils.py
+
2
−
5
View file @
cb12b23d
...
...
@@ -53,15 +53,12 @@ def velocity_peaks(time, result, threshold=0.05):
def
plot_iteration
(
results
,
theory_params
,
threshold
=
0.05
,
full
=
True
):
import
seaborn
as
sns
traj
=
np
.
mean
(
results
,
axis
=
1
)
if
full
:
ind
=
list
(
range
(
0
,
len
(
traj
)))
else
:
i
=
np
.
argmax
(
np
.
diff
(
traj
[:,
-
1
]))
ind
=
[
i
,
i
+
1
]
cp
=
sns
.
color_palette
(
n_colors
=
len
(
ind
))
time
=
np
.
arange
(
0.
,
theory_params
[
'
T
'
],
theory_params
[
'
dt
'
])
fig
=
pl
.
figure
()
...
...
@@ -76,13 +73,13 @@ def plot_iteration(results, theory_params, threshold=0.05, full=True):
ax
=
fig
.
add_subplot
(
122
)
for
n
,
i
in
enumerate
(
ind
):
d_nu
,
minima
=
velocity_peaks
(
time
,
results
[
i
],
threshold
=
threshold
)
ax
.
plot
(
time
[:
-
1
],
d_nu
,
color
=
cp
[
n
]
)
ax
.
plot
(
time
[:
-
1
],
d_nu
)
if
not
full
:
ax
.
vlines
(
time
[
minima
],
1e-6
,
1e0
,
linestyles
=
'
dashed
'
,
color
=
cp
[
n
]
)
color
=
'
k
'
)
ax
.
set_yscale
(
'
Log
'
)
pl
.
show
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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