Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sc3_cwl
Manage
Activity
Members
Labels
Plan
Issues
0
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
Workflows
sc3_cwl
Commits
f778dc8f
Commit
f778dc8f
authored
2 years ago
by
Arnau Manasanch
Browse files
Options
Downloads
Patches
Plain Diff
added timestamps to output files to avoid overwriting
parent
1cb17ab8
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
tools/plot_results/plot_results.py
+5
-2
5 additions, 2 deletions
tools/plot_results/plot_results.py
with
5 additions
and
2 deletions
tools/plot_results/plot_results.py
+
5
−
2
View file @
f778dc8f
...
...
@@ -15,6 +15,7 @@ import numpy as np
import
json
import
os
from
IPython.display
import
Video
from
datetime
import
datetime
def
sc3_plot_results
(
results_folder
,
output_dir_name
,
bvals
,
run_sim
,
cut_transient
,
simname
):
...
...
@@ -97,7 +98,8 @@ def plot_traces(bvals, time_s, FR_exc, FR_inh, Ad_exc, simname, output_dir_name)
ax
.
set_xlim
([
1
,
3
])
ax
.
set_xticks
([
1
,
1.5
,
2
,
2.5
,
3
])
plt
.
tight_layout
()
plt
.
savefig
(
output_dir_name
+
'
/fig_traces.png
'
)
timestamp
=
int
(
datetime
.
now
().
timestamp
())
# timestamp to avoid overwriting files in bucket
plt
.
savefig
(
f
'
{
output_dir_name
}
/fig_traces_
{
timestamp
}
.png
'
)
def
plot_spectral_densities
(
time_s
,
simname
,
bvals
,
FR_exc
,
FR_inh
,
output_dir_name
):
"""
...
...
@@ -149,7 +151,8 @@ def plot_spectral_densities(time_s, simname, bvals, FR_exc, FR_inh, output_dir_n
axes
[
simnum
].
set_title
(
f
'
b =
{
bvals
[
simnum
]
}
pA
\n
{
simname
[
simnum
]
}
'
)
plt
.
tight_layout
()
plt
.
savefig
(
output_dir_name
+
'
/fig_psd.png
'
)
timestamp
=
int
(
datetime
.
now
().
timestamp
())
# timestamp to avoid overwriting files in bucket
plt
.
savefig
(
f
'
{
output_dir_name
}
/fig_psd_
{
timestamp
}
.png
'
)
...
...
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