epsp.mod 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. : this model is built-in to neuron with suffix epsp
  2. : Schaefer et al. 2003
  3. COMMENT
  4. modified from syn2.mod
  5. injected current with exponential rise and decay current defined by
  6. i = 0 for t < onset and
  7. i=amp*((1-exp(-(t-onset)/tau0))-(1-exp(-(t-onset)/tau1)))
  8. for t > onset
  9. compare to experimental current injection:
  10. i = - amp*(1-exp(-t/t1))*(exp(-t/t2))
  11. -> tau1==t2 tau0 ^-1 = t1^-1 + t2^-1
  12. ENDCOMMENT
  13. INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
  14. NEURON {
  15. POINT_PROCESS epsp
  16. RANGE onset, tau0, tau1, imax, i, myv
  17. NONSPECIFIC_CURRENT i
  18. }
  19. UNITS {
  20. (nA) = (nanoamp)
  21. (mV) = (millivolt)
  22. (umho) = (micromho)
  23. }
  24. PARAMETER {
  25. onset=0 (ms)
  26. tau0=0.2 (ms)
  27. tau1=3.0 (ms)
  28. imax=0 (nA)
  29. v (mV)
  30. }
  31. ASSIGNED { i (nA) myv (mV)}
  32. LOCAL a[2]
  33. LOCAL tpeak
  34. LOCAL adjust
  35. LOCAL amp
  36. BREAKPOINT {
  37. myv = v
  38. i = curr(t)
  39. }
  40. FUNCTION myexp(x) {
  41. if (x < -100) {
  42. myexp = 0
  43. }else{
  44. myexp = exp(x)
  45. }
  46. }
  47. FUNCTION curr(x) {
  48. tpeak=tau0*tau1*log(tau0/tau1)/(tau0-tau1)
  49. adjust=1/((1-myexp(-tpeak/tau0))-(1-myexp(-tpeak/tau1)))
  50. amp=adjust*imax
  51. if (x < onset) {
  52. curr = 0
  53. }else{
  54. a[0]=1-myexp(-(x-onset)/tau0)
  55. a[1]=1-myexp(-(x-onset)/tau1)
  56. curr = -amp*(a[0]-a[1])
  57. }
  58. }