Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial on how to simulate rate-based networks #530

Closed
michaeldeistler opened this issue Nov 25, 2024 · 0 comments · Fixed by #531
Closed

Tutorial on how to simulate rate-based networks #530

michaeldeistler opened this issue Nov 25, 2024 · 0 comments · Fixed by #531

Comments

@michaeldeistler
Copy link
Contributor

michaeldeistler commented Nov 25, 2024

This probably does not warrant a full tutorial, but maybe an FAQ?

import jaxley as jx
from jaxley.channels import Leak
from jaxley.connect import fully_connect
from jaxley.synapses import TanhRateSynapse

num_cells = 100
cell = jx.Cell()  # Create a point-neuron.
net = jx.Network([cell for _ in range(num_cells)])  # Assemble into a network.

net.insert(Leak())  # Add a leak to achieve dynamics like ```C * dV/dt = -gLeak * (ELeak - V)```
net.set("Leak_eLeak", 0.0)  # Center the dynamics around zero.

fully_connect(net.cell("all"), net.cell("all"), TanhRateSynapse())

net.set("capacitance", 2.0)  # Change the capacitance (i.e. the time constant).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant