File: build_inputs.py

package info (click to toggle)
bmtk 1.0.6%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 79,724 kB
  • sloc: python: 30,132; javascript: 1,998; makefile: 35; sh: 33
file content (11 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
from bmtk.utils.reports.spike_trains import PoissonSpikeGenerator

psg = PoissonSpikeGenerator(population='LGN')
psg.add(
    node_ids=range(0, 100),
    firing_rate=8.0,    # we can also pass in a nonhomoegenous function/array
    times=(0.0, 2.0)    # Firing starts at 0 s up to 3 s
)

psg.to_sonata('inputs/lgn_spikes.poisson.h5')
psg.to_csv('inputs/lgn_spikes.poisson.csv')