Why are units to current injection volts?

31 views
Skip to first unread message

Russell Jarvis

unread,
Mar 27, 2022, 6:58:51 PM3/27/22
to Brian

Hi Brian2 community.

I have a classic neuron simulation for a leaky integrate and fire neuron borrowed from elsewhere on the internet.

I am just wondering why the units to the input current injection must be specified in Volts and not pA?

I am trying to teach Brian2 to students and I anticipate, that the units might raise questions I can’t find the answer to.

The code below comes from these two places:
https://brian2.readthedocs.io/en/stable/introduction/brian1_to_2/library.html
https://colab.research.google.com/github/DiGyt/neuropynamics/blob/master/notebooks/Single_neurons.ipynb#scrollTo=-BMn7Gi5EWGn

    eqs = '''   
    dv/dt = ((El - v) + I)/tau : volt
    I : volt 
    '''

I would like I : amp, but this causes an error.

    neuron = create_lif_neuron(v_thresh)       # calls ODE above
    # Set neuron parameters
    tau = tau*ms; # correct unit
    El = -e_leak*mV # correct unit
    # Start monitoring the neurons state
    statemon = StateMonitor(source = neuron, variables = ['v', 'I'], record = 0)
    # Start monitoring spiking behavior
    spikemon = SpikeMonitor(source = neuron, variables= 'v')
    # Run neuron simulation for 100ms without input

Again the current has units mV? How can I explain this?


    neuron.I = 0 * mV
    run(100*ms)
    # Set input current to neuron
    neuron.I = I_ext * mV
    # Run 500ms with input
    run(500*ms)
    # Remove input current to neuron
    neuron.I = 0 * mV
    # Run neuron simulation for 100ms without input
    run(100*ms)

Thanks for any help, I greatly appreciate it.

Russell.

Reply all
Reply to author
Forward
0 new messages