Skip to content

Commit

Permalink
Merge branch 'development' into neuroml_updates
Browse files Browse the repository at this point in the history
* development:
  fixed loading netParams in some scenarios (bug caused by srting functions pre-processing)
  improvements in netParams validation (API and some error messages)
  Raster plot colored by phase + bug fixes
  Update cell input functions in netpyne/cell/inputs.py and user reference (#781)
  docstring for Batch (#780)
  extracted conditions checking code to separate method
  Fixed loading point cell params from legacy models (iincl. ssue 607). Re-factored cell class detection in pop.py
  Change type of geom, mechs and synMechs to accept string functions expressions
  Add metadata for sub-cellular connectivity
  Revert "Merge branch 'development' of https://github.com/suny-downstate-medical-center/netpyne into development"
  • Loading branch information
pgleeson committed Nov 2, 2023
2 parents 7095501 + f73d541 commit 62d8625
Show file tree
Hide file tree
Showing 36 changed files with 2,131 additions and 530 deletions.
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Version in development

**New features**

- Raster plot colored by phase

- Examples based on the CA3 model using the 'colorbyPhase' option in the plotRaster

**Bug fixes**

- Fixed loading point cell params from legacy models (issue 607)

- Fix voltage movie tutorial

- Fix to automatically include netstims in the sim.allSimData object when plotRaster 'include' selects 'all'

- Fixed loading netParams in some scenarios (bug caused by srting functions pre-processing)

# Version 1.0.5

**New features**
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Currently, 'rhythmic', 'evoked', 'poisson' and 'gauss' spike pattern generators

* **evoked** - creates the ongoing external inputs (rhythmic)

* **start** - time of first spike. if -1, uniform distribution between startMin and startMax (ms)
* **start** - time of first spike

* **inc** - increase in time of first spike; from cfg.inc_evinput (ms)

Expand Down
6 changes: 6 additions & 0 deletions examples/CA3model_RasterColoredbyPhase/index.npjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"mod_folder": "mod",
"simConfig": "src/cfg.py",
"python_run": "src/init.py",
"netParams": "src/netParams.py"
}
64 changes: 64 additions & 0 deletions examples/CA3model_RasterColoredbyPhase/mod/CA1ih.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
: $Id: CA1ih.mod,v 1.4 2010/12/13 21:35:47 samn Exp $
TITLE Ih CA3

UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}

NEURON {
SUFFIX hcurrent
NONSPECIFIC_CURRENT ih
RANGE g, e, v50, htau, hinf
RANGE gfactor
}

PARAMETER {
celsius (degC)
g= 0.0001 (mho/cm2)
e= -30 (mV)
v50=-82 (mV)
gfactor = 1
}

STATE {
h
}

ASSIGNED {
ih (mA/cm2)
hinf
htau (ms)
v (mV)
}

PROCEDURE iassign () { ih=g*h*(v-e)*gfactor }

BREAKPOINT {
SOLVE states METHOD cnexp
iassign()
}

DERIVATIVE states {
rates(v)
h'= (hinf- h)/ htau
}

INITIAL {
rates(v)
h = hinf
iassign()
}

PROCEDURE rates(v (mV)) {
UNITSOFF
: HCN1
:hinf = 1/(1+exp(0.151*(v-v50)))
:htau = exp((0.033*(v+75)))/(0.011*(1+exp(0.083*(v+75))))

: HCN2
hinf = 1/(1+exp((v-v50)/10.5))
htau = (1/(exp(-14.59-0.086*v)+exp(-1.87+0.0701*v)))
UNITSON
}

85 changes: 85 additions & 0 deletions examples/CA3model_RasterColoredbyPhase/mod/CA1ika.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
: $Id: CA1ika.mod,v 1.2 2010/12/01 05:06:07 samn Exp $
TITLE Ika CA1

UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}

NEURON {
SUFFIX kacurrent
NONSPECIFIC_CURRENT ika, ikad
RANGE g, gd, e, ninf, ntau, ndinf, ndtau, linf, ltau
}

PARAMETER {
celsius (degC)
g= 0.048 (mho/cm2)
gd= 0 (mho/cm2)
e= -90 (mV)
}

STATE {
n
nd : distal
l
}

ASSIGNED {
v (mV)
ika (mA/cm2)
ikad (mA/cm2)
ninf
ntau (ms)
ndinf
ndtau (ms)
linf
ltau (ms)
}

PROCEDURE iassign () {
ika=g*n*l*(v-e)
ikad=gd*nd*l*(v-e)
}

BREAKPOINT {
SOLVE states METHOD cnexp
iassign()
}

DERIVATIVE states {
rates(v)
n'= (ninf- n)/ ntau
l'= (linf- l)/ ltau
nd'= (ndinf-nd)/ndtau
}

INITIAL {
rates(v)
n = ninf
l = linf
iassign()
}

PROCEDURE rates(v (mV)) {
LOCAL a, b
UNITSOFF
a = exp(-0.038*(1.5+1/(1+exp(v+40)/5))*(v-11))
b = exp(-0.038*(0.825+1/(1+exp(v+40)/5))*(v-11))
ntau=4*b/(1+a)
if (ntau<0.1) {ntau=0.1}
ninf=1/(1+a)

a=exp(-0.038*(1.8+1/(1+exp(v+40)/5))*(v+1))
b=exp(-0.038*(0.7+1/(1+exp(v+40)/5))*(v+1))
ndtau=2*b/(1+a)
if (ndtau<0.1) {ndtau=0.1}
ndinf=1/(1+a)

a = exp(0.11*(v+56))
ltau=0.26*(v+50)
if (ltau<2) {ltau=2}
linf=1/(1+a)
UNITSON
}

60 changes: 60 additions & 0 deletions examples/CA3model_RasterColoredbyPhase/mod/CA1ikdr.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
: $Id: CA1ikdr.mod,v 1.2 2010/12/01 05:10:52 samn Exp $
TITLE IKDR CA1

UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}

NEURON {
SUFFIX kdrcurrent
NONSPECIFIC_CURRENT ik
RANGE g, e, ninf, ntau
}

PARAMETER {
celsius (degC)
g = 0.010 (mho/cm2)
e = -90 (mV)
}

STATE {
n
}

ASSIGNED {
v (mV)
ik (mA/cm2)
ninf
ntau (ms)
}

PROCEDURE iassign () { ik=g*n*(v-e) }

BREAKPOINT {
SOLVE states METHOD cnexp
iassign()
}

DERIVATIVE states {
rates(v)
n'= (ninf- n)/ ntau
}

INITIAL {
rates(v)
n = ninf
iassign()
}

PROCEDURE rates(v (mV)) {
LOCAL a, b
UNITSOFF
a = exp(-0.11*(v-13))
b = exp(-0.08*(v-13))
ntau=50*b/(1+a)
if (ntau<2) {ntau=2}
ninf=1/(1+a)
UNITSON
}

89 changes: 89 additions & 0 deletions examples/CA3model_RasterColoredbyPhase/mod/CA1ina.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
: $Id: CA1ina.mod,v 1.4 2010/11/30 19:50:00 samn Exp $
TITLE INa CA1

UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}

NEURON {
SUFFIX nacurrent
NONSPECIFIC_CURRENT ina
RANGE g, e, vi, ki
RANGE minf,hinf,iinf,mtau,htau,itau : testing
}

PARAMETER {
: v (mV)
celsius (degC)
g = 0.032 (mho/cm2)
e = 55 (mV)
vi = -60 (mV)
ki = 0.8
}

STATE {
m
h
I : i
}

ASSIGNED {
i (mA/cm2)
ina (mA/cm2)
minf
mtau (ms)
hinf
htau (ms)
iinf
itau (ms)
v (mV) : testing
}

: PROCEDURE iassign () { ina=g*m*m*m*h*i*(v-e) }
PROCEDURE iassign () { i=g*m*m*m*h*I*(v-e) ina=i}

BREAKPOINT {
SOLVE states METHOD cnexp
iassign()
}

DERIVATIVE states {
rates(v)
m' = (minf - m) / mtau
h' = (hinf - h) / htau
: i' = (iinf - i) / itau
I' = (iinf - I) / itau
}

INITIAL {
rates(v)
h = hinf
m = minf
: i = iinf
I = iinf
iassign() : testing
}


PROCEDURE rates(v (mV)) {
LOCAL a, b
UNITSOFF
a = 0.4*(v+30)/(1-exp(-(v+30)/7.2))
b = 0.124*(v+30)/(exp((v+30)/7.2)-1)
mtau=0.5/(a+b)
if (mtau<0.02) {mtau=0.02}
minf=a/(a+b)
a = 0.03*(v+45)/(1-exp(-(v+45)/1.5))
b = 0.01*(v+45)/(exp((v+45)/1.5)-1)
htau=0.5/(a+b)
if (htau<0.5) {htau=0.5}
hinf=1/(1+exp((v+50)/4))
a = exp(0.45*(v+66))
b = exp(0.09*(v+66))
itau=3000*b/(1+a)
if (itau<10) {itau=10}
iinf=(1+ki*exp((v-vi)/2))/(1+exp((v-vi)/2))
UNITSON
}

Loading

0 comments on commit 62d8625

Please sign in to comment.