Skip to content

Commit

Permalink
Removed traling whitespaces and double newline at eof
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin De Schepper committed Mar 20, 2021
1 parent 3d996e5 commit 046fab4
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions share/lib/python/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,12 @@ def init():
Use h.finitialize() instead, which allows you to specify the membrane potential
to initialize to; via e.g. h.finitialize(-65)
By default, the units used by h.finitialize are in mV, but you can be explicit using
NEURON's unit's library, e.g.
.. code-block:: python
from neuron.units import mV
h.finitialize(-65 * mV)
Expand All @@ -427,28 +427,28 @@ def run(tstop):
function run(tstop)
Run the simulation (advance the solver) until tstop [ms]
`h.run()` and `h.continuerun(tstop)` are more powerful solutions defined in the `stdrun.hoc` library.
** This function exists for historical purposes. Use in new code is not recommended. **
For running a simulation, consider doing the following instead:
Begin your code with
.. code-block:: python
from neuron import h
from neuron.units import ms, mV
h.load_file('stdrun.hoc')
Then when it is time to initialize and run the simulation:
.. code-block:: python
h.finitialize(-65 * mV)
h.continuerun(100 * ms)
where the initial membrane potential and the simulation run time are adjusted as appropriate
for your model.
Expand Down Expand Up @@ -746,7 +746,7 @@ class _RangeVarPlot(_WrapperPlot):
fig.show()
pyplot.show()
# plotnine/ggplot
p9.ggplot() + r.plot(p9)
Expand Down Expand Up @@ -1010,10 +1010,10 @@ def mark(self, segment, marker='or', **kwargs):
if secs is None:
secs = list(h.allsec())


if variable is None:
kwargs.setdefault('color', 'black')

data = []
for sec in secs:
xs = [sec.x3d(i) for i in range(sec.n3d())]
Expand Down Expand Up @@ -1342,7 +1342,7 @@ def _nrnpy_rvp_pyobj_callback(f):
f_type = str(type(f))
if f_type not in ("<class 'neuron.rxd.species.SpeciesOnRegion'>", "<class 'neuron.rxd.species.Species'>"):
return f

# if we're here, f is an rxd variable, and we return a function that looks
# up the weighted average concentration given an x and h.cas()
# this is not particularly efficient so it is probably better to use this for
Expand Down Expand Up @@ -1382,4 +1382,3 @@ def clear_gui_callback():
nrnpy_set_gui_callback(None)
except:
pass

0 comments on commit 046fab4

Please sign in to comment.