bluecellulab 2.2.2__py3-none-any.whl → 2.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bluecellulab might be problematic. Click here for more details.
- bluecellulab/cell/core.py +25 -38
- bluecellulab/circuit/circuit_access.py +1 -1
- bluecellulab/plotwindow.py +1 -1
- bluecellulab/psection.py +2 -5
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/METADATA +1 -1
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/RECORD +10 -10
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/AUTHORS.txt +0 -0
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/LICENSE +0 -0
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/WHEEL +0 -0
- {bluecellulab-2.2.2.dist-info → bluecellulab-2.2.4.dist-info}/top_level.txt +0 -0
bluecellulab/cell/core.py
CHANGED
|
@@ -101,9 +101,6 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
101
101
|
|
|
102
102
|
self.cellname = neuron.h.secname(sec=self.soma).split(".")[0]
|
|
103
103
|
|
|
104
|
-
# Set the gid of the cell
|
|
105
|
-
self.cell.getCell().gid = self.cell_id.id
|
|
106
|
-
|
|
107
104
|
if rng_settings is None:
|
|
108
105
|
self.rng_settings = RNGSettings("Random123") # SONATA value
|
|
109
106
|
else:
|
|
@@ -121,11 +118,11 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
121
118
|
# time recording needs this push
|
|
122
119
|
self.soma.push()
|
|
123
120
|
self.hocname = neuron.h.secname(sec=self.soma).split(".")[0]
|
|
124
|
-
self.somatic =
|
|
125
|
-
self.basal =
|
|
126
|
-
self.apical =
|
|
127
|
-
self.axonal =
|
|
128
|
-
self.all =
|
|
121
|
+
self.somatic = list(public_hoc_cell(self.cell).somatic)
|
|
122
|
+
self.basal = list(public_hoc_cell(self.cell).basal) # dend is same as basal
|
|
123
|
+
self.apical = list(public_hoc_cell(self.cell).apical)
|
|
124
|
+
self.axonal = list(public_hoc_cell(self.cell).axonal)
|
|
125
|
+
self.all = list(public_hoc_cell(self.cell).all)
|
|
129
126
|
self.record_dt = record_dt
|
|
130
127
|
self.add_recordings(['self.soma(0.5)._ref_v', 'neuron.h._ref_t'],
|
|
131
128
|
dt=self.record_dt)
|
|
@@ -560,11 +557,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
560
557
|
syn_description, self
|
|
561
558
|
)
|
|
562
559
|
|
|
563
|
-
|
|
564
|
-
weight_scalar = connection_modifiers['Weight']
|
|
565
|
-
else:
|
|
566
|
-
weight_scalar = 1.0
|
|
567
|
-
|
|
560
|
+
weight_scalar = connection_modifiers.get('Weight', 1.0)
|
|
568
561
|
exc_mini_frequency, inh_mini_frequency = mini_frequencies \
|
|
569
562
|
if mini_frequencies is not None else (None, None)
|
|
570
563
|
|
|
@@ -573,11 +566,10 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
573
566
|
# SpontMinis in sim config takes precedence of values in nodes file
|
|
574
567
|
if 'SpontMinis' in connection_modifiers:
|
|
575
568
|
spont_minis_rate = connection_modifiers['SpontMinis']
|
|
569
|
+
elif synapse.mech_name in ["GluSynapse", "ProbAMPANMDA_EMS"]:
|
|
570
|
+
spont_minis_rate = exc_mini_frequency
|
|
576
571
|
else:
|
|
577
|
-
|
|
578
|
-
spont_minis_rate = exc_mini_frequency
|
|
579
|
-
else:
|
|
580
|
-
spont_minis_rate = inh_mini_frequency
|
|
572
|
+
spont_minis_rate = inh_mini_frequency
|
|
581
573
|
|
|
582
574
|
if spont_minis_rate is not None and spont_minis_rate > 0:
|
|
583
575
|
sec = self.get_hsection(post_sec_id)
|
|
@@ -590,8 +582,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
590
582
|
self.syn_mini_netcons[synapse_id].delay = 0.1
|
|
591
583
|
self.syn_mini_netcons[synapse_id].weight[0] = weight * weight_scalar
|
|
592
584
|
# set netcon type
|
|
593
|
-
nc_param_name = 'nc_type_param_{}'.
|
|
594
|
-
synapse.hsynapse).split('[')[0]
|
|
585
|
+
nc_param_name = f'nc_type_param_{synapse.hsynapse}'.split('[')[0]
|
|
595
586
|
if hasattr(neuron.h, nc_param_name):
|
|
596
587
|
nc_type_param = int(getattr(neuron.h, nc_param_name))
|
|
597
588
|
# NC_SPONTMINI
|
|
@@ -655,7 +646,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
655
646
|
"""Get the children section of a neuron section."""
|
|
656
647
|
number_children = neuron.h.SectionRef(sec=parentsection).nchild()
|
|
657
648
|
children = []
|
|
658
|
-
for index in range(
|
|
649
|
+
for index in range(int(number_children)):
|
|
659
650
|
children.append(neuron.h.SectionRef(sec=self.soma).child[index])
|
|
660
651
|
return children
|
|
661
652
|
|
|
@@ -679,10 +670,10 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
679
670
|
self.get_recording(secname)
|
|
680
671
|
self.get_recording(child)
|
|
681
672
|
|
|
682
|
-
def somatic_branches(self):
|
|
673
|
+
def somatic_branches(self) -> None:
|
|
683
674
|
"""Show the index numbers."""
|
|
684
675
|
nchild = neuron.h.SectionRef(sec=self.soma).nchild()
|
|
685
|
-
for index in range(
|
|
676
|
+
for index in range(int(nchild)):
|
|
686
677
|
secname = neuron.h.secname(sec=neuron.h.SectionRef(
|
|
687
678
|
sec=self.soma).child[index])
|
|
688
679
|
if "axon" not in secname:
|
|
@@ -699,9 +690,9 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
699
690
|
public_hoc_cell(self.cell).nSecBasal + apicnumber)
|
|
700
691
|
logger.info((apicnumber, secnumber))
|
|
701
692
|
else:
|
|
702
|
-
raise
|
|
703
|
-
"somaticbranches: No apic or
|
|
704
|
-
|
|
693
|
+
raise BluecellulabError(
|
|
694
|
+
f"somaticbranches: No apic or dend found in section {secname}"
|
|
695
|
+
)
|
|
705
696
|
|
|
706
697
|
@staticmethod
|
|
707
698
|
@deprecated("Use bluecellulab.cell.section_distance.EuclideanSectionDistance instead.")
|
|
@@ -743,7 +734,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
743
734
|
|
|
744
735
|
children = [
|
|
745
736
|
neuron.h.SectionRef(sec=max_diam_section).child[index]
|
|
746
|
-
for index in range(
|
|
737
|
+
for index in range(int(neuron.h.SectionRef(
|
|
747
738
|
sec=max_diam_section).nchild()))]
|
|
748
739
|
if len(children) == 0:
|
|
749
740
|
break
|
|
@@ -808,18 +799,14 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
808
799
|
@property
|
|
809
800
|
def info_dict(self):
|
|
810
801
|
"""Return a dictionary with all the information of this cell."""
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
for sid, connection in self.connections.items():
|
|
820
|
-
cell_info['connections'][sid] = connection.info_dict
|
|
821
|
-
|
|
822
|
-
return cell_info
|
|
802
|
+
return {
|
|
803
|
+
'synapses': {
|
|
804
|
+
sid: synapse.info_dict for sid, synapse in self.synapses.items()
|
|
805
|
+
},
|
|
806
|
+
'connections': {
|
|
807
|
+
sid: connection.info_dict for sid, connection in self.connections.items()
|
|
808
|
+
}
|
|
809
|
+
}
|
|
823
810
|
|
|
824
811
|
def delete(self):
|
|
825
812
|
"""Delete the cell."""
|
|
@@ -557,7 +557,7 @@ class SonataCircuitAccess:
|
|
|
557
557
|
edges = self._circuit.edges
|
|
558
558
|
# select edges that are in the projections, if there are projections
|
|
559
559
|
if projections is None or len(projections) == 0:
|
|
560
|
-
edge_population_names =
|
|
560
|
+
edge_population_names = list(edges)
|
|
561
561
|
elif isinstance(projections, str):
|
|
562
562
|
edge_population_names = [x for x in edges if edges[x].source.name == projections]
|
|
563
563
|
else:
|
bluecellulab/plotwindow.py
CHANGED
|
@@ -52,7 +52,7 @@ class PlotWindow:
|
|
|
52
52
|
# Sorry, don't see a way but disable this warning to access this
|
|
53
53
|
colors = pylab.rcParams['axes.prop_cycle'].by_key()['color']
|
|
54
54
|
|
|
55
|
-
linecolors =
|
|
55
|
+
linecolors = list(itertools.islice(itertools.cycle(colors), 0, 50))
|
|
56
56
|
|
|
57
57
|
self.line[var_name] = pylab.Line2D(
|
|
58
58
|
time, recording, label=var_name,
|
bluecellulab/psection.py
CHANGED
|
@@ -124,7 +124,7 @@ class PSection:
|
|
|
124
124
|
|
|
125
125
|
def getAllPDescendants(self):
|
|
126
126
|
"""Return all the psection that are descendants of this psection."""
|
|
127
|
-
pdescendants =
|
|
127
|
+
pdescendants = list(self.pchildren)
|
|
128
128
|
for child in self.pchildren:
|
|
129
129
|
pdescendants += child.getAllPDescendants()
|
|
130
130
|
return pdescendants
|
|
@@ -158,10 +158,7 @@ class PSection:
|
|
|
158
158
|
if self.isLeaf:
|
|
159
159
|
treeWidth = self.maxsegdiam + self.xSpacing
|
|
160
160
|
else:
|
|
161
|
-
treeWidth =
|
|
162
|
-
for child in self.pchildren:
|
|
163
|
-
treeWidth += child.treeWidth()
|
|
164
|
-
|
|
161
|
+
treeWidth = sum(child.treeWidth() for child in self.pchildren)
|
|
165
162
|
return max(self.diam + self.xSpacing, treeWidth)
|
|
166
163
|
|
|
167
164
|
def treeHeight(self):
|
|
@@ -5,8 +5,8 @@ bluecellulab/exceptions.py,sha256=ggTrfzoW3y0oDFUp3ff7GR9buLo-I2LM8XwxE1vQS9k,23
|
|
|
5
5
|
bluecellulab/graph.py,sha256=ODiQy4xjRVxtNITXeXpYnqHas0wR7gZ_aXuDAF7jMq4,3419
|
|
6
6
|
bluecellulab/importer.py,sha256=R9UPMK8MeZE8WJr2-VYyUOq3JqZe_VX5deaPuiW-1Gs,2848
|
|
7
7
|
bluecellulab/neuron_interpreter.py,sha256=XPbQtOPIDk-sGydl4wuanOIeKl_rWvncXEsaweYTzVw,2185
|
|
8
|
-
bluecellulab/plotwindow.py,sha256
|
|
9
|
-
bluecellulab/psection.py,sha256=
|
|
8
|
+
bluecellulab/plotwindow.py,sha256=u9bxWD6xYgzWBF-mI6Pi_qRAf3a4Wo4aqnH65f2W7v4,2721
|
|
9
|
+
bluecellulab/psection.py,sha256=jiO75BAqNNg1_jwvDFrK1D2ay0j-dHJi-PcprOVG9u8,6013
|
|
10
10
|
bluecellulab/psegment.py,sha256=f6NEryhuYplQyPLv_4t3d7lfh1rZW87xz8wiyOJ_0To,3121
|
|
11
11
|
bluecellulab/rngsettings.py,sha256=Vz8qO1WI4TB9Cydy92AA3OSsDy9ZAxyFOYbj1Cazygk,3986
|
|
12
12
|
bluecellulab/ssim.py,sha256=tbnLkddarBaa8TANZm9lTMli09lCtf1lG1auqR-XXzI,33282
|
|
@@ -16,7 +16,7 @@ bluecellulab/type_aliases.py,sha256=EMrunY-pIgZrsmetpAM8lA7tr0TFEzFoU5SX9sBuiOk,
|
|
|
16
16
|
bluecellulab/utils.py,sha256=GKZkRYI2LY08tsIkG95MGn7EfmV4pBrIAqfRQCW14fs,300
|
|
17
17
|
bluecellulab/cell/__init__.py,sha256=Sbc0QOsJ8E7tSwf3q7fsXuE_SevBN6ZmoCVyyU5zfII,208
|
|
18
18
|
bluecellulab/cell/cell_dict.py,sha256=BKpJLYLrJCffKGak4EfGZtgus_u0Scz0NKas7tY31vE,1346
|
|
19
|
-
bluecellulab/cell/core.py,sha256=
|
|
19
|
+
bluecellulab/cell/core.py,sha256=6WMp8fQoGFu1M1xQQX_HP-KTq1bJBwr8H36-dPV2QkQ,34145
|
|
20
20
|
bluecellulab/cell/injector.py,sha256=QRg4GgK6qXFP-TnH8sg248_bHl8GfWonGoC4X-KI_nk,16843
|
|
21
21
|
bluecellulab/cell/plotting.py,sha256=2yz7AIttx16spVTSrTogRRqhxFA9nrrGdo5jgANeUwg,4031
|
|
22
22
|
bluecellulab/cell/random.py,sha256=s8Kf0q24fiA5rBdVCVbIdDMQGCDfQcwLwXRB72p1e1g,1773
|
|
@@ -29,7 +29,7 @@ bluecellulab/cell/ballstick/__init__.py,sha256=vywMSPAeTuCcK_E9gD8UX2XD1KfKbfCVF
|
|
|
29
29
|
bluecellulab/cell/ballstick/emodel.hoc,sha256=7WcuepK-wB9bASRvNdCwO9Woc9-SpBCFqBqCXKgjsV8,1517
|
|
30
30
|
bluecellulab/cell/ballstick/morphology.asc,sha256=EO0VIRilJAwpiDP2hIevwusfvYptNYhvsu1f5GgbSQo,190
|
|
31
31
|
bluecellulab/circuit/__init__.py,sha256=Khpa13nzNvDlDS2JduyoFTukEduEkWCc5ML_JwGpmZs,361
|
|
32
|
-
bluecellulab/circuit/circuit_access.py,sha256=
|
|
32
|
+
bluecellulab/circuit/circuit_access.py,sha256=HDFiE6Msh7nULYHOGcQp1S6s5eZvq-Iy6nlYbZQUD4U,27507
|
|
33
33
|
bluecellulab/circuit/format.py,sha256=Q_YENbm45st6JjW80oMOOnLPdzKeVJh5nS_HHq1oj8g,1674
|
|
34
34
|
bluecellulab/circuit/iotools.py,sha256=R_iDo1CM0X5z0SF_QtV4Ol4k5xX8kerE7n5djaY4Fxo,1591
|
|
35
35
|
bluecellulab/circuit/node_id.py,sha256=OFNNt4g8w4Z6ZTh0qsbHqdSrWdftDp--tDaq_0-bLd8,1265
|
|
@@ -50,9 +50,9 @@ bluecellulab/simulation/simulation.py,sha256=sMTp3cjC3u-HAfw4WM1cab1ZpORCERPwgEj
|
|
|
50
50
|
bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HAwuk,192
|
|
51
51
|
bluecellulab/synapse/synapse_factory.py,sha256=qrtK_BMWGkpk1embG4oEkrLutt3L_ntqypuvYBxXPEA,6802
|
|
52
52
|
bluecellulab/synapse/synapse_types.py,sha256=WDWpA9rpnyQg8tNuDK-NDPP-C22Ukx69aNljHwMiqkg,17027
|
|
53
|
-
bluecellulab-2.2.
|
|
54
|
-
bluecellulab-2.2.
|
|
55
|
-
bluecellulab-2.2.
|
|
56
|
-
bluecellulab-2.2.
|
|
57
|
-
bluecellulab-2.2.
|
|
58
|
-
bluecellulab-2.2.
|
|
53
|
+
bluecellulab-2.2.4.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
|
|
54
|
+
bluecellulab-2.2.4.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
|
|
55
|
+
bluecellulab-2.2.4.dist-info/METADATA,sha256=vJBENOmPbIpAwgowk0RqWJJs1lkSD7_Ci0OOQu_GNIM,6907
|
|
56
|
+
bluecellulab-2.2.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
57
|
+
bluecellulab-2.2.4.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
|
|
58
|
+
bluecellulab-2.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|