Esempio n. 1
0
    def setUpClass(cls):
        cls.cell = SpineCell(name="cell")
        cls.soma = cls.cell.add_sec("soma", add_pas=True, nseg=10)
        cls.cell._add_spines_to_section(cls.soma,
                                        "new",
                                        0.5,
                                        1,
                                        1,
                                        0.5,
                                        0.5,
                                        None,
                                        None,
                                        None,
                                        None,
                                        add_pas=False)
        cls.head = cls.cell.heads[0]
        cls.neck = cls.cell.necks[0]
        cls.cell2 = SpineCell(name="cell2")
        cls.soma2 = cls.cell2.add_sec("soma", nseg=10, add_pas=True)
        cls.cell2._add_spines_to_section(cls.soma2,
                                         "new",
                                         0.3,
                                         .5,
                                         .5,
                                         0.3,
                                         0.3,
                                         None,
                                         None,
                                         None,
                                         None,
                                         add_pas=True)
        cls.head2 = cls.cell2.heads[0]
        cls.neck2 = cls.cell2.necks[0]

        cls.cell3 = SpineCell(name="cell3")
        cls.soma3 = cls.cell3.add_sec("soma", add_pas=True)
        cls.cell3._add_spines_to_section(cls.soma3, "new", 0.3, .5, .5, 0.3,
                                         0.3, -80, 1 / 30000, 100, 2)
        cls.head3 = cls.cell3.heads[0]
        cls.neck3 = cls.cell3.necks[0]

        cls.cell4 = SpineCell(name="cell4")
        cls.soma4 = cls.cell4.add_sec("soma", add_pas=True)
        cls.cell4._add_spines_to_section(cls.soma4, "new",
                                         [0.1, 0.2, 0.4, 0.8], .5, .5, 0.4,
                                         0.4, -80, 1 / 40000, 100, 2)
        cls.head4 = cls.cell4.heads
        cls.neck4 = cls.cell4.necks
Esempio n. 2
0
 def setUpClass(cls):
     path = os.path.dirname(os.path.abspath(__file__))
     f_path = os.path.join(path, "..", "commons/mods/combe2018")
     cls.cell = SpineCell("cell", compile_paths=f_path)
     cls.soma = cls.cell.add_sec("soma", add_pas=True, nseg=10)
     cls.soma.hoc.insert("hh")
     diam = 5
     lengths = [10]
     cls.dends = []
     for i, length in enumerate(lengths):
         dend = cls.cell.add_sec("dend%d" % i,
                                 add_pas=True,
                                 nseg=int(length / 10),
                                 l=length,
                                 diam=diam)
         cls.dends.append(dend)
         if i == 0:
             cls.cell.connect_secs(dend, cls.soma)
         else:
             cls.cell.connect_secs(dend, cls.dends[i - 1])
     cls.gbar_dend = 0.0002
     cls.gbar_spine = 0.0001
     cls.gkca = 0.00075
     cls.cell.insert("calH", "dend", gcalbar=cls.gbar_dend)
     cls.cell.insert("kca", "dend", gbar=cls.gkca)
     cls.regions = cls.cell.filter_secs("dend", as_list=True)
     cls.cell.add_spines_by_density(cls.regions,
                                    0.02,
                                    "thin",
                                    add_pas=True,
                                    spine_cm=10)
     cls.cell.insert("calH", "head", gcalbar=cls.gbar_spine)
     cls.cell.compensate(cm_adjustment=False, calH="gcalbar")
     cls.cell.compensate(cm_adjustment=False, kca="gbar")
     cls.cell.compensate(cm_adjustment=True)
Esempio n. 3
0
 def setUpClass(cls):
     path = os.path.dirname(os.path.abspath(__file__))
     f_path = os.path.join(path, "..", "commons/mods/combe2018")
     cls.cell = SpineCell("cell", compile_paths=f_path)
     cls.soma = cls.cell.add_sec("soma", add_pas=True, nseg=10)
     cls.diam = 5
     cls.lengths = np.linspace(100, 50, 5)
     cls.dends = []
     for i, length in enumerate(cls.lengths):
         dend = cls.cell.add_sec("dend%d" % i,
                                 add_pas=True,
                                 nseg=int(length / 10),
                                 l=length,
                                 diam=cls.diam)
         cls.dends.append(dend)
         if i == 0:
             cls.cell.connect_secs(dend, cls.soma)
         else:
             cls.cell.connect_secs(dend, cls.dends[i - 1])
     cls.regions = cls.cell.filter_secs("dend", as_list=True)
     cls.cell.add_spines_by_density(cls.regions, 0.02, "thin", add_pas=True)
     cls.cell.insert("calH", cls.cell.heads, gcalbar=0.0001)
     cls.out_calH = cls.cell._get_spine_factor(cls.cell.spines[:2], "calH",
                                               "gcalbar")
     cls.out_cm = cls.cell._get_spine_factor(cls.cell.spines[:2], "cm",
                                             None)
