-
Notifications
You must be signed in to change notification settings - Fork 0
/
Depressing_Spinal_Motoneuron_Cell_Classes.py
1304 lines (1135 loc) · 56.4 KB
/
Depressing_Spinal_Motoneuron_Cell_Classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
"""
Created on April 03 14:27:26 2020
Depressing_Spinal_Motoneuron_Cell_Classes.py
This file contains the Spinal_Motoneuron class describing a five-compartment
motoneuron structure (single soma and four dendritic compartments) each
containing hodgkin-huxley type ionic mechanisms. Each dendritic compartment
receives a synaptic input due to correlated and independent synaptic currents.
Implemented by: John Fleming, john.fleming@ucdconnect.ie,
Sageanne Senneff, sageanne.senneff@ucdconnect.ie
Edits: 06-11-19 : John Fleming - Converted Sageanne's implementation of the motoneuron NEURON model into correct format for PyNN
04-06-20 : John Fleming - Updated the motoneuron class to have synapse mechanisms for correlated and independent synaptic inputs on the dendrites
"""
from neuron import h
from nrnutils import Mechanism, Section
from pyNN.neuron import NativeCellType
from pyNN.parameters import Sequence
import numpy as np
# Import global variables for generating the seeds for the dendritic noise
import Global_Variables as GV
# Load ranstream hoc template for generating random streams
h.load_file("ranstream.hoc")
try:
reduce
except NameError:
from functools import reduce
def _new_property(obj_hierarchy, attr_name):
"""
Returns a new property, mapping attr_name to obj_hierarchy.attr_name.
For example, suppose that an object of class A has an attribute b which
itself has an attribute c which itself has an attribute d. Then placing
e = _new_property('b.c', 'd')
in the class definition of A makes A.e an alias for A.b.c.d
"""
def set(self, value):
obj = reduce(getattr, [self] + obj_hierarchy.split('.'))
setattr(obj, attr_name, value)
def get(self):
obj = reduce(getattr, [self] + obj_hierarchy.split('.'))
return getattr(obj, attr_name)
return property(fset=set, fget=get)
class Spinal_Motoneuron_Synaptic_Bombardment_Point_Process(object):
def __init__(self, **parameters):
# Create Soma Compartments
self.soma = Section(diam = parameters['soma_diam'], L = parameters['soma_L'], Ra = parameters['soma_Ra'], cm = parameters['soma_cm'],
mechanisms = (Mechanism('na3rp', gbar = parameters['soma_na3rp_gbar'], sh = parameters['soma_na3rp_sh'], ar = parameters['soma_na3rp_ar'], qinf = parameters['soma_na3rp_qinf'], thinf = parameters['soma_na3rp_thinf']),
Mechanism('naps', gbar = parameters['soma_naps_gbar'], sh = parameters['soma_naps_sh'], ar = parameters['soma_naps_ar'], vslope = parameters['soma_naps_vslope'], asvh = parameters['soma_naps_asvh'], bsvh = parameters['soma_naps_bsvh']),
Mechanism('kdrRL', gMax = parameters['soma_kdrRL_gMax'], tmin = parameters['soma_kdrRL_tmin'], taumax = parameters['soma_kdrRL_taumax'], mVh = parameters['soma_kdrRL_mVh']),
Mechanism('mAHP', gcamax = parameters['soma_mAHP_gcamax'], gkcamax = parameters['soma_mAHP_gkcamax'], taur = parameters['soma_mAHP_taur'], mtauca = parameters['soma_mAHP_mtauca'], mvhalfca = parameters['soma_mAHP_mvhalfca'])))
# Insert passive mechanism in soma
self.soma.insert('pas')
for seg in self.soma:
seg.pas.g = parameters['soma_pas_g']
seg.pas.e = parameters['soma_pas_e']
# Insert h mechanism in soma
self.soma.insert('gh')
for seg in self.soma:
seg.gh.ghbar = parameters['soma_gh_ghbar']
seg.gh.half = parameters['soma_gh_half']
seg.gh.htau = parameters['soma_gh_htau']
# Set threshold netcons on the neuron
self.soma.v_thresh = parameters['v_thres']
# Add bias current to MU soma - current amplitude is in terms of original model paper, nA
self.soma_bias = h.IClamp(0.5, sec=self.soma)
self.soma_bias.delay = 0
self.soma_bias.dur = 1e12
self.soma_bias.amp = parameters['soma_bias_current_amp']
# Create Dendritic Compartments
self.d1 = Section(diam = parameters['dendrite_diam'], L = parameters['dendrite_L'], Ra = parameters['dendrite_Ra'], cm = parameters['dendrite_cm'],
mechanisms = (Mechanism('pas', g = parameters['dendrite_pas_g'], e = parameters['dendrite_pas_e']),
Mechanism('gh', ghbar = parameters['dendrite_gh_ghbar'], half = parameters['dendrite_gh_half'], htau = parameters['dendrite_gh_htau'])))
self.d2 = Section(diam = parameters['dendrite_diam'], L = parameters['dendrite_L'], Ra = parameters['dendrite_Ra'], cm = parameters['dendrite_cm'],
mechanisms = (Mechanism('pas', g = parameters['dendrite_pas_g'], e = parameters['dendrite_pas_e']),
Mechanism('gh', ghbar = parameters['dendrite_gh_ghbar'], half = parameters['dendrite_gh_half'], htau = parameters['dendrite_gh_htau'])))
self.d3 = Section(diam = parameters['dendrite_diam'], L = parameters['dendrite_L'], Ra = parameters['dendrite_Ra'], cm = parameters['dendrite_cm'],
mechanisms = (Mechanism('pas', g = parameters['dendrite_pas_g'], e = parameters['dendrite_pas_e']),
Mechanism('gh', ghbar = parameters['dendrite_gh_ghbar'], half = parameters['dendrite_gh_half'], htau = parameters['dendrite_gh_htau'])))
self.d4 = Section(diam = parameters['dendrite_diam'], L = parameters['dendrite_L'], Ra = parameters['dendrite_Ra'], cm = parameters['dendrite_cm'],
mechanisms = (Mechanism('pas', g = parameters['dendrite_pas_g'], e = parameters['dendrite_pas_e']),
Mechanism('gh', ghbar = parameters['dendrite_gh_ghbar'], half = parameters['dendrite_gh_half'], htau = parameters['dendrite_gh_htau'])))
# Connect the dendritic compartments to their respective parts of the motoneuron soma
# Note connect only takes one parameter
self.d1.connect(self.soma(1))
self.d2.connect(self.soma(1))
self.d3.connect(self.soma(0))
self.d4.connect(self.soma(0))
# Insert the persistent inward currents on the dendrites & set their values
# Dendrite 1:
self.d1.insert('L_Ca_inact')
for seg in self.d1:
seg.L_Ca_inact.gcabar = parameters['dendrite_1_L_Ca_inact_gcabar']
seg.L_Ca_inact.theta_m = parameters['dendrite_L_Ca_inact_theta_m']
seg.L_Ca_inact.tau_m = parameters['dendrite_L_Ca_inact_tau_m']
seg.L_Ca_inact.theta_h = parameters['dendrite_L_Ca_inact_theta_h']
seg.L_Ca_inact.tau_h = parameters['dendrite_L_Ca_inact_tau_h']
seg.L_Ca_inact.kappa_h = parameters['dendrite_L_Ca_inact_kappa_h']
# Dendrite 2:
self.d2.insert('L_Ca_inact')
for seg in self.d2:
seg.L_Ca_inact.gcabar = parameters['dendrite_2_L_Ca_inact_gcabar']
seg.L_Ca_inact.theta_m = parameters['dendrite_L_Ca_inact_theta_m']
seg.L_Ca_inact.tau_m = parameters['dendrite_L_Ca_inact_tau_m']
seg.L_Ca_inact.theta_h = parameters['dendrite_L_Ca_inact_theta_h']
seg.L_Ca_inact.tau_h = parameters['dendrite_L_Ca_inact_tau_h']
seg.L_Ca_inact.kappa_h = parameters['dendrite_L_Ca_inact_kappa_h']
# Dendrite 3:
self.d3.insert('L_Ca_inact')
for seg in self.d3:
seg.L_Ca_inact.gcabar = parameters['dendrite_3_L_Ca_inact_gcabar']
seg.L_Ca_inact.theta_m = parameters['dendrite_L_Ca_inact_theta_m']
seg.L_Ca_inact.tau_m = parameters['dendrite_L_Ca_inact_tau_m']
seg.L_Ca_inact.theta_h = parameters['dendrite_L_Ca_inact_theta_h']
seg.L_Ca_inact.tau_h = parameters['dendrite_L_Ca_inact_tau_h']
seg.L_Ca_inact.kappa_h = parameters['dendrite_L_Ca_inact_kappa_h']
# Dendrite 4:
self.d4.insert('L_Ca_inact')
for seg in self.d4:
seg.L_Ca_inact.gcabar = parameters['dendrite_4_L_Ca_inact_gcabar']
seg.L_Ca_inact.theta_m = parameters['dendrite_L_Ca_inact_theta_m']
seg.L_Ca_inact.tau_m = parameters['dendrite_L_Ca_inact_tau_m']
seg.L_Ca_inact.theta_h = parameters['dendrite_L_Ca_inact_theta_h']
seg.L_Ca_inact.tau_h = parameters['dendrite_L_Ca_inact_tau_h']
seg.L_Ca_inact.kappa_h = parameters['dendrite_L_Ca_inact_kappa_h']
# Add iclamps for playing in dendritic bias currents
# Dendrite 1:
self.d1_bias_current = h.IClamp(0.5, sec=self.d1) # IClamp used to play bias current into the dendrite
self.d1_bias_current.delay = 0
self.d1_bias_current.dur = 1e12
self.d1_bias_current.amp = parameters['dendrite_bias_current_amp'] # Updated in main script to play a ramped bias current through this IClamp
# Dendrite 2:
self.d2_bias_current = h.IClamp(0.5, sec=self.d2) # IClamp used to play bias current into the dendrite
self.d2_bias_current.delay = 0
self.d2_bias_current.dur = 1e12
self.d2_bias_current.amp = parameters['dendrite_bias_current_amp'] # Updated in main script to play a ramped bias current through this IClamp
# Dendrite 3:
self.d3_bias_current = h.IClamp(0.5, sec=self.d3) # IClamp used to play bias current into the dendrite
self.d3_bias_current.delay = 0
self.d3_bias_current.dur = 1e12
self.d3_bias_current.amp = parameters['dendrite_bias_current_amp'] # Updated in main script to play a ramped bias current through this IClamp
# Dendrite 4:
self.d4_bias_current = h.IClamp(0.5, sec=self.d4) # IClamp used to play bias current into the dendrite
self.d4_bias_current.delay = 0
self.d4_bias_current.dur = 1e12
self.d4_bias_current.amp = parameters['dendrite_bias_current_amp'] # Updated in main script to play a ramped bias current through this IClamp
# Append the gaussian IClamps to global list so they can be updated in the main script
GV.MU_dendritic_bias_current_iclamps.append([self.d1_bias_current, self.d2_bias_current, self.d3_bias_current, self.d4_bias_current])
# Add Double Exponential Synapses to soma and each dendritic compartment for correlated inputs from cortex
# Correlated Inputs - Excitatory Synapse:
# Soma:
self.soma_correlated_exc = h.ExpSyn(0.5, sec=self.soma)
self.soma_correlated_exc.e = parameters['correlated_e_rev_exc'] # Excitatory reversal potential
self.soma_correlated_exc.tau = parameters['correlated_tau'] # Excitatory decay time
# Dendrite 1:
self.d1_correlated_exc = h.ExpSyn(0.5, sec=self.d1)
self.d1_correlated_exc.e = parameters['correlated_e_rev_exc'] # Excitatory reversal potential
self.d1_correlated_exc.tau = parameters['correlated_tau'] # Excitatory decay time
# Dendrite 2:
self.d2_correlated_exc = h.ExpSyn(0.5, sec=self.d2)
self.d2_correlated_exc.e = parameters['correlated_e_rev_exc'] # Excitatory reversal potential
self.d2_correlated_exc.tau = parameters['correlated_tau'] # Excitatory decay time
# Dendrite 3:
self.d3_correlated_exc = h.ExpSyn(0.5, sec=self.d3)
self.d3_correlated_exc.e = parameters['correlated_e_rev_exc'] # Excitatory reversal potential
self.d3_correlated_exc.tau = parameters['correlated_tau'] # Excitatory decay time
# Dendrite 4:
self.d4_correlated_exc = h.ExpSyn(0.5, sec=self.d4)
self.d4_correlated_exc.e = parameters['correlated_e_rev_exc'] # Excitatory reversal potential
self.d4_correlated_exc.tau = parameters['correlated_tau'] # Excitatory decay time
# Independent Inputs - Excitatory Synapse:
# Dendrite 1:
self.d1_independent_exc = h.Exp2Syn(0.5, sec=self.d1)
self.d1_independent_exc.e = parameters['independent_e_rev_exc'] # Excitatory reversal potential
self.d1_independent_exc.tau1 = parameters['independent_tau1'] # Excitatory rise time
self.d1_independent_exc.tau2 = parameters['independent_tau2'] # Excitatory decay time
# Dendrite 2:
self.d2_independent_exc = h.Exp2Syn(0.5, sec=self.d2)
self.d2_independent_exc.e = parameters['independent_e_rev_exc'] # Excitatory reversal potential
self.d2_independent_exc.tau1 = parameters['independent_tau1'] # Excitatory rise time
self.d2_independent_exc.tau2 = parameters['independent_tau2'] # Excitatory decay time
# Dendrite 3:
self.d3_independent_exc = h.Exp2Syn(0.5, sec=self.d3)
self.d3_independent_exc.e = parameters['independent_e_rev_exc'] # Excitatory reversal potential
self.d3_independent_exc.tau1 = parameters['independent_tau1'] # Excitatory rise time
self.d3_independent_exc.tau2 = parameters['independent_tau2'] # Excitatory decay time
# Dendrite 4:
self.d4_independent_exc = h.Exp2Syn(0.5, sec=self.d4)
self.d4_independent_exc.e = parameters['independent_e_rev_exc'] # Excitatory reversal potential
self.d4_independent_exc.tau1 = parameters['independent_tau1'] # Excitatory rise time
self.d4_independent_exc.tau2 = parameters['independent_tau2'] # Excitatory decay time
# Synaptic Bombardment Noise Inputs to Dendrites:
# Dendrite 1:
self.d1_Synaptic_Bombardment = h.Gfluct(0.5, sec=self.d1)
self.d1_Synaptic_Bombardment.ge0 = parameters['dendrite_Gfluct_ge0']
self.d1_Synaptic_Bombardment.gi0 = parameters['dendrite_Gfluct_gi0']
self.d1_Synaptic_Bombardment.stde = parameters['dendrite_Gfluct_stde']
self.d1_Synaptic_Bombardment.stdi = parameters['dendrite_Gfluct_stdi']
self.d1_Synaptic_Bombardment.tau_e = parameters['dendrite_Gfluct_tau_e']
self.d1_Synaptic_Bombardment.tau_i = parameters['dendrite_Gfluct_tau_i']
self.d1_Synaptic_Bombardment.E_e = parameters['dendrite_Gfluct_E_e']
self.d1_Synaptic_Bombardment.E_i = parameters['dendrite_Gfluct_E_i']
# Set new seed for the process
d1_r = h.Random() # Make random number for seed
d1_r.Random123(GV.stream_index, 0, 0)
#self.d1_Synaptic_Bombardment.new_seed = d1_r
# Dendrite 2:
self.d2_Synaptic_Bombardment = h.Gfluct(0.5, sec=self.d2)
self.d2_Synaptic_Bombardment.ge0 = parameters['dendrite_Gfluct_ge0']
self.d2_Synaptic_Bombardment.gi0 = parameters['dendrite_Gfluct_gi0']
self.d2_Synaptic_Bombardment.stde = parameters['dendrite_Gfluct_stde']
self.d2_Synaptic_Bombardment.stdi = parameters['dendrite_Gfluct_stdi']
self.d2_Synaptic_Bombardment.tau_e = parameters['dendrite_Gfluct_tau_e']
self.d2_Synaptic_Bombardment.tau_i = parameters['dendrite_Gfluct_tau_i']
self.d2_Synaptic_Bombardment.E_e = parameters['dendrite_Gfluct_E_e']
self.d2_Synaptic_Bombardment.E_i = parameters['dendrite_Gfluct_E_i']
# Set new seed for the process
d2_r = h.Random() # Make random number for seed
d2_r.Random123(GV.stream_index, 1, 0)
#self.d2_Synaptic_Bombardment.new_seed = d2_r
# Dendrite 3:
self.d3_Synaptic_Bombardment = h.Gfluct(0.5, sec=self.d3)
self.d3_Synaptic_Bombardment.ge0 = parameters['dendrite_Gfluct_ge0']
self.d3_Synaptic_Bombardment.gi0 = parameters['dendrite_Gfluct_gi0']
self.d3_Synaptic_Bombardment.stde = parameters['dendrite_Gfluct_stde']
self.d3_Synaptic_Bombardment.stdi = parameters['dendrite_Gfluct_stdi']
self.d3_Synaptic_Bombardment.tau_e = parameters['dendrite_Gfluct_tau_e']
self.d3_Synaptic_Bombardment.tau_i = parameters['dendrite_Gfluct_tau_i']
self.d3_Synaptic_Bombardment.E_e = parameters['dendrite_Gfluct_E_e']
self.d3_Synaptic_Bombardment.E_i = parameters['dendrite_Gfluct_E_i']
# Set new seed for the process
d3_r = h.Random() # Make random number for seed
d3_r.Random123(GV.stream_index, 2, 0)
#self.d3_Synaptic_Bombardment.new_seed = d3_r
# Dendrite 4:
self.d4_Synaptic_Bombardment = h.Gfluct(0.5, sec=self.d4)
self.d4_Synaptic_Bombardment.ge0 = parameters['dendrite_Gfluct_ge0']
self.d4_Synaptic_Bombardment.gi0 = parameters['dendrite_Gfluct_gi0']
self.d4_Synaptic_Bombardment.stde = parameters['dendrite_Gfluct_stde']
self.d4_Synaptic_Bombardment.stdi = parameters['dendrite_Gfluct_stdi']
self.d4_Synaptic_Bombardment.tau_e = parameters['dendrite_Gfluct_tau_e']
self.d4_Synaptic_Bombardment.tau_i = parameters['dendrite_Gfluct_tau_i']
self.d4_Synaptic_Bombardment.E_e = parameters['dendrite_Gfluct_E_e']
self.d4_Synaptic_Bombardment.E_i = parameters['dendrite_Gfluct_E_i']
# Append the noisy conductances to global list so they can be updated in the main script
GV.MU_dendritic_noisy_conductances.append([self.d1_Synaptic_Bombardment, self.d2_Synaptic_Bombardment, self.d3_Synaptic_Bombardment, self.d4_Synaptic_Bombardment])
# Set new seed for the process
d4_r = h.Random() # Make random number for seed
d4_r.Random123(GV.stream_index, 3, 0)
#self.d4_Synaptic_Bombardment.new_seed = d4_r
# Update the stream index for generating other random number seeds
GV.stream_index = GV.stream_index + 1
# needed for PyNN
self.source_section = self.soma
self.source = self.soma(0.5)._ref_v
self.rec = h.NetCon(self.source, None, sec=self.source_section) # Needed to clear the simulator
self.spike_times = h.Vector(0)
self.traces = {}
self.recording_time = False
self.parameter_names = ('soma_diam', 'soma_L', 'soma_Ra', 'soma_cm', 'soma_ek', 'v_thres',
'dendrite_diam', 'dendrite_L', 'dendrite_Ra', 'dendrite_cm',
'soma_na3rp_gbar', 'soma_na3rp_sh', 'soma_na3rp_ar', 'soma_na3rp_qinf', 'soma_na3rp_thinf',
'soma_naps_gbar', 'soma_naps_sh', 'soma_naps_ar', 'soma_naps_vslope', 'soma_naps_asvh', 'soma_naps_bsvh',
'soma_kdrRL_gMax', 'soma_kdrRL_tmin', 'soma_kdrRL_taumax', 'soma_kdrRL_mVh',
'soma_mAHP_gcamax', 'soma_mAHP_gkcamax', 'soma_mAHP_taur', 'soma_mAHP_mtauca', 'soma_mAHP_mvhalfca',
'soma_gh_ghbar', 'soma_gh_half', 'soma_gh_htau',
'soma_pas_g', 'soma_pas_e',
'dendrite_pas_g', 'dendrite_pas_e',
'dendrite_1_L_Ca_inact_gcabar', 'dendrite_2_L_Ca_inact_gcabar', 'dendrite_3_L_Ca_inact_gcabar', 'dendrite_4_L_Ca_inact_gcabar', 'dendrite_L_Ca_inact_theta_m', 'dendrite_L_Ca_inact_tau_m', 'dendrite_L_Ca_inact_theta_h', 'dendrite_L_Ca_inact_tau_h', 'dendrite_L_Ca_inact_kappa_h',
'dendrite_gh_ghbar', 'dendrite_gh_half', 'dendrite_gh_htau',
'correlated_e_rev_exc', 'correlated_tau',
'independent_e_rev_exc', 'independent_tau1', 'independent_tau2',
'soma_bias_current_amp', 'dendrite_bias_current_amp',
'dendrite_Gfluct_ge0', 'dendrite_Gfluct_gi0', 'dendrite_Gfluct_stde', 'dendrite_Gfluct_stdi', 'dendrite_Gfluct_tau_e', 'dendrite_Gfluct_tau_i', 'dendrite_Gfluct_E_e', 'dendrite_Gfluct_E_i'
)
self.traces = {}
self.recording_time = False
def memb_init(self):
for seg in self.soma: # Initialize all compartment membrane voltages
seg.v = self.v_init
for seg in self.d1:
seg.v = self.v_init
for seg in self.d2:
seg.v = self.v_init
for seg in self.d3:
seg.v = self.v_init
for seg in self.d4:
seg.v = self.v_init
def get_threshold(self): # Initialize the soma membrane threshold for netcons
return self.soma.v_thresh
# Need to make getters and setters for changing motoneuron parameters
# Soma -
# diam Setters & Getters:
def _set_soma_diam(self, value):
self.soma.diam = value
def _get_soma_diam(self):
return self.soma.diam
soma_diam = property(fget=_get_soma_diam, fset=_set_soma_diam)
# L Setters & Getters:
def _set_soma_L(self, value):
self.soma.L = value
def _get_soma_L(self):
return self.soma.L
soma_L = property(fget=_get_soma_L, fset=_set_soma_L)
# cm Setters & Getters:
def _set_soma_cm(self, value):
self.soma.cm = value
def _get_soma_cm(self):
return self.soma.cm
soma_cm = property(fget=_get_soma_cm, fset=_set_soma_cm)
# Ra Setters & Getters:
def _set_soma_Ra(self, value):
self.soma.Ra = value
def _get_soma_Ra(self):
return self.soma.Ra
soma_Ra = property(fget=_get_soma_Ra, fset=_set_soma_Ra)
# na3rp Setters & Getters:
def _set_soma_na3rp_gbar(self, value):
for seg in self.soma:
seg.na3rp.gbar = value
def _get_soma_na3rp_gbar(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.soma(0.5).na3rp.gbar
soma_na3rp_gbar = property(fget=_get_soma_na3rp_gbar, fset=_set_soma_na3rp_gbar)
def _set_soma_na3rp_sh(self, value):
for seg in self.soma:
seg.na3rp.sh = value
def _get_soma_na3rp_sh(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.soma(0.5).na3rp.sh
soma_na3rp_sh = property(fget=_get_soma_na3rp_sh, fset=_set_soma_na3rp_sh)
def _set_soma_na3rp_ar(self, value):
for seg in self.soma:
seg.na3rp.ar = value
def _get_soma_na3rp_ar(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.soma(0.5).na3rp.ar
soma_na3rp_ar = property(fget=_get_soma_na3rp_ar, fset=_set_soma_na3rp_ar)
def _set_soma_na3rp_qinf(self, value):
for seg in self.soma:
seg.na3rp.qinf = value
def _get_soma_na3rp_qinf(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.soma(0.5).na3rp.qinf
soma_na3rp_qinf = property(fget=_get_soma_na3rp_qinf, fset=_set_soma_na3rp_qinf)
def _set_soma_na3rp_thinf(self, value):
for seg in self.soma:
seg.na3rp.thinf = value
def _get_soma_na3rp_thinf(self):
# Return only the middle soma parameter
return self.soma(0.5).na3rp.thinf
soma_na3rp_thinf = property(fget=_get_soma_na3rp_thinf, fset=_set_soma_na3rp_thinf)
# naps Setters & Getters:
def _set_soma_naps_gbar(self, value):
for seg in self.soma:
seg.naps.gbar = value
def _get_soma_naps_gbar(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.gbar
soma_naps_gbar = property(fget=_get_soma_naps_gbar, fset=_set_soma_naps_gbar)
def _set_soma_naps_sh(self, value):
for seg in self.soma:
seg.naps.sh = value
def _get_soma_naps_sh(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.sh
soma_naps_sh = property(fget=_get_soma_naps_sh, fset=_set_soma_naps_sh)
def _set_soma_naps_ar(self, value):
for seg in self.soma:
seg.naps.ar = value
def _get_soma_naps_ar(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.ar
soma_naps_ar = property(fget=_get_soma_naps_ar, fset=_set_soma_naps_ar)
def _set_soma_naps_vslope(self, value):
for seg in self.soma:
seg.naps.vslope = value
def _get_soma_naps_vslope(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.vslope
soma_naps_vslope = property(fget=_get_soma_naps_vslope, fset=_set_soma_naps_vslope)
def _set_soma_naps_asvh(self, value):
for seg in self.soma:
seg.naps.asvh = value
def _get_soma_naps_asvh(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.asvh
soma_naps_asvh = property(fget=_get_soma_naps_asvh, fset=_set_soma_naps_asvh)
def _set_soma_naps_bsvh(self, value):
for seg in self.soma:
seg.naps.bsvh = value
def _get_soma_naps_bsvh(self):
# Return only the middle soma parameter
return self.soma(0.5).naps.bsvh
soma_naps_bsvh = property(fget=_get_soma_naps_bsvh, fset=_set_soma_naps_bsvh)
# kdrRL Setters & Getters:
def _set_soma_kdrRL_gMax(self, value):
for seg in self.soma:
seg.kdrRL.gMax = value
def _get_soma_kdrRL_gMax(self):
# Return only the middle soma parameter
return self.soma(0.5).kdrRL.gMax
soma_kdrRL_gMax = property(fget=_get_soma_kdrRL_gMax, fset=_set_soma_kdrRL_gMax)
def _set_soma_kdrRL_tmin(self, value):
for seg in self.soma:
seg.kdrRL.tmin = value
def _get_soma_kdrRL_tmin(self):
# Return only the middle soma parameter
return self.soma(0.5).kdrRL.tmin
soma_kdrRL_tmin = property(fget=_get_soma_kdrRL_tmin, fset=_set_soma_kdrRL_tmin)
def _set_soma_kdrRL_taumax(self, value):
for seg in self.soma:
seg.kdrRL.taumax = value
def _get_soma_kdrRL_taumax(self):
# Return only the middle soma parameter
return self.soma(0.5).kdrRL.taumax
soma_kdrRL_taumax = property(fget=_get_soma_kdrRL_taumax, fset=_set_soma_kdrRL_taumax)
def _set_soma_kdrRL_mVh(self, value):
for seg in self.soma:
seg.kdrRL.mVh = value
def _get_soma_kdrRL_mVh(self):
# Return only the middle soma parameter
return self.soma(0.5).kdrRL.mVh
soma_kdrRL_mVh = property(fget=_get_soma_kdrRL_mVh, fset=_set_soma_kdrRL_mVh)
# mAHP Setters & Getters:
def _set_soma_mAHP_gcamax(self, value):
for seg in self.soma:
seg.mAHP.gcamax = value
def _get_soma_mAHP_gcamax(self):
# Return only the middle soma parameter
return self.soma(0.5).mAHP.gcamax
soma_mAHP_gcamax = property(fget=_get_soma_mAHP_gcamax, fset=_set_soma_mAHP_gcamax)
def _set_soma_mAHP_gkcamax(self, value):
for seg in self.soma:
seg.mAHP.gkcamax = value
def _get_soma_mAHP_gkcamax(self):
# Return only the middle soma parameter
return self.soma(0.5).mAHP.gkcamax
soma_mAHP_gkcamax = property(fget=_get_soma_mAHP_gkcamax, fset=_set_soma_mAHP_gkcamax)
def _set_soma_mAHP_taur(self, value):
for seg in self.soma:
seg.mAHP.taur = value
def _get_soma_mAHP_taur(self):
# Return only the middle soma parameter
return self.soma(0.5).mAHP.taur
soma_mAHP_taur = property(fget=_get_soma_mAHP_taur, fset=_set_soma_mAHP_taur)
def _set_soma_mAHP_mtauca(self, value):
for seg in self.soma:
seg.mAHP.mtauca = value
def _get_soma_mAHP_mtauca(self):
# Return only the middle soma parameter
return self.soma(0.5).mAHP.mtauca
soma_mAHP_mtauca = property(fget=_get_soma_mAHP_mtauca, fset=_set_soma_mAHP_mtauca)
def _set_soma_mAHP_mvhalfca(self, value):
for seg in self.soma:
seg.mAHP.mvhalfca = value
def _get_soma_mAHP_mvhalfca(self):
# Return only the middle soma parameter
return self.soma(0.5).mAHP.mvhalfca
soma_mAHP_mvhalfca = property(fget=_get_soma_mAHP_mvhalfca, fset=_set_soma_mAHP_mvhalfca)
# gh Setters & Getters:
def _set_soma_gh_ghbar(self, value):
for seg in self.soma:
seg.gh.ghbar = value
def _get_soma_gh_ghbar(self):
# Return only the middle soma parameter
return self.soma(0.5).gh.ghbar
soma_gh_ghbar = property(fget=_get_soma_gh_ghbar, fset=_set_soma_gh_ghbar)
def _set_soma_gh_half(self, value):
for seg in self.soma:
seg.gh.half = value
def _get_soma_gh_half(self):
# Return only the middle soma parameter
return self.soma(0.5).gh.half
soma_gh_half = property(fget=_get_soma_gh_half, fset=_set_soma_gh_half)
def _set_soma_gh_htau(self, value):
for seg in self.soma:
seg.gh.htau = value
def _get_soma_gh_htau(self):
# Return only the middle soma parameter
return self.soma(0.5).gh.htau
soma_gh_htau = property(fget=_get_soma_gh_htau, fset=_set_soma_gh_htau)
# pas Setters & Getters:
def _set_soma_pas_g(self, value):
for seg in self.soma:
seg.pas.g = value
def _get_soma_pas_g(self):
# Return only the middle soma parameter
return self.soma(0.5).pas.g
soma_pas_g = property(fget=_get_soma_pas_g, fset=_set_soma_pas_g)
def _set_soma_pas_e(self, value):
for seg in self.soma:
seg.pas.e = value
def _get_soma_pas_e(self):
# Return only the middle soma parameter
return self.soma(0.5).pas.e
soma_pas_e = property(fget=_get_soma_pas_e, fset=_set_soma_pas_e)
# Dendrites -
# diam Setters & Getters:
def _set_dendrite_diam(self, value):
self.d1.diam = value
self.d2.diam = value
self.d3.diam = value
self.d4.diam = value
def _get_dendrite_diam(self):
return self.d1.diam
dendrite_diam = property(fget=_get_dendrite_diam, fset=_set_dendrite_diam)
# L Setters & Getters:
def _set_dendrite_L(self, value):
self.d1.L = value
self.d2.L = value
self.d3.L = value
self.d4.L = value
def _get_dendrite_L(self):
return self.d1.L
dendrite_L = property(fget=_get_dendrite_L, fset=_set_dendrite_L)
# cm Setters & Getters:
def _set_dendrite_cm(self, value):
self.d1.cm = value
self.d2.cm = value
self.d3.cm = value
self.d4.cm = value
def _get_dendrite_cm(self):
return self.d1.cm
dendrite_cm = property(fget=_get_dendrite_cm, fset=_set_dendrite_cm)
# Ra Setters & Getters:
def _set_dendrite_Ra(self, value):
self.d1.Ra = value
self.d2.Ra = value
self.d3.Ra = value
self.d4.Ra = value
def _get_dendrite_Ra(self):
return self.d1.Ra
dendrite_Ra = property(fget=_get_dendrite_Ra, fset=_set_dendrite_Ra)
# pas mechanism - g value:
def _set_dendrite_pas_g(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.pas.g = value
for seg in self.d2:
seg.pas.g = value
for seg in self.d3:
seg.pas.g = value
for seg in self.d4:
seg.pas.g = value
def _get_dendrite_pas_g(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).pas.g
dendrite_pas_g = property(fget=_get_dendrite_pas_g, fset=_set_dendrite_pas_g)
# pas mechanism - e value:
def _set_dendrite_pas_e(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.pas.e = value
for seg in self.d2:
seg.pas.e = value
for seg in self.d3:
seg.pas.e = value
for seg in self.d4:
seg.pas.e = value
def _get_dendrite_pas_e(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).pas.e
dendrite_pas_e = property(fget=_get_dendrite_pas_e, fset=_set_dendrite_pas_e)
# PIC conductance values are different on each dendrite compartment, so there are 4 getters and setters corresponding to each conductance
# L_Ca_inact mechanism - gcabar value for dendrite 1:
def _set_dendrite_1_L_Ca_inact_gcabar(self, value):
for seg in self.d1:
seg.L_Ca_inact.gcabar = value
def _get_dendrite_1_L_Ca_inact_gcabar(self):
return self.d1(0.5).L_Ca_inact.gcabar
dendrite_1_L_Ca_inact_gcabar = property(fget=_get_dendrite_1_L_Ca_inact_gcabar, fset=_set_dendrite_1_L_Ca_inact_gcabar)
# L_Ca_inact mechanism - gcabar value for dendrite 2:
def _set_dendrite_2_L_Ca_inact_gcabar(self, value):
for seg in self.d2:
seg.L_Ca_inact.gcabar = value
def _get_dendrite_2_L_Ca_inact_gcabar(self):
return self.d2(0.5).L_Ca_inact.gcabar
dendrite_2_L_Ca_inact_gcabar = property(fget=_get_dendrite_2_L_Ca_inact_gcabar, fset=_set_dendrite_2_L_Ca_inact_gcabar)
# L_Ca_inact mechanism - gcabar value for dendrite 3:
def _set_dendrite_3_L_Ca_inact_gcabar(self, value):
for seg in self.d3:
seg.L_Ca_inact.gcabar = value
def _get_dendrite_3_L_Ca_inact_gcabar(self):
return self.d3(0.5).L_Ca_inact.gcabar
dendrite_3_L_Ca_inact_gcabar = property(fget=_get_dendrite_3_L_Ca_inact_gcabar, fset=_set_dendrite_3_L_Ca_inact_gcabar)
# L_Ca_inact mechanism - gcabar value for dendrite 4:
def _set_dendrite_4_L_Ca_inact_gcabar(self, value):
for seg in self.d4:
seg.L_Ca_inact.gcabar = value
def _get_dendrite_4_L_Ca_inact_gcabar(self):
return self.d4(0.5).L_Ca_inact.gcabar
dendrite_4_L_Ca_inact_gcabar = property(fget=_get_dendrite_4_L_Ca_inact_gcabar, fset=_set_dendrite_4_L_Ca_inact_gcabar)
# L_Ca_inact mechanism - theta_m value:
def _set_dendrite_L_Ca_inact_theta_m(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.L_Ca_inact.theta_m = value
for seg in self.d2:
seg.L_Ca_inact.theta_m = value
for seg in self.d3:
seg.L_Ca_inact.theta_m = value
for seg in self.d4:
seg.L_Ca_inact.theta_m = value
def _get_dendrite_L_Ca_inact_theta_m(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).L_Ca_inact.theta_m
dendrite_L_Ca_inact_theta_m = property(fget=_get_dendrite_L_Ca_inact_theta_m, fset=_set_dendrite_L_Ca_inact_theta_m)
# L_Ca_inact mechanism - tau_m value:
def _set_dendrite_L_Ca_inact_tau_m(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.L_Ca_inact.tau_m = value
for seg in self.d2:
seg.L_Ca_inact.tau_m = value
for seg in self.d3:
seg.L_Ca_inact.tau_m = value
for seg in self.d4:
seg.L_Ca_inact.tau_m = value
def _get_dendrite_L_Ca_inact_tau_m(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).L_Ca_inact.tau_m
dendrite_L_Ca_inact_tau_m = property(fget=_get_dendrite_L_Ca_inact_tau_m, fset=_set_dendrite_L_Ca_inact_tau_m)
# L_Ca_inact mechanism - theta_h value:
def _set_dendrite_L_Ca_inact_theta_h(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.L_Ca_inact.theta_h = value
for seg in self.d2:
seg.L_Ca_inact.theta_h = value
for seg in self.d3:
seg.L_Ca_inact.theta_h = value
for seg in self.d4:
seg.L_Ca_inact.theta_h = value
def _get_dendrite_L_Ca_inact_theta_h(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).L_Ca_inact.theta_h
dendrite_L_Ca_inact_theta_h = property(fget=_get_dendrite_L_Ca_inact_theta_h, fset=_set_dendrite_L_Ca_inact_theta_h)
# L_Ca_inact mechanism - tau_h value:
def _set_dendrite_L_Ca_inact_tau_h(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.L_Ca_inact.tau_h = value
for seg in self.d2:
seg.L_Ca_inact.tau_h = value
for seg in self.d3:
seg.L_Ca_inact.tau_h = value
for seg in self.d4:
seg.L_Ca_inact.tau_h = value
def _get_dendrite_L_Ca_inact_tau_h(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).L_Ca_inact.tau_h
dendrite_L_Ca_inact_tau_h = property(fget=_get_dendrite_L_Ca_inact_tau_h, fset=_set_dendrite_L_Ca_inact_tau_h)
# L_Ca_inact mechanism - kappa_h value:
def _set_dendrite_L_Ca_inact_kappa_h(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.L_Ca_inact.kappa_h = value
for seg in self.d2:
seg.L_Ca_inact.kappa_h = value
for seg in self.d3:
seg.L_Ca_inact.kappa_h = value
for seg in self.d4:
seg.L_Ca_inact.kappa_h = value
def _get_dendrite_L_Ca_inact_kappa_h(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).L_Ca_inact.kappa_h
dendrite_L_Ca_inact_kappa_h = property(fget=_get_dendrite_L_Ca_inact_kappa_h, fset=_set_dendrite_L_Ca_inact_kappa_h)
# gh mechanism - ghbar value:
def _set_dendrite_gh_ghbar(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.gh.ghbar = value
for seg in self.d2:
seg.gh.ghbar = value
for seg in self.d3:
seg.gh.ghbar = value
for seg in self.d4:
seg.gh.ghbar = value
def _get_dendrite_gh_ghbar(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).gh.ghbar
dendrite_gh_ghbar = property(fget=_get_dendrite_gh_ghbar, fset=_set_dendrite_gh_ghbar)
# gh mechanism - half value:
def _set_dendrite_gh_half(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.gh.half = value
for seg in self.d2:
seg.gh.half = value
for seg in self.d3:
seg.gh.half = value
for seg in self.d4:
seg.gh.half = value
def _get_dendrite_gh_half(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).gh.half
dendrite_gh_half = property(fget=_get_dendrite_gh_half, fset=_set_dendrite_gh_half)
# gh mechanism - htau value:
def _set_dendrite_gh_htau(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
for seg in self.d1:
seg.gh.htau = value
for seg in self.d2:
seg.gh.htau = value
for seg in self.d3:
seg.gh.htau = value
for seg in self.d4:
seg.gh.htau = value
def _get_dendrite_gh_htau(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1(0.5).gh.htau
dendrite_gh_htau = property(fget=_get_dendrite_gh_htau, fset=_set_dendrite_gh_htau)
# Getters and Setters for dendritic synapses
# Correlated Inputs - Excitatory Inputs:
def _get_correlated_e_rev_exc(self): # Reversal Potential
return self.d1_correlated_exc.e
def _set_correlated_e_rev_exc(self, value):
self.soma_correlated_exc.e = value
self.d1_correlated_exc.e = value
self.d2_correlated_exc.e = value
self.d3_correlated_exc.e = value
self.d4_correlated_exc.e = value
correlated_e_rev_exc = property(fget=_get_correlated_e_rev_exc, fset=_set_correlated_e_rev_exc)
def _get_correlated_tau(self): # Decay time (ms)
return self.d1_correlated_exc.tau
def _set_correlated_tau(self, value):
self.soma_correlated_exc.tau = value
self.d1_correlated_exc.tau = value
self.d2_correlated_exc.tau = value
self.d3_correlated_exc.tau = value
self.d4_correlated_exc.tau = value
correlated_tau = property(fget=_get_correlated_tau, fset=_set_correlated_tau)
# Independent Inputs - Excitatory Inputs:
def _get_independent_e_rev_exc(self): # Reversal Potential
return self.d1_independent_exc.e
def _set_independent_e_rev_exc(self, value):
self.d1_independent_exc.e = value
self.d2_independent_exc.e = value
self.d3_independent_exc.e = value
self.d4_independent_exc.e = value
independent_e_rev_exc = property(fget=_get_independent_e_rev_exc, fset=_set_independent_e_rev_exc)
def _get_independent_tau1(self): # Rise time (ms)
return self.d1_independent_exc.tau1
def _set_independent_tau1(self, value):
# Excitatory Independent Inputs
self.d1_independent_exc.tau1 = value
self.d2_independent_exc.tau1 = value
self.d3_independent_exc.tau1 = value
self.d4_independent_exc.tau1 = value
independent_tau1 = property(fget=_get_independent_tau1, fset=_set_independent_tau1)
def _get_independent_tau2(self): # Decay time (ms)
return self.d1_independent_exc.tau2
def _set_independent_tau2(self, value):
# Excitatory Independent Inputs
self.d1_independent_exc.tau2 = value
self.d2_independent_exc.tau2 = value
self.d3_independent_exc.tau2 = value
self.d4_independent_exc.tau2 = value
independent_tau2 = property(fget=_get_independent_tau2, fset=_set_independent_tau2)
def _get_soma_bias_current_amp(self): # Getters/Setters for the soma bias current (nA)
return self.soma_bias.amp
def _set_soma_bias_current_amp(self, value):
self.soma_stim.bias = value
soma_bias_current_amp = property(fget=_get_soma_bias_current_amp, fset=_set_soma_bias_current_amp)
def _get_dendrite_bias_current_amp(self): # Getters/Setters for the dendrite bias current (nA)
return self.d1_bias_current.amp
def _set_dendrite_bias_current_amp(self, value):
self.d1_bias_current.amp = value
self.d2_bias_current.amp = value
self.d3_bias_current.amp = value
self.d4_bias_current.amp = value
dendrite_bias_current_amp = property(fget=_get_dendrite_bias_current_amp, fset=_set_dendrite_bias_current_amp)
# Getters and Setters for dendritic stochastic conductance - simulates synaptic bombardment from other structures
# Gfluct mechanism - ge0 value:
def _set_dendrite_Gfluct_g_e0(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.ge0 = value
self.d2_Synaptic_Bombardment.ge0 = value
self.d3_Synaptic_Bombardment.ge0 = value
self.d4_Synaptic_Bombardment.ge0 = value
def _get_dendrite_Gfluct_g_e0(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.ge0
dendrite_Gfluct_ge0 = property(fget=_get_dendrite_Gfluct_g_e0, fset=_set_dendrite_Gfluct_g_e0)
# Gfluct mechanism - gi0 value:
def _set_dendrite_Gfluct_g_i0(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.gi0 = value
self.d2_Synaptic_Bombardment.gi0 = value
self.d3_Synaptic_Bombardment.gi0 = value
self.d4_Synaptic_Bombardment.gi0 = value
def _get_dendrite_Gfluct_g_i0(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.gi0
dendrite_Gfluct_gi0 = property(fget=_get_dendrite_Gfluct_g_i0, fset=_set_dendrite_Gfluct_g_i0)
# Gfluct mechanism - stde value:
def _set_dendrite_Gfluct_std_e(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.stde = value
self.d2_Synaptic_Bombardment.stde = value
self.d3_Synaptic_Bombardment.stde = value
self.d4_Synaptic_Bombardment.stde = value
def _get_dendrite_Gfluct_std_e(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.stde
dendrite_Gfluct_stde = property(fget=_get_dendrite_Gfluct_std_e, fset=_set_dendrite_Gfluct_std_e)
# Gfluct mechanism - stdi value:
def _set_dendrite_Gfluct_std_i(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.stdi = value
self.d2_Synaptic_Bombardment.stdi = value
self.d3_Synaptic_Bombardment.stdi = value
self.d4_Synaptic_Bombardment.stdi = value
def _get_dendrite_Gfluct_std_i(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.stdi
dendrite_Gfluct_stdi = property(fget=_get_dendrite_Gfluct_std_i, fset=_set_dendrite_Gfluct_std_i)
# Gfluct mechanism - tau_e value:
def _set_dendrite_Gfluct_tau_e(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.tau_e = value
self.d2_Synaptic_Bombardment.tau_e = value
self.d3_Synaptic_Bombardment.tau_e = value
self.d4_Synaptic_Bombardment.tau_e = value
def _get_dendrite_Gfluct_tau_e(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.tau_e
dendrite_Gfluct_tau_e = property(fget=_get_dendrite_Gfluct_tau_e, fset=_set_dendrite_Gfluct_tau_e)
# Gfluct mechanism - tau_i value:
def _set_dendrite_Gfluct_tau_i(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.tau_i = value
self.d2_Synaptic_Bombardment.tau_i = value
self.d3_Synaptic_Bombardment.tau_i = value
self.d4_Synaptic_Bombardment.tau_i = value
def _get_dendrite_Gfluct_tau_i(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.tau_i
dendrite_Gfluct_tau_i = property(fget=_get_dendrite_Gfluct_tau_i, fset=_set_dendrite_Gfluct_tau_i)
# Gfluct mechanism - E_e value:
def _set_dendrite_Gfluct_E_e(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.E_e = value
self.d2_Synaptic_Bombardment.E_e = value
self.d3_Synaptic_Bombardment.E_e = value
self.d4_Synaptic_Bombardment.E_e = value
def _get_dendrite_Gfluct_E_e(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.E_e
dendrite_Gfluct_E_e = property(fget=_get_dendrite_Gfluct_E_e, fset=_set_dendrite_Gfluct_E_e)
# Gfluct mechanism - E_i value:
def _set_dendrite_Gfluct_E_i(self, value):
# Set each dendrite on the motoneuron to have the same parameter value
self.d1_Synaptic_Bombardment.E_i = value
self.d2_Synaptic_Bombardment.E_i = value
self.d3_Synaptic_Bombardment.E_i = value
self.d4_Synaptic_Bombardment.E_i = value
def _get_dendrite_Gfluct_E_i(self):
# Return only the first dendrite parameter, since other dendrites use same value
return self.d1_Synaptic_Bombardment.E_i
dendrite_Gfluct_E_i = property(fget=_get_dendrite_Gfluct_E_i, fset=_set_dendrite_Gfluct_E_i)
class Spinal_Motoneuron_Synaptic_Bombardment_Point_Process_Type(NativeCellType):
# Default parameters for the neurons:
default_parameters = {'soma_diam': 22.0, 'soma_L': 2952.0, 'soma_Ra': 0.001, 'soma_cm': 1.35546, 'soma_ek': -80.0, 'v_thres' : -20,
'dendrite_diam': 8.73071, 'dendrite_L': 1794.13, 'dendrite_Ra': 51.038, 'dendrite_cm': 0.867781}
# Soma default parameters:
# na3rp:
default_parameters['soma_na3rp_gbar'] = 0.01
default_parameters['soma_na3rp_sh'] = 1.0
default_parameters['soma_na3rp_ar'] = 1.0
default_parameters['soma_na3rp_qinf'] = 8.0
default_parameters['soma_na3rp_thinf'] = -50.0
# naps: