Giter Club home page Giter Club logo

Comments (7)

PTraeder avatar PTraeder commented on September 21, 2024

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.

ingablundell avatar ingablundell commented on September 21, 2024

@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.

AliceGem avatar AliceGem commented on September 21, 2024

@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.

DimitriPlotnikov avatar DimitriPlotnikov commented on September 21, 2024

@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.

AliceGem avatar AliceGem commented on September 21, 2024

@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.

ingablundell avatar ingablundell commented on September 21, 2024

@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.

clinssen avatar clinssen commented on September 21, 2024

Closing as this will be covered by #588.

from nestml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.