bluecellulab 2.2.3__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 -35
- bluecellulab/circuit/circuit_access.py +1 -1
- bluecellulab/plotwindow.py +1 -1
- bluecellulab/psection.py +2 -5
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/METADATA +1 -1
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/RECORD +10 -10
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/AUTHORS.txt +0 -0
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/LICENSE +0 -0
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/WHEEL +0 -0
- {bluecellulab-2.2.3.dist-info → bluecellulab-2.2.4.dist-info}/top_level.txt +0 -0
bluecellulab/cell/core.py
CHANGED
|
@@ -118,11 +118,11 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
118
118
|
# time recording needs this push
|
|
119
119
|
self.soma.push()
|
|
120
120
|
self.hocname = neuron.h.secname(sec=self.soma).split(".")[0]
|
|
121
|
-
self.somatic =
|
|
122
|
-
self.basal =
|
|
123
|
-
self.apical =
|
|
124
|
-
self.axonal =
|
|
125
|
-
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)
|
|
126
126
|
self.record_dt = record_dt
|
|
127
127
|
self.add_recordings(['self.soma(0.5)._ref_v', 'neuron.h._ref_t'],
|
|
128
128
|
dt=self.record_dt)
|
|
@@ -557,11 +557,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
557
557
|
syn_description, self
|
|
558
558
|
)
|
|
559
559
|
|
|
560
|
-
|
|
561
|
-
weight_scalar = connection_modifiers['Weight']
|
|
562
|
-
else:
|
|
563
|
-
weight_scalar = 1.0
|
|
564
|
-
|
|
560
|
+
weight_scalar = connection_modifiers.get('Weight', 1.0)
|
|
565
561
|
exc_mini_frequency, inh_mini_frequency = mini_frequencies \
|
|
566
562
|
if mini_frequencies is not None else (None, None)
|
|
567
563
|
|
|
@@ -570,11 +566,10 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
570
566
|
# SpontMinis in sim config takes precedence of values in nodes file
|
|
571
567
|
if 'SpontMinis' in connection_modifiers:
|
|
572
568
|
spont_minis_rate = connection_modifiers['SpontMinis']
|
|
569
|
+
elif synapse.mech_name in ["GluSynapse", "ProbAMPANMDA_EMS"]:
|
|
570
|
+
spont_minis_rate = exc_mini_frequency
|
|
573
571
|
else:
|
|
574
|
-
|
|
575
|
-
spont_minis_rate = exc_mini_frequency
|
|
576
|
-
else:
|
|
577
|
-
spont_minis_rate = inh_mini_frequency
|
|
572
|
+
spont_minis_rate = inh_mini_frequency
|
|
578
573
|
|
|
579
574
|
if spont_minis_rate is not None and spont_minis_rate > 0:
|
|
580
575
|
sec = self.get_hsection(post_sec_id)
|
|
@@ -587,8 +582,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
587
582
|
self.syn_mini_netcons[synapse_id].delay = 0.1
|
|
588
583
|
self.syn_mini_netcons[synapse_id].weight[0] = weight * weight_scalar
|
|
589
584
|
# set netcon type
|
|
590
|
-
nc_param_name = 'nc_type_param_{}'.
|
|
591
|
-
synapse.hsynapse).split('[')[0]
|
|
585
|
+
nc_param_name = f'nc_type_param_{synapse.hsynapse}'.split('[')[0]
|
|
592
586
|
if hasattr(neuron.h, nc_param_name):
|
|
593
587
|
nc_type_param = int(getattr(neuron.h, nc_param_name))
|
|
594
588
|
# NC_SPONTMINI
|
|
@@ -652,7 +646,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
652
646
|
"""Get the children section of a neuron section."""
|
|
653
647
|
number_children = neuron.h.SectionRef(sec=parentsection).nchild()
|
|
654
648
|
children = []
|
|
655
|
-
for index in range(
|
|
649
|
+
for index in range(int(number_children)):
|
|
656
650
|
children.append(neuron.h.SectionRef(sec=self.soma).child[index])
|
|
657
651
|
return children
|
|
658
652
|
|
|
@@ -676,10 +670,10 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
676
670
|
self.get_recording(secname)
|
|
677
671
|
self.get_recording(child)
|
|
678
672
|
|
|
679
|
-
def somatic_branches(self):
|
|
673
|
+
def somatic_branches(self) -> None:
|
|
680
674
|
"""Show the index numbers."""
|
|
681
675
|
nchild = neuron.h.SectionRef(sec=self.soma).nchild()
|
|
682
|
-
for index in range(
|
|
676
|
+
for index in range(int(nchild)):
|
|
683
677
|
secname = neuron.h.secname(sec=neuron.h.SectionRef(
|
|
684
678
|
sec=self.soma).child[index])
|
|
685
679
|
if "axon" not in secname:
|
|
@@ -696,9 +690,9 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
696
690
|
public_hoc_cell(self.cell).nSecBasal + apicnumber)
|
|
697
691
|
logger.info((apicnumber, secnumber))
|
|
698
692
|
else:
|
|
699
|
-
raise
|
|
700
|
-
"somaticbranches: No apic or
|
|
701
|
-
|
|
693
|
+
raise BluecellulabError(
|
|
694
|
+
f"somaticbranches: No apic or dend found in section {secname}"
|
|
695
|
+
)
|
|
702
696
|
|
|
703
697
|
@staticmethod
|
|
704
698
|
@deprecated("Use bluecellulab.cell.section_distance.EuclideanSectionDistance instead.")
|
|
@@ -740,7 +734,7 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
740
734
|
|
|
741
735
|
children = [
|
|
742
736
|
neuron.h.SectionRef(sec=max_diam_section).child[index]
|
|
743
|
-
for index in range(
|
|
737
|
+
for index in range(int(neuron.h.SectionRef(
|
|
744
738
|
sec=max_diam_section).nchild()))]
|
|
745
739
|
if len(children) == 0:
|
|
746
740
|
break
|
|
@@ -805,18 +799,14 @@ class Cell(InjectableMixin, PlottableMixin):
|
|
|
805
799
|
@property
|
|
806
800
|
def info_dict(self):
|
|
807
801
|
"""Return a dictionary with all the information of this cell."""
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
for sid, connection in self.connections.items():
|
|
817
|
-
cell_info['connections'][sid] = connection.info_dict
|
|
818
|
-
|
|
819
|
-
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
|
+
}
|
|
820
810
|
|
|
821
811
|
def delete(self):
|
|
822
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
|