Skip to content

Commit

Permalink
Automatically pass radius and length to the channels
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Feb 3, 2024
1 parent 58b0d86 commit 4a74630
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jaxley/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@ def _step_channels_state(
channel_params = {}
for p in channel_param_names:
channel_params[p] = params[p][indices]
channel_params["radius"] = params["radius"][indices]
channel_params["length"] = params["length"][indices]
channel_params["axial_resistivity"] = params["axial_resistivity"][indices]

channel_states = {}
for s in channel_state_names:
channel_states[s] = states[s][indices]
Expand Down Expand Up @@ -608,6 +612,10 @@ def _channel_currents(
channel_params = {}
for p in channel_param_names:
channel_params[p] = params[p][indices]
channel_params["radius"] = params["radius"][indices]
channel_params["length"] = params["length"][indices]
channel_params["axial_resistivity"] = params["axial_resistivity"][indices]

channel_states = {}
for s in channel_state_names:
channel_states[s] = states[s][indices]
Expand Down

0 comments on commit 4a74630

Please sign in to comment.