Skip to content

Commit

Permalink
Merge pull request #19 from PKU-NIP-Lab/develop
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
chaoming0625 committed Nov 29, 2020
2 parents d8ce6cd + a322a6a commit ce5f809
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ Neurodynamics simulation
</table>


More neuron examples please see `neurons <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/neurons>`_.
More neuron examples please see `examples/neurons <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/neurons>`_.

More synapse examples please see `synapses <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/synapses>`_.
More synapse examples please see `examples/synapses <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/synapses>`_.

More network examples please see `networks <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/networks>`_.
More network examples please see `examples/networks <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/networks>`_.


Neurodynamics analysis
Expand All @@ -173,7 +173,7 @@ Neurodynamics analysis
<tr>
<td border="0" width="30%">
<a href="examples/dynamics_analysis/phase_portrait_of_NaK_model.py">
<img src="docs/images/phase_plane_analysis.png">
<img src="docs/images/phase_plane_analysis1.png">
</a>
</td>
<td border="0" valign="top">
Expand Down Expand Up @@ -210,6 +210,6 @@ Neurodynamics analysis


More examples please see
`dynamics analysis <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/dynamics_analysis>`_.
`examples/dynamics_analysis <https://github.com/PKU-NIP-Lab/BrainPy/tree/master/examples/dynamics_analysis>`_.


Binary file removed docs/images/phase_plane_analysis.png
Binary file not shown.
Binary file added docs/images/phase_plane_analysis1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 13 additions & 14 deletions examples/dynamics_analysis/phase_portrait_of_NaK_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import brainpy as bp
import brainpy.numpy as np
from brainpy.dynamics import PhasePortraitAnalyzer

bp.profile.set(dt=0.01)

Expand Down Expand Up @@ -113,16 +112,16 @@ def update(ST, _t_):

NaK_neuron = get_NaK_model()

group = bp.NeuGroup(NaK_neuron, 1, monitors=['V'])
group.run(50., inputs=('ST.inp', 50.))
bp.visualize.line_plot(group.mon.ts, group.mon.V, ylabel='Potential (mV)', show=True)

pp = PhasePortraitAnalyzer(model=NaK_neuron,
target_vars=OrderedDict(V=[-90, 20], n=[0., 1.]),
fixed_vars={'input': 50., 'inp': 50.})
pp.plot_nullcline()
pp.plot_vector_filed()
pp.plot_fixed_point()
pp.plot_trajectory([(-10, 0.2, 100.), (-80, 0.4, 100.)],
show=True)

# group = bp.NeuGroup(NaK_neuron, 1, monitors=['V'])
# group.run(50., inputs=('ST.inp', 50.))
# bp.visualize.line_plot(group.mon.ts, group.mon.V, ylabel='Potential (mV)', show=True)

analyzer = bp.PhasePortraitAnalyzer(
model=NaK_neuron,
target_vars=OrderedDict(V=[-90, 20], n=[0., 1.]),
fixed_vars={'input': 50., 'inp': 50.})
analyzer.plot_nullcline()
analyzer.plot_vector_filed()
analyzer.plot_fixed_point()
analyzer.plot_trajectory([(-10, 0.2, 100.), (-80, 0.4, 100.)],
show=True)

0 comments on commit ce5f809

Please sign in to comment.