Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SBI MEA Model
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Doorn, Nina (UT-TNW)
SBI MEA Model
Commits
1c4e4ebb
Commit
1c4e4ebb
authored
3 months ago
by
Doorn, Nina (UT-TNW)
Browse files
Options
Downloads
Patches
Plain Diff
corrected saving location error
parent
db13e96d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MakeFigures.py
+8
-6
8 additions, 6 deletions
MakeFigures.py
with
8 additions
and
6 deletions
MakeFigures.py
+
8
−
6
View file @
1c4e4ebb
...
@@ -2,21 +2,23 @@ import pickle
...
@@ -2,21 +2,23 @@ import pickle
import
scipy.io
as
sio
import
scipy.io
as
sio
from
brian2
import
*
from
brian2
import
*
#specify where the images must be saved
# specify where the images must be saved
outputdir
=
'
/home/yourdir
'
outputdir
=
'
../Figures/
'
def
rasterplot
(
APs
,
savetitle
,
dt
,
start
,
stop
,
color
):
def
rasterplot
(
APs
,
savetitle
,
dt
,
start
,
stop
,
color
):
figure
(
figsize
=
(
8.5
,
2.2
),
dpi
=
300
)
figure
(
figsize
=
(
8.5
,
2.2
),
dpi
=
300
)
plt
.
plot
(
APs
[:,
1
]
*
dt
,
APs
[:,
0
],
'
|
'
,
markeredgecolor
=
color
,
ms
=
9
,
alpha
=
.
3
)
plt
.
plot
(
APs
[:,
1
]
*
dt
,
APs
[:,
0
],
'
|
'
,
markeredgecolor
=
color
,
ms
=
9
,
alpha
=
.
3
)
plt
.
hlines
([
-
0.3
,
0.7
,
1.7
,
2.7
,
3.7
,
4.7
,
5.7
,
6.7
,
7.7
,
8.7
,
9.7
,
10.7
],
-
3
,
stop
/
second
+
1300
,
colors
=
'
black
'
,
plt
.
hlines
([
-
0.3
,
0.7
,
1.7
,
2.7
,
3.7
,
4.7
,
5.7
,
6.7
,
7.7
,
8.7
,
9.7
,
10.7
],
-
3
,
stop
/
second
+
1300
,
linewidths
=
0.7
)
colors
=
'
black
'
,
linewidths
=
0.7
)
xlim
([
start
/
second
,
stop
/
second
])
xlim
([
start
/
second
,
stop
/
second
])
axis
(
"
off
"
)
axis
(
"
off
"
)
tight_layout
()
tight_layout
()
savefig
(
outputdir
+
savetitle
+
'
.png
'
,
dpi
=
300
,
bbox_inches
=
'
tight
'
)
savefig
(
outputdir
+
savetitle
+
'
.png
'
,
dpi
=
300
,
bbox_inches
=
'
tight
'
)
show
()
show
()
def
Marginaldiffplot
(
samples1
,
samples2
,
numparams
,
priorlimits
,
parlabels
,
savetitle
):
def
marginaldiffplot
(
samples1
,
samples2
,
numparams
,
priorlimits
,
parlabels
,
savetitle
):
for
ind
in
range
(
numparams
):
for
ind
in
range
(
numparams
):
fig
,
ax
=
plt
.
subplots
(
1
,
1
,
figsize
=
(
1.7
,
1.7
),
dpi
=
300
)
fig
,
ax
=
plt
.
subplots
(
1
,
1
,
figsize
=
(
1.7
,
1.7
),
dpi
=
300
)
vals
,
xvals
=
np
.
histogram
(
samples1
[:,
ind
],
bins
=
30
)
vals
,
xvals
=
np
.
histogram
(
samples1
[:,
ind
],
bins
=
30
)
...
@@ -28,6 +30,6 @@ def Marginaldiffplot(samples1, samples2, numparams, priorlimits, parlabels, save
...
@@ -28,6 +30,6 @@ def Marginaldiffplot(samples1, samples2, numparams, priorlimits, parlabels, save
ax
.
set_xlabel
(
parlabels
[
ind
])
ax
.
set_xlabel
(
parlabels
[
ind
])
ax
.
spines
[[
'
right
'
,
'
top
'
]].
set_visible
(
False
)
ax
.
spines
[[
'
right
'
,
'
top
'
]].
set_visible
(
False
)
tight_layout
()
tight_layout
()
plt
.
savefig
(
savetitle
+
parlabels
[
ind
]
+
'
.png
'
,
dpi
=
400
,
format
=
'
png
'
,
plt
.
savefig
(
outputdir
+
savetitle
+
parlabels
[
ind
]
+
'
.png
'
,
dpi
=
400
,
format
=
'
png
'
,
bbox_inches
=
"
tight
"
,
transparent
=
True
)
bbox_inches
=
"
tight
"
,
transparent
=
True
)
plt
.
show
()
plt
.
show
()
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