Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit d9bb8e5

Browse files
author
Jaquier Aurélien Tristan
committed
Merge branch 'lfpy' of https://github.com/alejoe91/BluePyOpt into small-changes
2 parents 79c9fc5 + c192c6a commit d9bb8e5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

bluepyopt/ephys/protocols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def instantiate(self, sim=None, cell_model=None):
288288

289289
for stimulus in self.stimuli:
290290
if isinstance(stimulus, LFPStimulus):
291-
stimulus.instantiate(lfpy_cell=cell_model.lfpy_cell)
291+
stimulus.instantiate(sim=sim, lfpy_cell=cell_model.lfpy_cell)
292292
else:
293293
stimulus.instantiate(sim=sim, icell=cell_model.icell)
294294

bluepyopt/ephys/stimuli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class LFPStimulus(Stimulus):
3636

3737
"""Base class for stimulus supporting LFPy cells."""
3838

39-
def instantiate(self, lfpy_cell=None):
39+
def instantiate(self, sim=None, lfpy_cell=None):
4040
"""Run stimulus"""
4141
raise NotImplementedError
4242

@@ -366,7 +366,7 @@ def __init__(self,
366366
self.total_duration = total_duration
367367
self.iclamp = None
368368

369-
def instantiate(self, lfpy_cell=None):
369+
def instantiate(self, sim=None, lfpy_cell=None):
370370
"""Run stimulus"""
371371
import LFPy
372372
from .locations import NrnSomaDistanceCompLocation

bluepyopt/tests/test_ephys/test_stimuli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ def test_LFPySquarePulse_init():
248248
def test_LFPySquarePulse_instantiate():
249249
"""ephys.stimuli: test if LFPySquarePulse instantiate works"""
250250

251-
nrn_sim = ephys.simulators.NrnSimulator()
251+
lfpy_sim = ephys.simulators.LFPySimulator()
252252
dummy_cell = dummycells.DummyLFPyCellModel1()
253-
_, lfpycell = dummy_cell.instantiate(sim=nrn_sim)
253+
_, lfpycell = dummy_cell.instantiate(sim=lfpy_sim)
254254

255255
soma_loc = ephys.locations.NrnSeclistCompLocation(
256256
name=None,
@@ -266,8 +266,8 @@ def test_LFPySquarePulse_instantiate():
266266
total_duration=300
267267
)
268268

269-
stim.instantiate(lfpy_cell=lfpycell)
270-
nrn_sim.run(stim.total_duration)
269+
stim.instantiate(sim=lfpy_sim, lfpy_cell=lfpycell)
270+
lfpy_sim.run(stim.total_duration)
271271

272-
stim.destroy(sim=nrn_sim)
273-
dummy_cell.destroy(sim=nrn_sim)
272+
stim.destroy(sim=lfpy_sim)
273+
dummy_cell.destroy(sim=lfpy_sim)

0 commit comments

Comments
 (0)