Skip to content

Commit e55e4cd

Browse files
committed
channel param name updates
1 parent 26a82dd commit e55e4cd

File tree

10 files changed

+58
-55
lines changed

10 files changed

+58
-55
lines changed

chans/chanplots/gabab-plot.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ func (pl *GABABPlot) TimeRun() { //types:add
162162
dir.Float64("GababX", nv).SetFloat1D(x, ti)
163163

164164
gis := 1.0 / (1.0 + math.Exp(-(sin-7.1)/1.4))
165-
dM := (float64(pl.GABAB.TauFact)*x - m) / float64(pl.GABAB.RiseTau)
166-
dX := -x / float64(pl.GABAB.DecayTau)
165+
dM := (float64(pl.GABAB.TauFact)*x - m) / float64(pl.GABAB.Rise)
166+
dX := -x / float64(pl.GABAB.Decay)
167167
m += dM
168168
x += gis + dX
169169

chans/chanplots/kir-plot.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ import (
1616

1717
type KirPlot struct {
1818

19-
// kIR function
20-
Kir chans.KirParams
19+
// Kir function
20+
Kir chans.KirParams `display:"add-fields"`
2121

22-
// starting voltage
22+
// Vstart is starting voltage
2323
Vstart float32 `default:"-100"`
2424

25-
// ending voltage
25+
// Vend is ending voltage
2626
Vend float32 `default:"100"`
2727

28-
// voltage increment
28+
// Vstep is voltage increment
2929
Vstep float32 `default:"1"`
3030

31-
// number of time steps
31+
// TimeSteps is number of time steps
3232
TimeSteps int
3333

3434
// do spiking instead of voltage ramp
@@ -86,15 +86,15 @@ func (pl *KirPlot) GVRun() { //types:add
8686
mtau := mp.MTau(v)
8787

8888
dir.Float64("V", nv).SetFloat1D(float64(v), vi)
89-
dir.Float64("GkIR", nv).SetFloat1D(float64(g), vi)
89+
dir.Float64("Gkir", nv).SetFloat1D(float64(g), vi)
9090
dir.Float64("M", nv).SetFloat1D(float64(m), vi)
9191
dir.Float64("Minf", nv).SetFloat1D(float64(minf), vi)
9292
dir.Float64("Mtau", nv).SetFloat1D(float64(mtau), vi)
9393
}
9494
plot.SetFirstStyler(dir.Float64("V"), func(s *plot.Style) {
9595
s.Role = plot.X
9696
})
97-
ons := []string{"GkIR", "M"}
97+
ons := []string{"Gkir", "M"}
9898
for _, on := range ons {
9999
plot.SetFirstStyler(dir.Float64(on), func(s *plot.Style) {
100100
s.On = true
@@ -132,7 +132,7 @@ func (pl *KirPlot) TimeRun() { //types:add
132132

133133
dir.Float64("Time", nv).SetFloat1D(float64(t), ti)
134134
dir.Float64("V", nv).SetFloat1D(float64(v), ti)
135-
dir.Float64("GkIR", nv).SetFloat1D(float64(g), ti)
135+
dir.Float64("Gkir", nv).SetFloat1D(float64(g), ti)
136136
dir.Float64("M", nv).SetFloat1D(float64(m), ti)
137137
dir.Float64("Minf", nv).SetFloat1D(float64(minf), ti)
138138
dir.Float64("Mtau", nv).SetFloat1D(float64(mtau), ti)
@@ -154,11 +154,15 @@ func (pl *KirPlot) TimeRun() { //types:add
154154
plot.SetFirstStyler(dir.Float64("Time"), func(s *plot.Style) {
155155
s.Role = plot.X
156156
})
157-
ons := []string{"V", "GkIR", "M"}
157+
plot.SetFirstStyler(dir.Float64("V"), func(s *plot.Style) {
158+
s.On = true
159+
s.Plot.Title = "Gkir G(t)"
160+
s.RightY = true
161+
})
162+
ons := []string{"Gkir", "M"}
158163
for _, on := range ons {
159164
plot.SetFirstStyler(dir.Float64(on), func(s *plot.Style) {
160165
s.On = true
161-
s.Plot.Title = "GkIR G(t)"
162166
})
163167
}
164168
if pl.Tabs != nil {

chans/chanplots/mahp-plot.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ import (
1717
type MahpPlot struct {
1818

1919
// mAHP function
20-
Mahp chans.MahpParams `display:"inline"`
20+
Mahp chans.MahpParams `display:"add-fields"`
2121

22-
// starting voltage
22+
// Vstart is starting voltage
2323
Vstart float32 `default:"-100"`
2424

25-
// ending voltage
25+
// Vend is ending voltage
2626
Vend float32 `default:"100"`
2727

28-
// voltage increment
28+
// Vstep is voltage increment
2929
Vstep float32 `default:"1"`
3030

31-
// number of time steps
31+
// TimeSteps is number of time steps
3232
TimeSteps int
3333

3434
// do spiking instead of voltage ramp

chans/chanplots/sahp-plot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
type SahpPlot struct {
1818

1919
// sAHP function
20-
Sahp chans.SahpParams `display:"inline"`
20+
Sahp chans.SahpParams `display:"add-fields"`
2121

2222
// starting calcium
2323
CaStart float32 `default:"0"`

chans/chanplots/skca-plot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
type SKCaPlot struct {
1919

2020
// SKCa params
21-
SKCa chans.SKCaParams
21+
SKCa chans.SKCaParams `display:"add-fields"`
2222

2323
// time constants for integrating Ca from spiking across M, P and D cascading levels
2424
CaParams kinase.CaSpikeParams

chans/chanplots/typegen.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chans/gabab.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ type GABABParams struct {
2727
// GababM activation factor can become large, so that overall GgabaB = ~50 nS.
2828
Gk float32 `default:"0.015,0.012,0"`
2929

30-
// RiseTau is the rise time for bi-exponential time dynamics of GABA-B.
31-
RiseTau float32 `default:"45"`
30+
// Rise is the rise time for bi-exponential time dynamics of GABA-B, in ms.
31+
Rise float32 `default:"45"`
3232

33-
// DecayTau is the decay time for bi-exponential time dynamics of GABA-B.
34-
DecayTau float32 `default:"50"`
33+
// Decay is the decay time for bi-exponential time dynamics of GABA-B, in ms.
34+
Decay float32 `default:"50"`
3535

3636
// Gbase is the baseline level of GABA-B channels open independent of
3737
// inhibitory input (is added to spiking-produced conductance).
@@ -41,7 +41,7 @@ type GABABParams struct {
4141
GiSpike float32 `default:"10"`
4242

4343
// MaxTime is the time offset when peak conductance occurs, in msec, computed
44-
// from RiseTau and DecayTau.
44+
// from Rise and Decay.
4545
MaxTime float32 `edit:"-"`
4646

4747
// TauFact is the time constant factor used in integration:
@@ -59,18 +59,18 @@ type GABABParams struct {
5959

6060
func (gp *GABABParams) Defaults() {
6161
gp.Gk = 0.015
62-
gp.RiseTau = 45
63-
gp.DecayTau = 50
62+
gp.Rise = 45
63+
gp.Decay = 50
6464
gp.Gbase = 0.2
6565
gp.GiSpike = 10
6666
gp.Update()
6767
}
6868

6969
func (gp *GABABParams) Update() {
70-
gp.TauFact = math32.Pow(gp.DecayTau/gp.RiseTau, gp.RiseTau/(gp.DecayTau-gp.RiseTau))
71-
gp.MaxTime = ((gp.RiseTau * gp.DecayTau) / (gp.DecayTau - gp.RiseTau)) * math32.Log(gp.DecayTau/gp.RiseTau)
72-
gp.RiseDt = 1.0 / gp.RiseTau
73-
gp.DecayDt = 1.0 / gp.DecayTau
70+
gp.TauFact = math32.Pow(gp.Decay/gp.Rise, gp.Rise/(gp.Decay-gp.Rise))
71+
gp.MaxTime = ((gp.Rise * gp.Decay) / (gp.Decay - gp.Rise)) * math32.Log(gp.Decay/gp.Rise)
72+
gp.RiseDt = 1.0 / gp.Rise
73+
gp.DecayDt = 1.0 / gp.Decay
7474
}
7575

7676
func (gp *GABABParams) ShouldDisplay(field string) bool {

chans/kir.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ func (kp *KirParams) ShouldDisplay(field string) bool {
6565
}
6666
}
6767

68-
// MRates returns Minf as a function of voltage potential.
68+
// Minf returns Minf as a function of voltage potential.
6969
func (kp *KirParams) Minf(v float32) float32 {
70-
return 1.0 / (1.0 + math32.FastExp((v-(kp.MinfOff))/kp.MinfTau))
70+
return 1.0 / (1.0 + math32.FastExp((v-kp.MinfOff)/kp.MinfTau))
7171
}
7272

7373
// MinfRest returns Minf at nominal resting membrane potential of -70mV
@@ -78,10 +78,9 @@ func (kp *KirParams) MinfRest() float32 {
7878

7979
// MTau returns mtau as a function of voltage.
8080
func (kp *KirParams) MTau(v float32) float32 {
81-
alpha := 0.1 * math32.FastExp((v-(kp.RiseOff))/(-kp.RiseTau))
82-
beta := 0.27 / (1.0 + math32.FastExp((v-(kp.DecayOff))/(-kp.DecayTau)))
83-
sum := alpha + beta
84-
return 1.0 / sum
81+
alpha := 0.1 * math32.FastExp(-(v-kp.RiseOff)/kp.RiseTau)
82+
beta := 0.27 / (1.0 + math32.FastExp(-(v-kp.DecayOff)/kp.DecayTau))
83+
return 1.0 / (alpha + beta)
8584
}
8685

8786
// DM computes the change in M gating parameter.

chans/skca.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ type SKCaParams struct {
3131
// Set this to level that activates at reasonable levels of SKCaR.
3232
C50 float32 `default:"0.4,0.5"`
3333

34-
// ActTau is the K channel gating factor activation time constant,
34+
// Rise is the K channel gating factor activation time constant,
3535
// roughly 5-15 msec in literature.
36-
ActTau float32 `default:"15"`
36+
Rise float32 `default:"15"`
3737

38-
// DeTau is the K channel gating factor deactivation time constant,
38+
// Decay is the K channel gating factor deactivation time constant,
3939
// roughly 30-50 ms in literature.
40-
DeTau float32 `default:"30"`
40+
Decay float32 `default:"30"`
4141

4242
// KCaR is the proportion of CaIn intracellular stores that are released
4343
// per spike, going into CaR.
@@ -57,10 +57,10 @@ type SKCaParams struct {
5757
CaInTau float32 `default:"50"`
5858

5959
// ActDT = 1 / tau
60-
ActDt float32 `display:"-" json:"-" xml:"-"`
60+
RiseDt float32 `display:"-" json:"-" xml:"-"`
6161

62-
// DeDt = 1 / tau
63-
DeDt float32 `display:"-" json:"-" xml:"-"`
62+
// DecayDt = 1 / tau
63+
DecayDt float32 `display:"-" json:"-" xml:"-"`
6464

6565
// CaRDecayDt = 1 / tau
6666
CaRDecayDt float32 `display:"-" json:"-" xml:"-"`
@@ -72,8 +72,8 @@ type SKCaParams struct {
7272
func (sp *SKCaParams) Defaults() {
7373
sp.Gk = 0.0
7474
sp.C50 = 0.5
75-
sp.ActTau = 15
76-
sp.DeTau = 30
75+
sp.Rise = 15
76+
sp.Decay = 30
7777
sp.KCaR = 0.8
7878
sp.CaRDecayTau = 150
7979
sp.CaInThr = 0.01
@@ -82,8 +82,8 @@ func (sp *SKCaParams) Defaults() {
8282
}
8383

8484
func (sp *SKCaParams) Update() {
85-
sp.ActDt = 1.0 / sp.ActTau
86-
sp.DeDt = 1.0 / sp.DeTau
85+
sp.RiseDt = 1.0 / sp.Rise
86+
sp.DecayDt = 1.0 / sp.Decay
8787
sp.CaRDecayDt = 1.0 / sp.CaRDecayTau
8888
sp.CaInDt = 1.0 / sp.CaInTau
8989
}
@@ -131,9 +131,9 @@ func (sp *SKCaParams) CaInRFromSpike(spike, caD float32, caIn, caR *float32) {
131131
func (sp *SKCaParams) MFromCa(caR, mcur float32) float32 {
132132
mas := sp.MAsympHill(caR)
133133
if mas > mcur {
134-
return mcur + sp.ActDt*(mas-mcur)
134+
return mcur + sp.RiseDt*(mas-mcur)
135135
}
136-
return mcur + sp.DeDt*(mas-mcur)
136+
return mcur + sp.DecayDt*(mas-mcur)
137137
}
138138

139139
//gosl:end

0 commit comments

Comments
 (0)