Giter Site home page Giter Site logo

Comments (2)

tnowotny avatar tnowotny commented on June 8, 2024

Hum ... was just about to make a pull request for this but while it gives more precise timestep information and is more efficient, I could see problems as t and dt is passed to the function, a user could in principle pass in completely different t and dt into the function than is currently used int he simulation. I guess it would be quite dangerous to change is actually. So I guess we leave it as is.

from brian2genn.

mstimberg avatar mstimberg commented on June 8, 2024

It is unfortunately a bit more complicated than that. The main expression where we use the timestep function is when checking whether a neuron is refractory. The expression we use is something like:

bool not_refractory = _timestep(t - lastspike, dt) >= _timestep(0.005, dt);

(where the 0.005 stands for a refractory time of 5ms). We could certainly implement this in a more efficient way, but I think it would be better to do this for Brian in general and not only for Brian2GeNN. For example, we could not only have a lastspike variable, but also an integer variable steps_since_last_spike that we can then directly compare.

And yes, in principle a user could use the timestep for something else, even though I don't see many use cases.

from brian2genn.

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.