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
LNaumann
@LNaumann
Probably is the same as setting directory=None in set_device?
As far as I remember I chose to do it this way because on the cluster I'm running simulations in parallel so I would have to specify different output files manually such that they don't overwrite each other. Correct me if I'm wrong.
Marcel Stimberg
@mstimberg
This is perfectly fine in general, but it might actually be the reason for your problems: /tmp is often on a different partition with less disk space, or it might even be a virtual disk in RAM (which is great for speed but less great if you fill it up with a lot of data which is also held in RAM).
LNaumann
@LNaumann
Oh ok that would make a lot of sense. I actually do have another tmp dir for every run which I could just use instead of /tmp.
I will rerun the simulations with that directory and see if it finishes - although this usually takes 1-2 days. I still think that 4GB for the PopulationRateMonitor alone is quite a lot though.
Marcel Stimberg
@mstimberg
There's certainly a lot of room for improvement here. There are some easy things to fix (use the default_float_dtype for storing the time and using it as a default for the rate) that would help a bit, and then of course it would be very useful to have support for binning during the simulation.
One thing that could be improved for all simulators would be to be smarter about storing (or rather not storing) the time points
*simulators --> monitors
wesleypclawson
@wesleypclawson
Is there a typical culprit when the error is KeyError: 'The identifier "zoo" could not be resolved.'
Marcel Stimberg
@mstimberg
Well, it means that you refer to "zoo" somewhere, but there is no variable/parameter called "zoo" in your equations, and there is neither a global constant (i.e. a scalar variable defined somewhere in the Python script) of that name
wesleypclawson
@wesleypclawson
That's what I thought too - but "zoo" doesn't exist in my code. A ctrl+F places it only in the error message. Is 'zoo' a placeholder for something internally?
Marcel Stimberg
@mstimberg
Oh, that changes things!
wesleypclawson
@wesleypclawson
I'd be happy to send you my code if you want
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?