Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scaling for delta pulses #1013

Open
clinssen opened this issue Mar 13, 2024 · 0 comments · May be fixed by #1050
Open

Fix scaling for delta pulses #1013

clinssen opened this issue Mar 13, 2024 · 0 comments · May be fixed by #1050
Labels

Comments

@clinssen
Copy link
Contributor

clinssen commented Mar 13, 2024

When a spiking input port is written directly into the model, for instance:

equations:
    x' = -x / tau + spikes

input:
    spikes <- spike

then spikes is assumed to be a (piecewise) constant by ODE-toolbox, which means it generates code that involves a factor of Δt (the simulation resolution):

x(t + Δt) = x(t) + spikes * Δt

However, if spikes is not a (piecewise) constant value, but a Dirac delta function, the factor Δt should not be inserted.

This issue does not occur if the numerical solver is used, or if the delta appears inside a convolve() call inside the ODE.

See also #993.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant