-
Notifications
You must be signed in to change notification settings - Fork 0
/
nsloc.py
40 lines (34 loc) · 1.37 KB
/
nsloc.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
"""
NLSOC
Usage example:
from neuron import h
from nsloc import nsloc
cell = nsloc(cellid)
Version: 2014July23 by [email protected]
2014August27 by [email protected]
"""
## Create nsloc units with default parameters -- not to be called directly, only via one of the other functions
# def createcellPmd(cellid):
# from neuron import h # Open NEURON
# cell = h.NSLOC() # Create a new NSLOC unit
# cell.start = -1
# #cell.type = celltype # Set cell celltype (used for setting celltype-specific dynamics)
# cell.id = cellid # Cell ID for keeping track which cell this is
# return cell
# def pmdnsloc(cellid=-1):
# cell = createcellPmd(cellid)
# return cell
## Create nsloc units with default parameters -- not to be called directly, only via one of the other functions
def createcell(cellid, interval, number, start, noise):
from neuron import h # Open NEURON
cell = h.NSLOC() # Create a new NSLOC unit
cell.interval = interval
cell.number = number
cell.start = start
cell.noise = noise
#cell.type = celltype # Set cell celltype (used for setting celltype-specific dynamics)
cell.id = cellid # Cell ID for keeping track which cell this is
return cell
def nsloc(cellid=-1, interval=10000, number=10000, start=1, noise=0.0):
cell = createcell(cellid, interval, number, start, noise)
return cell