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

Commit 9de5202

Browse files
author
Jaquier Aurélien Tristan
committed
Add LFPStimulus base class for lfp stimuli
1 parent 1dbebd4 commit 9de5202

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

bluepyopt/ephys/protocols.py

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

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

bluepyopt/ephys/stimuli.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class Stimulus(object):
3232
pass
3333

3434

35+
class LFPStimulus(Stimulus):
36+
37+
"""Base class for stimulus supporting LFPy cells."""
38+
39+
def instantiate():
40+
"""Run stimulus"""
41+
raise NotImplementedError
42+
43+
3544
class NrnCurrentPlayStimulus(Stimulus):
3645

3746
"""Current stimulus based on current amplitude and time series"""
@@ -330,7 +339,7 @@ def __str__(self):
330339
self.location)
331340

332341

333-
class LFPySquarePulse(Stimulus):
342+
class LFPySquarePulse(LFPStimulus):
334343

335344
"""Square pulse current clamp injection"""
336345

0 commit comments

Comments
 (0)