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

Tsodyks_synapse #3195

Closed
Thanh-Binh opened this issue Apr 25, 2024 · 2 comments
Closed

Tsodyks_synapse #3195

Thanh-Binh opened this issue Apr 25, 2024 · 2 comments
Labels
S: High Should be handled next T: Bug Wrong statements in the code or documentation
Projects

Comments

@Thanh-Binh
Copy link

Describe the bug
from my best point of view, codes in the header file "tsodyks_synapse.h" from the line 259 to 281 are not correct
double Puu = ( tau_fac_ == 0.0 ) ? 0.0 : std::exp( -h / tau_fac_ );
double Pyy = std::exp( -h / tau_psc_ );
double Pzz = std::expm1( -h / tau_rec_ );
double Pxy = ( Pzz * tau_rec_ - ( Pyy - 1.0 ) * tau_psc_ ) / ( tau_psc_ - tau_rec_ );

double z = 1.0 - x_ - y_;

// propagation t_lastspike_ -> t_spike
// don't change the order !

u_ *= Puu;
x_ += Pxy * y_ - Pzz * z;
y_ *= Pyy;

// delta function u
u_ += U_ * ( 1.0 - u_ );

Those codes implement the solution of some differential equations in the paper of Tsosyks 2000:
dx/dt = z/tau_rec - u * x * delta_function(t - tsp) (1)
dy/dt = -y/tau_psc + u * x * delta_function(t - tsp) (2)
dz/dt = y/tau_psc - z / tau_rec (3)
du/dt = -u/tau_fac + U * (1-u) * delta_function(t - tsp) (4)

from (1) + (3):
dx/dt + dz/dt = y/tau_psc - uxdelta_function(t-tsp)

(2) -> dx/dt + dz/dt = -dy/dt
-> dz/dt = -dx/dt - dy/dt
-> z = z0 - x - y
where z0 is z(t = tsp)

Any explain?

@jessica-mitchell jessica-mitchell added this to To do in Models via automation May 7, 2024
@gtrensch gtrensch added T: Bug Wrong statements in the code or documentation S: Critical Needs to be addressed immediately S: High Should be handled next and removed S: Critical Needs to be addressed immediately labels May 17, 2024
@janskaar
Copy link
Contributor

I don't quite follow your last step. Note that dx/dt + dy/dt + dz/dt = 0, so the sum x + y + z never changes, and in the model it is assumed to be 1.

If you integrate dz/dt = -dx/dt - dy/dt from 0 to t, you end up with z(t) = -x(t) - y(t) + x(0) + y(0) + z(0). Since the sum over the last three terms is 1, you end up with z = 1 - x - y.

@Thanh-Binh
Copy link
Author

@janskaar OK understood, thanks.

Models automation moved this from To do to Done May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: High Should be handled next T: Bug Wrong statements in the code or documentation
Projects
Models
  
Done
Development

No branches or pull requests

3 participants