Skip to content

Commit

Permalink
Add option to plot membrane cap current
Browse files Browse the repository at this point in the history
  • Loading branch information
campagnola committed Sep 20, 2022
1 parent 75ad332 commit 12b2163
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion neurodemo/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def __init__(self, multiprocessing=False):
dict(name='Speed', type='float', value=self.runner.speed, limits=[0.001, 10], step=0.5, minStep=0.001, dec=True),
dict(name="Plot Duration", type='float', value=1.0, limits=[0.1, 10], suffix='s', siPrefix=True, step=0.2),
dict(name='Temp', type='float', value=self.sim.temp, limits=[0., 41.], suffix='C', step=1.0),
dict(name='Capacitance', type='float', value=self.neuron.cap, limits=[0.1e-12, 1000.e-12], suffix='F', siPrefix=True, dec=True),
dict(name='Capacitance', type='float', value=self.neuron.cap, limits=[0.1e-12, 1000.e-12], suffix='F', siPrefix=True, dec=True, children=[
dict(name='Plot Current', type='bool', value=False),
]),
dict(name='Ions', type='group', children=self.ion_concentrations),
dict(name='Cell Schematic', type='bool', value=True, children=[
dict(name='Show Circuit', type='bool', value=False),
Expand Down Expand Up @@ -227,6 +229,11 @@ def params_changed(self, root, changes):
ion.updateErev(self.sim.temp)
elif param is self.params.child('Capacitance'):
self.neuron.cap = val
elif param is self.params.child('Capacitance', 'Plot Current'):
if val:
self.add_plot('soma.I', "Membrane Capactiance", 'I')
else:
self.remove_plot('soma.I')
elif param is self.params.child('Preset'):
self.load_preset(val)
elif param is self.params.child('Cell Schematic'):
Expand Down

0 comments on commit 12b2163

Please sign in to comment.