Commit 320a45f
committed
Fix StepCurrentSource.set_parameters() after simulation run (issue NeuralEnsemble#759)
When set_parameters() was called after sim.run(), _check_step_times() used
only the timestep (resolution) as the minimum usable amplitude time, ignoring
the current simulation time. This produced amplitude_times less than NEST's
biological time, causing NEST to silently ignore the current injection.
Fix uses state.t_kernel + resolution (NEST biological time + one step) as the
threshold, ensuring the adjusted time is always strictly greater than the
current biological time. At t=0 the behaviour is identical to before.1 parent e0742a6 commit 320a45f
2 files changed
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
662 | 692 | | |
663 | 693 | | |
664 | 694 | | |
| |||
0 commit comments