def loadThreeCompartmentModel(self): # simple 3 compartment model pnode = CompartmentNode(0, ca=1.9e-6, g_l=1.8e-3) self.ctree = CompartmentTree(root=pnode) cnode = CompartmentNode(1, ca=2.4e-6, g_l=0.3e-4, g_c=3.9) self.ctree.addNodeWithParent(cnode, pnode) lnode0 = CompartmentNode(2, ca=1.9e-6, g_l=0.3e-4, g_c=3.8e-3) self.ctree.addNodeWithParent(lnode0, cnode)
def loadTwoCompartmentModel(self, w_locinds=True): # simple two compartment model pnode = CompartmentNode(0, ca=1.5e-5, g_l=2e-3) self.ctree = CompartmentTree(root=pnode) cnode = CompartmentNode(1, ca=2e-6, g_l=3e-4, g_c=4e-3) self.ctree.addNodeWithParent(cnode, pnode) if w_locinds: self.addLocinds()
def loadMultiDendModel(self): # simple 3 compartment model pnode = CompartmentNode(0, ca=1.9e-6, g_l=1.8e-3) self.ctree = CompartmentTree(root=pnode) cnode0 = CompartmentNode(1, ca=2.4e-6, g_l=0.3e-4, g_c=3.9) self.ctree.addNodeWithParent(cnode0, pnode) cnode1 = CompartmentNode(2, ca=1.9e-6, g_l=0.4e-4, g_c=3.8e-3) self.ctree.addNodeWithParent(cnode1, pnode) cnode2 = CompartmentNode(3, ca=1.3e-6, g_l=0.5e-4, g_c=2.7e-2) self.ctree.addNodeWithParent(cnode2, pnode)
def _initTree1(self): # 1 2 # \ / # 0 croot = CompartmentNode(0, loc_ind=0) cnode1 = CompartmentNode(1, loc_ind=1) cnode2 = CompartmentNode(2, loc_ind=2) ctree = CompartmentTree(root=croot) ctree.addNodeWithParent(cnode1, croot) ctree.addNodeWithParent(cnode2, croot) self.ctree = ctree
def loadTModel(self): # simple T compartment model # pnode = CompartmentNode(0, ca=1.5e-5, g_l=2e-3) # self.ctree = CompartmentTree(root=pnode) # cnode = CompartmentNode(1, ca=1.5e-6, g_l=2.5e-4, g_c=2e-3) # self.ctree.addNodeWithParent(cnode, pnode) # lnode0 = CompartmentNode(2, ca=1.5e-6, g_l=2.5e-4, g_c=2e-3) # self.ctree.addNodeWithParent(lnode0, cnode) # lnode1 = CompartmentNode(3, ca=1.5e-6, g_l=2.5e-4, g_c=2e-3) # self.ctree.addNodeWithParent(lnode1, cnode) pnode = CompartmentNode(0, ca=1.5e-5, g_l=2e-3) self.ctree = CompartmentTree(root=pnode) cnode = CompartmentNode(1, ca=2e-6, g_l=3e-4, g_c=4e-3) self.ctree.addNodeWithParent(cnode, pnode) lnode0 = CompartmentNode(2, ca=1.5e-6, g_l=2.5e-4, g_c=3e-3) self.ctree.addNodeWithParent(lnode0, cnode) lnode1 = CompartmentNode(3, ca=1.5e-6, g_l=2.5e-4, g_c=5e-3) self.ctree.addNodeWithParent(lnode1, cnode)
def _initTree2(self): # 3 # | # 2 # | # 1 # | # 0 croot = CompartmentNode(0, loc_ind=0) cnode1 = CompartmentNode(1, loc_ind=1) cnode2 = CompartmentNode(2, loc_ind=2) cnode3 = CompartmentNode(3, loc_ind=3) ctree = CompartmentTree(root=croot) ctree.addNodeWithParent(cnode1, croot) ctree.addNodeWithParent(cnode2, cnode1) ctree.addNodeWithParent(cnode3, cnode2) self.ctree = ctree
def _initTree3(self): # 4 5 6 7 8 # \|/ \ / # 1 2 3 # \ | / # \|/ # 0 cns = [CompartmentNode(ii, loc_ind=ii) for ii in range(9)] ctree = CompartmentTree(root=cns[0]) # first order children ctree.addNodeWithParent(cns[1], cns[0]) ctree.addNodeWithParent(cns[2], cns[0]) ctree.addNodeWithParent(cns[3], cns[0]) # second order children ctree.addNodeWithParent(cns[4], cns[1]) ctree.addNodeWithParent(cns[5], cns[1]) ctree.addNodeWithParent(cns[6], cns[1]) ctree.addNodeWithParent(cns[7], cns[3]) ctree.addNodeWithParent(cns[8], cns[3]) self.ctree = ctree