-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg.py
78 lines (69 loc) · 2.38 KB
/
cfg.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
import json
import numpy as np
import os
import sys
from netpyne import sim, specs
from neuron import h
from matplotlib import pyplot as plt
import pickle
import tmsneurosim
from tmsneurosim.nrn import cells
from tmsneurosim.nrn.cells import NeuronCell
cfg = specs.SimConfig()
cfg.duration = 20 ## Duration of the sim, in ms
cfg.dt = 0.025
cfg.seeds = {"conn": 4321, "stim": 1234, "loc": 4321}
cfg.hParams = {"celsius": 34, "v_init": -70}
cfg.verbose = False
cfg.createNEURONObj = True
cfg.createPyStruct = True
cfg.cvode_active = False
cfg.cvode_atol = 1e-6
cfg.cache_efficient = True
cfg.printRunTime = 0.1
cfg.includeParamsLabel = False
cfg.printPopAvgRates = True
cfg.checkErrors = False
from network_cell_choice import allpops
cfg.recordCells = allpops # which cells to record from
## Dict with traces to record
cfg.recordTraces = {
"V_soma": {"sec": "soma_0", "loc": 0.5, "var": "v"},
"V_axon_0": {"sec": "axon_0", "loc": 0.5, "var": "v"},
"V_axon_1": {"sec": "Myelin_0", "loc": 0.5, "var": "v"},
# 'V_apic_0': {'sec':'apic_0', 'loc':0.5, 'var':'v'},
"V_apic_5": {"sec": "apic_5", "loc": 0.5, "var": "v"},
"V_apic_95": {"sec": "apic_95", "loc": 0.5, "var": "v"},
# 'V_apic_100': {'sec':'apic_100', 'loc':0.5, 'var':'v'},
# 'V_dend_8_1': {'sec':'dend_8', 'loc':0.1, 'var':'v'},
# 'V_dend_8_3': {'sec':'dend_8', 'loc':0.3, 'var':'v'},
# 'V_dend_8_5': {'sec':'dend_8', 'loc':0.5, 'var':'v'},
# 'V_dend_8_7': {'sec':'dend_8', 'loc':0.7, 'var':'v'},
# 'V_dend_8_9': {'sec':'dend_8', 'loc':0.9, 'var':'v'},
"V_dend_5": {"sec": "dend_5", "loc": 0.5, "var": "v"},
"V_dend_65": {"sec": "dend_65", "loc": 0.5, "var": "v"},
# 'V_dend_70': {'sec':'dend_70', 'loc':0.5, 'var':'v'},
}
cfg.recordStim = True
cfg.recordTime = True
cfg.recordStep = 0.025
cfg.recordLFP = [[0, y, 0] for y in [-400]] # 1 elec on skull
cfg.simLabel = "Real_Net_Prototype"
cfg.saveFolder = "."
cfg.savePickle = False ## Save pkl file
cfg.saveJson = False ## Save json file
cfg.saveDataInclude = [
"simConfig",
"netParams",
] ## 'simData' , 'simConfig', 'netParams'
cfg.backupCfgFile = None ##
cfg.gatherOnlySimData = False ##
cfg.saveCellSecs = False ##
cfg.saveCellConns = False ##
cfg.analysis["plotTraces"] = {
"include": allpops,
"figSize": (12, 4),
"saveFig": False,
"overlay": True,
"oneFigPer": "cell",
} # Plot recorded traces for this list of cells