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
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
wxie2013
@wxie2013
OK. Thanks.
It would be really nice to have the disconnection in the future version.
Marcel Stimberg
@mstimberg
Yea, I agree. It's on a long list of things that would be nice to have, but we have only so much time...
wxie2013
@wxie2013
Thanks again
Marcel Stimberg
@mstimberg
you're welcome
Just in case you don't know: we also have a shiny new forum here: https://brian.discourse.group
wxie2013
@wxie2013
yeah. I'm in it now. By the way, can we still access the old google group? It's not in the Brian website anymore.
Marcel Stimberg
@mstimberg
Sure, the group is still around we just don't link to it anymore
wxie2013
@wxie2013
Thanks. The old group has lots of QAs for users to search around.
Marcel Stimberg
@mstimberg
Sure, we are not planning to delete it, we will probably block it for new posts at some point though
atefeasd
@atefeasd
Hi. I'm trying to get brian2, but my compiler stands for hours in this line "Running setup.py (path:/tmp/pip_build_asus/brian2/setup.py) egg_info for package brian2"
Marcel Stimberg
@mstimberg
Hi. I haven't seen this issue so far, but is it possible that you have old versions of pip or setuptools? You could try something like this to update them:
python -m pip install --upgrade pip setuptools wheel
atefeasd
@atefeasd
Thank you so much. You was right. I got brian
Marcel Stimberg
@mstimberg
great :+1:
wxie2013
@wxie2013
Is there a Brian2 example on the STDP from "Spike-timing-dependent
plasticityinbalancedrandomnetworks" by Morrison, et al. ?
atefeasd
@atefeasd
Hi. I'm so exciting to know if Brian can simulate a conductance based HH model? and how can I understand the details of such capacities of Brian?
Marcel Stimberg
@mstimberg
@wxie2013 I don't know of any Brian version of this paper. From a cursory look at the appendix it seems to use a quite inefficient version of implementing STDP (storing the spike history). Have a look at the 2008 Morrisson et al. paper where they review the trace-based approach to many different types of STDP rules. This is the approach that you'd typically use in Brian, and the approach that we use in the STDP examples.
Marcel Stimberg
@mstimberg
@atefeasd You can certainly simulate conductance-based HH models. Basically, you can simulate any kind of model that is described by differential equations. The COBAHH example uses the HH model. For more general introduction about how things work, have a look at the documentation and maybe our 2014 and 2019 publications.
wxie2013
@wxie2013
Thanks Marcel
André Jacques
@Havarem
Hi everybody. Is this the place to ask questions about how to use brian2? Or more about the development of brian2?
VigneswaranC
@Vigneswaran-Chandrasekaran
Hi, I think, better place would be https://brian.discourse.group/ and also you can refer to Brian documentation that may likely have the answers you're looking for ;)
wxie2013
@wxie2013
After defining a max_delay of a synapse, is it still necessary to specifically randomize the delay or Brian2 will do it automatically? For example:
S.max_delay = '10*ms'
S.delay = 'rand() * 10ms'
sholevs66
@sholevs66
Hi guys :) , I'm looking into implementing brian2 functionality on my own, so basically creating my own SNN simulation.
As of regarding the functionality of a simple single LIF neuron:
should I approximate the differential equation using some kind of numerical method? will simple Euler method be good enough?
Marcel Stimberg
@mstimberg
Hi @wxie2013 : not quite sure where max_delay is coming from, is this maybe a Brian 1 thing? In Brian2, heterogeneous delays are the default and you'll have to initialize them explicitly. So you only need your second line to set random delays between 0 and 10ms.
4 replies