This repository has been archived by the owner on May 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netParams.py
65 lines (53 loc) · 2.68 KB
/
netParams.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
from netpyne import specs
try:
from __main__ import cfg
except:
from cfg import cfg
netParams = specs.NetParams() # object of class NetParams to store the network parameters
netParams.popParams['cnrn'] = {'cellType': 'cnrn' , 'numCells': 1, 'cellModel': '_cnrn' }
#netParams.popParams['csoma'] = {'cellType': 'csoma', 'numCells': 1, 'cellModel': '_csoma'}
#calculate navs from config file
#navs = {'nav17': cfg.gna17 * cfg.block[0], 'na18a': cfg.gna18 * cfg.block[1]}
"""
navs = {'nav17': cfg.gna17 * cfg.nacndct[0],
'na18a': cfg.gna18 * cfg.nacndct[1],
'na19a': cfg.gna19 * cfg.nacndct[2]}
"""
navs = {'nav17': cfg.gna17 * cfg.nacndct[0],
'nav18': cfg.gna18 * cfg.nacndct[1],
'na19a': cfg.gna19 * cfg.nacndct[2]}
# more complex potassium channel config, not very useful until we get a
kvs = {#'kv1' : cfg.gk1 * cfg.kcndct[0] ,
'kv2' : cfg.gk2 * cfg.kcndct[1] ,
'kv3' : cfg.gk3 * cfg.kcndct[2] ,
#'kv4' : cfg.gk4 * cfg.kcndct[3] ,
'kv7' : cfg.gk7 * cfg.kcndct[4] }
#kvs = {'borgkdr' : cfg.gk1 * cfg.kcndct[0] ,
# 'kv7' : cfg.gk7 * cfg.kcndct[4] }
cavs = {'cal' : cfg.gca }
args = {'navs' : navs, 'kvs': kvs, 'cavs': cavs,
'navq' : cfg.navq, 'kvq': cfg.kvq,
'ena' : cfg.ena, 'ek': cfg.ek,
'vrest': cfg.vrest, 'gm': cfg.gm,
'rmut' : cfg.rmut,
'L' : cfg.L, 'nseg': cfg.nseg}
cnrnParams = netParams.importCellParams(label='cnrn' , conds={'cellType': 'cnrn' }, fileName='cnrn.py' , cellName='cnrn' , cellArgs=args)
#cdrgParams = netParams.importCellParams(label='cdrg' , conds={'cellType': 'cdrg' }, fileName='cdrg.py' , cellName='cdrg' , cellArgs=args)
#csomaParams = netParams.importCellParams(label='csoma', conds={'cellType': 'csoma'}, fileName='csoma.py', cellName='csoma', cellArgs=args)
netParams.cellParams['cnrn' ] = cnrnParams
#netParams.cellParams['cdrg' ] = cdrgParams
#netParams.cellParams['csoma'] = csomaParams
#netParams.cellParams['cfiber1'] = cfiber
for delay in cfg.delay:
key = 'ic%i'%delay
netParams.stimSourceParams[key] = {'type': 'IClamp', 'delay': delay, 'dur': 2.5, 'amp': 0.5}
netParams.stimTargetParams[key] = {'source': key, 'conds': {'popLabel': 'cnrn' }, 'sec': 'axnperi', 'loc': 0.0}
"""
for delay in cfg.delay:
key = 'vc%i'%delay
netParams.stimSourceParams[key] = {'type': 'VClamp', 'dur': [delay, 50, 0], 'amp': [-57, 10, -57]}
netParams.stimTargetParams[key] = {'source': key, 'conds': {'popLabel': 'cnrn'}, 'sec': 'drgsoma', 'loc': 0.5}
"""
#key = 'vc%i'%delay
#netParams.stimSourceParams['vc%i'%cfg.delay[0]] = {'type': 'VClamp'}
#netParams.stimSourceParams['vc%i'%cfg.delay[0]] = {}