by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 2019 17:07
    mstimberg commented #1047
  • Jan 30 2019 16:53
    thesamovar commented #1047
  • Jan 30 2019 15:40
    mstimberg commented #1047
  • Jan 30 2019 12:16
    daphn3cor closed #1048
  • Jan 30 2019 12:15
    daphn3cor commented #1048
  • Jan 30 2019 10:33
    mstimberg synchronize #1047
  • Jan 30 2019 10:33

    mstimberg on function_compiler_kwds

    Add .c and .pxd to the list of … Make Cython compilation quiet a… (compare)

  • Jan 30 2019 09:57
    mstimberg edited #1047
  • Jan 30 2019 09:56
    mstimberg synchronize #1047
  • Jan 30 2019 09:56

    mstimberg on function_compiler_kwds

    Document the new features for u… (compare)

  • Jan 30 2019 09:56
    mstimberg commented #1048
  • Jan 30 2019 07:59
    daphn3cor commented #1048
  • Jan 29 2019 16:30
    mstimberg commented #1048
  • Jan 29 2019 15:42
    daphn3cor opened #1048
  • Jan 29 2019 14:44
    mstimberg synchronize #1047
  • Jan 29 2019 14:44

    mstimberg on function_compiler_kwds

    Include external source files a… (compare)

  • Jan 29 2019 13:48
    mstimberg synchronize #1047
  • Jan 29 2019 13:48

    mstimberg on function_compiler_kwds

    Minor bug-fixes for new additio… Support external source files f… Add tests for functions with ex… (compare)

  • Jan 25 2019 17:34
    thesamovar commented #1047
  • Jan 25 2019 17:26
    mstimberg opened #1047
wesleypclawson
@wesleypclawson
I know it's late though =)
Marcel Stimberg
@mstimberg
This can sometimes happen if sympy transforms your equations in a way that generates new symbols...
Just checked, zoo indeed means something in sympy, apparently it is "complex infinity"
wesleypclawson
@wesleypclawson
oh great!
Marcel Stimberg
@mstimberg
Do you chose an integration algorithm (i.e. the method argument) or do you let Brian chose it?
wesleypclawson
@wesleypclawson
I normally use 'euler'
Marcel Stimberg
@mstimberg
Hmm, for euler sympy shouldn't do much to the equations...
wesleypclawson
@wesleypclawson
Although, the paper I'm working off is using rk2
Marcel Stimberg
@mstimberg
That should be fine as well, I would have expected this kind of problem only when trying to solve some complex equations analytically. If sympy thinks it managed to do it, but the solution includes "complex infinity"
The error message should include a pointer to the object that triggered the error
wesleypclawson
@wesleypclawson
I'll dig in
Marcel Stimberg
@mstimberg
(i.e. most likely the NeuronGroup)
wesleypclawson
@wesleypclawson
Thanks =)
I might be multiplying into some weird infinite space on accident. Originally, I used the ODE for the biexponential synapse proposed on readthedocs, but couldn't get it to act the way I thought it should. So I switched to having 'two' exponential currents that subtracted from one another. However, I ran into the input problem I posted on the email list. So I'm trying to switch back to the ODE again, but struggling haha
Marcel Stimberg
@mstimberg
good luck :)
wesleypclawson
@wesleypclawson
Appreciate it. Thanks for the hard work!
KHALID LODHI
@khalid17160
Hey, I want to plot instantaneous spiking rate plot using brian, please any suggestion
Marcel Stimberg
@mstimberg
Hi @khalid17160 . You can record the spike rate with a PopulationRateMonitor and then plot it with the usual matplotlib tools. To make things simpler, you can install the brian2tools package which comes with helpful plotting tools.
KHALID LODHI
@khalid17160
Hi @mstimberg , ok I will try through that method, thanks.
Also, I am trying to plot neucotical models, and I have to do synapse in it .

The simpli"ed cortical neuron model de-
veloped above was designed to be used in
network simulations. To accomplish this it is
necessary to introduce synaptic interconnections
among multiple model neurons. A simple way to
do this is through a di!erential equation formula-
tion of Rall's (1967, 1989) alpha function. This
requires adding the following two equations to
the four in eqn (5):
df
dt
" 1
q
syn
(!f#Hvs(<pre!))),
dS
dt
" 1
q
syn
(!S#f ), (8)
where
Hvs(<pre!))"
G
1 if <pre!)'0,
0 if <pre!))0.

<pre is the membrane potential of the pre-synaptic
neuron, ) is the threshold for a synaptic conduc-
atance change, and Hvs is the Heaviside step
function. With )"!0.1 (i.e. !10 mV), the
equations for f and S are only activated during
the peak of the pre-synaptic spike. The e!ect of
S on the membrane potential < of the post-
synaptic neuron is given through addition of the
term
!g
synS(<!Esyn)
to the d</dt equation in eqn (5).

This has a heavy side function, If anyone could help me out, how can i do that.
@mstimberg
@mstimberg
Marcel Stimberg
@mstimberg
Hi @khalid17160 , I'm having a hard time reading the text you posted, but a Heaviside function can be written as int(x > 0) – this will be 0 for x ≤ 0 and 1 for x > 0.
KHALID LODHI
@khalid17160
Hi @mstimberg , so I am trying to do synapse in brian2. There are 2 neuron which are model using the some eqn. Whenver there is a spike in first , the second one gets added an addition term(-gna(S-Esa) where S is a heavy side function).
Marcel Stimberg
@mstimberg
If it is to model a simple synapse, then you will most likely not use a Heaviside function in Brian. Please have a look at the tutorial and at the examples to see how synapses are modeled typically. If you still want to model the synaptic interaction as a continuous function, please have a look at "summed variables" and e.g. the gap junction example. You can use the int(...) approach that I outlined above as part of the equation describing the interaction between the neurons.
KHALID LODHI
@khalid17160
@mstimberg Thankyou, let me look over the example shared by you.
But actually there is a usage of heavy side function, which is used in the model eqn of second neuron
Jan Marker
@jangmarker
Hi! is there a way to print out (or write to text/HTML) a summary of the network configuration including all parameters with their values and run_regularly operations? I know that for NeuronGroup there is def _repr_html_(self): which provides a lot of information already - can I easily do this recursively for the whole network?
Marcel Stimberg
@mstimberg
Hi @jangmarker, at the moment there isn't a great solution for that. The good news is that @VigneswaranC is actually working on something that does this (and more) as part of his Google Summer of Code project which is coming to an end soon. It will be part of the brian2tools project. Later today I'll merge brian-team/brian2tools#39 and after that merge you'll be able to access/print out a dictionary representation of the full network. We plan have a prototype of a "human-readable" presentation next week.
Jan Marker
@jangmarker
@mstimberg hi! wow, the dictionary representation looks great! that might even be enough for my use case, but it's great to see that you're having this in mind and are making good progress, too. thank you :)
VigneswaranC
@Vigneswaran-Chandrasekaran
Glad that it helped :blush:
Marcel Stimberg
@mstimberg
Did you have a look at the restore/store functions? They reset everything, including synapses: https://brian2.readthedocs.io/en/stable/user/running.html#continuing-repeating-simulations
Huh, @wxie2013 , did you delete your question?
wxie2013
@wxie2013
Yeah, I really meant differently. Let me reformulate the question:
Some connections need to be removed under a certain condition. What I did is to modify the connection matrix and then use the S.connect() again to reflect the changes. What happens is that all the original connection are still there after the change is made. Is there a simple way to force the synapse to use the new matrix only?
in another word, using S.connect() multiple times made additive changes to the existing connections.
Marcel Stimberg
@mstimberg
Yes, connect is always adding new connections (which is often useful because it can be easier to do multiple connect statements to construct the full connectivity).
There is currently no way to delete existing connections (see brian-team/brian2#166)
You can either 1) Use store() before any connections are created and then go back to this state with restore()
or 2) keep the connections but make them inactive (e.g. by setting their weight to 0, but the details depend on your model)
wxie2013
@wxie2013
I see. restore() seems to restore all existing connection from different neuron groups.
Marcel Stimberg
@mstimberg
It restores the whole network to its state at the time of the store() call
wxie2013
@wxie2013
Is it possible to restore a connections between two specific groups?
I see.
Marcel Stimberg
@mstimberg
No, store/restore is always about the whole network
There's another option, but it is a bit cumbersome as well:
You can use:
syn = Synapses(...)
syn.connect(...)  # old connections
run(...)
new_syn = Synapses(...)
new_syn.connect(...)  # new connections
syn.active = False  # deactivate the old Synapses object
run(...)  # second run with new synapses