bmtk icon indicating copy to clipboard operation
bmtk copied to clipboard

Allow BMTK to load spike input times with higher temporal resolution than dt

Open pgleeson opened this issue 6 years ago • 0 comments

e.g. if this value for dt: https://github.com/AllenInstitute/sonata/blob/ad1d46a97029749aea835f9f016bfa1ccba1f258/examples/300_pointneurons/simulation_config.json#L10

is changed to a more realistic 0.01 ms, the following error occurs:

...
2019-04-29 19:27:47,332 [INFO] Setting up output directory
2019-04-29 19:27:47,332 [INFO] Building cells.
2019-04-29 19:27:47,343 [INFO] Building recurrent connections
2019-04-29 19:27:47,468 [INFO] Build virtual cell stimulations for external_spike_trains
Traceback (most recent call last):
  File "run_pointnet.py", line 18, in <module>
    main('config.json')
  File "run_pointnet.py", line 11, in main
    sim = pointnet.PointSimulator.from_config(configure, graph)
  File "/home/padraig/anaconda2/lib/python2.7/site-packages/bmtk-0.0.7-py2.7.egg/bmtk/simulator/pointnet/pointsimulator.py", line 230, in from_config
    graph.add_spike_trains(spikes, node_set)
  File "/home/padraig/anaconda2/lib/python2.7/site-packages/bmtk-0.0.7-py2.7.egg/bmtk/simulator/pointnet/pointnetwork.py", line 155, in add_spike_trains
    nest.SetStatus([nest_id], {'spike_times': np.array(spike_trains.get_spikes(node_id))})
  File "/home/padraig/opt/nest/lib/python2.7/site-packages/nest/lib/hl_api_helper.py", line 230, in stack_checker_func
    return f(*args, **kwargs)
  File "/home/padraig/opt/nest/lib/python2.7/site-packages/nest/lib/hl_api_info.py", line 199, in SetStatus
    sr('Transpose { arrayload pop SetStatus } forall')
  File "/home/padraig/opt/nest/lib/python2.7/site-packages/nest/__init__.py", line 117, in catching_sli_run
    raise _kernel.NESTError(encode(errorstring))
pynestkernel.NESTError: BadProperty in SetStatus_id: Setting status of a 'spike_generator' with GID 301: spike_generator: Time point 0.384322 is not representable in current resolution.

pgleeson avatar Apr 29 '19 18:04 pgleeson