File: plot_output.py

package info (click to toggle)
bmtk 1.1.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 204,040 kB
  • sloc: python: 37,064; javascript: 1,998; makefile: 42; sh: 33
file content (19 lines) | stat: -rw-r--r-- 600 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os, sys
import matplotlib.pyplot as plt

from bmtk.analyzer.compartment import plot_traces
from bmtk.analyzer.spike_trains import plot_raster


def plot_results(config_file):
    plot_raster(config_file=config_file, show=False, population='sources')
    plot_raster(config_file=config_file, show=False, population='targets')
    plot_traces(config_file=config_file, report_name='membrane_potential')
    plt.show()


if __name__ == '__main__':
    if os.path.basename(__file__) != sys.argv[-1]:
        plot_results(sys.argv[-1])
    else:
        plot_results('config.simulation_iclamp.json')