Skip to content

Targeting specific neurons with external current using add_current_source in PyGeNN #664

Discussion options

You must be logged in to vote

Hi there,

Like most things in GeNN, the solution is to create a customised model to meet your needs - in this case a current source model. Assuming you mean Poisson-distributed inputs like those provided by the built in PoissonExp model, the easiest thing to do is create a modified version of that model (copy-pasting from https://github.com/genn-team/genn/blob/master/include/genn/genn/currentSourceModels.h#L107-L128) where Init is a variable (can differ across neurons) rather than a parameter (the same across all neurons):

from pygenn import create_current_source_model

cs_model = create_current_source_model(
    "cs_model",
    params=["weight", "tauSyn", "rate"],
    derived_params=[("E…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bakawulusai
Comment options

Answer selected by bakawulusai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants