Skip to content

Commit

Permalink
fixup! Default behavior is for electrodes to input membrane current i…
Browse files Browse the repository at this point in the history
…nstead of electrode current
  • Loading branch information
jorblancoa committed Apr 10, 2024
1 parent 7d2d937 commit 4c1cc6d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions neurodamus/core/stimuli.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,12 @@ def __add__(self, other):
class CurrentSource(SignalSource):
_all_sources = []

def __init__(self, base_amp=0.0, *, delay=0, rng=None):
def __init__(self, base_amp=0.0, *, delay=0, rng=None, physical_electrode=False):
"""
Creates a new current source that injects a signal under IClamp
"""
super().__init__(base_amp, delay=delay, rng=rng)
super().__init__(base_amp, delay=delay, rng=rng,
represents_physical_electrode=physical_electrode)
self._clamps = set()
self._all_sources.append(self)

Expand Down Expand Up @@ -429,14 +430,16 @@ def attach_to(self, section, position=0.5):
class ConductanceSource(SignalSource):
_all_sources = []

def __init__(self, reversal=0.0, *, delay=.0, rng=None):
def __init__(self, reversal=0.0, *, delay=.0, rng=None, physical_electrode=False):
"""
Creates a new conductance source that injects a conductance by driving
the rs of an SEClamp at a given reversal potential.
reversal: reversal potential of conductance (mV)
"""
super().__init__(0.0, delay=delay, rng=rng) # set SignalSource's base_amp to zero
# set SignalSource's base_amp to zero
super().__init__(reversal, delay=delay, rng=rng,
represents_physical_electrode=physical_electrode)
self._reversal = reversal # set reversal from base_amp parameter in classmethods
self._clamps = set()
self._all_sources.append(self)
Expand Down

0 comments on commit 4c1cc6d

Please sign in to comment.