Esempio n. 4
0
    def setUpClass(cls):
        path = os.path.dirname(os.path.abspath(__file__))
        f_path = os.path.join(path, "..", "commons/mods/combe2018")
        cls.cell = SpineCell("cell", compile_paths=f_path)
        cls.soma = cls.cell.add_sec("soma", add_pas=True, nseg=10)
        cls.soma.hoc.insert("hh")
        diam = 5
        lengths = np.linspace(100, 50, 10)
        cls.dends = []
        for i, length in enumerate(lengths):
            dend = cls.cell.add_sec("dend%d" % i,
                                    add_pas=True,
                                    nseg=int(length / 10),
                                    l=length)
            cls.dends.append(dend)
            if i == 0:
                cls.cell.connect_secs(dend, cls.soma)
            else:
                cls.cell.connect_secs(dend, cls.dends[i - 1])
        cls.cell.insert("calH", "dend", gcalbar=0.0002)
        cls.cell.insert("kca", "dend", gbar=0.00075)
        cls.regions = cls.cell.filter_secs("dend", as_list=True)
        cls.cell.add_spines_by_density(cls.regions, 0.02, "thin", add_pas=True)
        cls.cell.insert("calH", "head", gcalbar=0.0001)

        cls.find_calH = cls.cell.get_spines_by_section("calH")
        cls.find_kca = cls.cell.get_spines_by_section("kca")
        cls.find_all = cls.cell.get_spines_by_section(None)
Esempio n. 5
0
    def setUpClass(cls):
        cell = SpineCell(name="cell")
        cls.soma = cell.add_sec("soma", g_pas=1 / 30000, E_rest=-76,
                                ra=40, cm=1.1, nseg=100, add_pas=True)
        cls.e_pas1, cls.g_pas1, cls.ra1, \
            cls.cm1 = establish_electric_properties(cls.soma,
                                                    None, None,
                                                    None, None)

        cls.e_pas2, cls.g_pas2, cls.ra2, \
            cls.cm2 = establish_electric_properties(cls.soma,
                                                    -79, 1 / 20000,
                                                    50, 1.2)
        cls.dend = cell.add_sec("dend")
        cls.e_pas3, cls.g_pas3, cls.ra3, \
            cls.cm3 = establish_electric_properties(cls.dend, None, None,
                                                    None, None)
Esempio n. 6
0
    def setUpClass(cls):
        cls.cell1 = SpineCell(name="cell1")
        cls.dend1 = cls.cell1.add_sec("dend1", add_pas=True)
        cls.dend2 = cls.cell1.add_sec("dend2", add_pas=True)
        cls.cell1.connect_secs(cls.dend2, cls.dend1)
        cls.spine_density = 2 / 100
        cls.n_spines = 2
        cls.head_diam = cls.head_len = 1
        cls.neck_diam = cls.neck_len = 0.5
        cls.E_pas = -80
        cls.g_pas = 1 / 20000
        cls.ra = 100
        cls.cm = 1.1
        cls.out_1 = cls.cell1.add_spines_to_section_list(
            [cls.dend1, cls.dend2],
            cls.spine_density,
            spine_type="mushroom",
            spine_E_pas=cls.E_pas,
            spine_g_pas=cls.g_pas,
            spine_ra=cls.ra,
            spine_cm=cls.cm,
            u_random=None,
            area_density=False,
            add_pas=True)

        cls.cell2 = SpineCell(name="cell2")
        cls.dend21 = cls.cell2.add_sec("dend1", add_pas=True)
        cls.dend22 = cls.cell2.add_sec("dend2", add_pas=True)
        cls.cell2.connect_secs(cls.dend21, cls.dend22)
        cls.out_2 = cls.cell2.add_spines_to_section_list(
            [cls.dend21, cls.dend22],
            cls.spine_density,
            spine_type="mushroom",
            head_diam=cls.head_diam,
            head_len=cls.head_len,
            neck_diam=cls.neck_diam,
            neck_len=cls.neck_len,
            add_pas=False,
            u_random=1,
            area_density=False)
        cls.cell3 = SpineCell(name="cell3")
        cls.soma3 = cls.cell3.add_sec("soma", add_pas=False)
        cls.cell3.add_spines_to_section_list([cls.soma3],
                                             cls.spine_density,
                                             spine_type="weird",
                                             add_pas=False)
Esempio n. 7
0
 def __init__(self, name=None, compile_paths=None):
     SpineCell.__init__(self, name, compile_paths=compile_paths)
     SynapticGroupCell.__init__(self, name, compile_paths=compile_paths)
 def __init__(self, name=None, compile_paths=None):
     ComplexSynapticCell.__init__(self, name, compile_paths=compile_paths)
     SpineCell.__init__(self, name)
Esempio n. 9
0
 def setUpClass(cls):
     cell = SpineCell(name="cell")
     cls.soma = cell.add_sec("soma", nseg=10)