Comments (7)
Hello,
1: That should be valid. In fact, my tests with this setup do not result in errors. Could you maybe detail the error you encounter or link your model?
2: What do you mean exactly? You should, with the latest versions, be able to check buffers for their value in standard if constructs. Current buffers are effectively typed as pA and spike buffers as real. @DimitriPlotnikov might have more insight into this.
from nestml.
@AliceGem Could you elaborate on how and why you use the fact that a current buffer is empty or not as a condition, so that we can make sure this is implemented sensibly in NESTML?
from nestml.
@PTraeder Thank you, the problem with the first question is solved, it works now and the error I got was not linked with the initialization.
@PTraeder and @ingablundell thanks for your answer! I'll explain more in detail: I need to add a condition in the update block related to the external current (which is saved in the current buffer right?), so that if there has been an external input in the last simulation steps, I execute different operations. For example:
update: if currents.isEmpty(): # I would need a function here to check the content of the buffer I_shape = 0 else: I_shape *= R end
where currents
is the current buffer, I_shape
is a state variable, and R
a parameter. I want the I_shape
variable to be zero if there has not been any external input current for the last 50 simulation steps e.g..
And related to this, the current buffer saves the values of current for a certain interval of simulation steps? Or it is updated at each spike?
from nestml.
@AliceGem
I'm a bit confused. I_shape
is not a shape (an explicit function which is defined in equations
and describes the postsynaptic current), but a state variable which accidentally called shape
?
Regarding your actual question:
What you can do know:
if current > 0: # interpret this as if there is incoming events greater then 0
I_shape = 0
else:
I_shape *= R
end
from nestml.
@DimitriPlotnikov @ingablundell R
is a constant defined in the parameters
block and I_shape
is a spike-triggered current which gets updated at each spike and decays exponentially at each time step. It is called shape because at the beginning I defined it as a shape but I got an error when updating it in the update
block (Shapes may only be used as parameters to either 'curr_sum()' or 'cond_sum()'.. Code generation was canceled
). So now I defined it as a state variable without changing the name. Then I_shape
is provided as an input to the neuron as an external current, not a synaptic one for which we would need the convolution with spikes. I'll try your solution if current > 0:
for the incoming current and let you know! Thanks a lot!
from nestml.
@AliceGem I still don't quite understand what you are trying to do. Is I_shape supposed to be your synaptic current. Is R some kind of constant or does it have something to do with the current.
What we would normaly do is declare some kind of "shape" function which is time dependent. For instance the "alpha" function and then define synaptic input as the convolution of the shape function with the values in the current buffer. I am not quite sure if your "I_shape" refers to what our shape function is or to what our convolution of the shape function with the values in the current buffer.
from nestml.
Closing as this will be covered by #588.
from nestml.
Related Issues (20)
- Enhance runtime performance for plastic synapses
- Improve nomenclature for tests
- Fix scaling for delta pulses
- Menu not accessible in mobile version of documentation HOT 1
- Symbol resolution bug for locally defined variables
- Error with `random_normal()` function HOT 1
- New way of handling convolutions HOT 1
- Sender_id information available in the update block HOT 5
- ``get_parent()`` is excruciatingly slow
- Address review comments on #879
- Improve handling of NEST synaptic delay parameter
- Issue in generate_code_for() HOT 2
- Documentation issue on hh_cond_exp_traub neuron model HOT 1
- `nest.ResetKernel()` resets installed modules HOT 3
- Forbid RNG sampling on right-hand side of ODEs
- Plasticity rule not implemented correctly in certain cases HOT 1
- NESTCodeGeneratorUtils.generate_code_for() touches source files on each call
- any chance for support of sympy 1.12.1 HOT 1
- Models should be sorted logically in the documentation
- neuromodulated_stdp nestml file does not compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestml.