bluecellulab 2.6.17__py3-none-any.whl → 2.6.19__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/analysis/inject_sequence.py +8 -1
- bluecellulab/circuit/circuit_access/sonata_circuit_access.py +2 -2
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/METADATA +1 -1
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/RECORD +8 -8
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/AUTHORS.txt +0 -0
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/LICENSE +0 -0
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/WHEEL +0 -0
- {bluecellulab-2.6.17.dist-info → bluecellulab-2.6.19.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ from bluecellulab.cell.core import Cell
|
|
|
9
9
|
from bluecellulab.cell.template import TemplateParams
|
|
10
10
|
from bluecellulab.simulation.parallel import IsolatedProcess
|
|
11
11
|
from bluecellulab.simulation.simulation import Simulation
|
|
12
|
+
from bluecellulab.stimulus.circuit_stimulus_definitions import Hyperpolarizing
|
|
12
13
|
from bluecellulab.stimulus.factory import Stimulus, StimulusFactory
|
|
13
14
|
|
|
14
15
|
|
|
@@ -38,6 +39,7 @@ def run_stimulus(
|
|
|
38
39
|
section: str,
|
|
39
40
|
segment: float,
|
|
40
41
|
cvode: bool = True,
|
|
42
|
+
add_hypamp: bool = True,
|
|
41
43
|
) -> Recording:
|
|
42
44
|
"""Creates a cell and stimulates it with a given stimulus.
|
|
43
45
|
|
|
@@ -56,6 +58,9 @@ def run_stimulus(
|
|
|
56
58
|
"""
|
|
57
59
|
cell = Cell.from_template_parameters(template_params)
|
|
58
60
|
neuron_section = cell.sections[section]
|
|
61
|
+
if add_hypamp:
|
|
62
|
+
hyp_stim = Hyperpolarizing(target="", delay=0.0, duration=stimulus.stimulus_time)
|
|
63
|
+
cell.add_replay_hypamp(hyp_stim)
|
|
59
64
|
cell.add_voltage_recording(neuron_section, segment)
|
|
60
65
|
iclamp, _ = cell.inject_current_waveform(
|
|
61
66
|
stimulus.time, stimulus.current, section=neuron_section, segx=segment
|
|
@@ -81,6 +86,7 @@ def apply_multiple_stimuli(
|
|
|
81
86
|
segment: float = 0.5,
|
|
82
87
|
n_processes: int | None = None,
|
|
83
88
|
cvode: bool = True,
|
|
89
|
+
add_hypamp: bool = True,
|
|
84
90
|
) -> StimulusRecordings:
|
|
85
91
|
"""Apply multiple stimuli to the cell on isolated processes.
|
|
86
92
|
|
|
@@ -95,6 +101,7 @@ def apply_multiple_stimuli(
|
|
|
95
101
|
segment: The segment of the section where the stimuli are applied.
|
|
96
102
|
n_processes: The number of processes to use for running the stimuli.
|
|
97
103
|
cvode: True to use variable time-steps. False for fixed time-steps.
|
|
104
|
+
add_hypamp: True to add the cell's holding current stimulus
|
|
98
105
|
|
|
99
106
|
Returns:
|
|
100
107
|
A dictionary where the keys are the names of the stimuli and the values
|
|
@@ -144,7 +151,7 @@ def apply_multiple_stimuli(
|
|
|
144
151
|
else:
|
|
145
152
|
raise ValueError("Unknown stimulus name.")
|
|
146
153
|
|
|
147
|
-
task_args.append((cell.template_params, stimulus, section_name, segment, cvode))
|
|
154
|
+
task_args.append((cell.template_params, stimulus, section_name, segment, cvode, add_hypamp))
|
|
148
155
|
|
|
149
156
|
with IsolatedProcess(processes=n_processes) as pool:
|
|
150
157
|
# Map expects a function and a list of argument tuples
|
|
@@ -47,7 +47,7 @@ class SonataCircuitAccess:
|
|
|
47
47
|
raise FileNotFoundError(f"Circuit config file {simulation_config} not found.")
|
|
48
48
|
|
|
49
49
|
if isinstance(simulation_config, SonataSimulationConfig):
|
|
50
|
-
self.config
|
|
50
|
+
self.config = simulation_config
|
|
51
51
|
else:
|
|
52
52
|
self.config = SonataSimulationConfig(simulation_config)
|
|
53
53
|
circuit_config = self.config.impl.config["network"]
|
|
@@ -191,7 +191,7 @@ class SonataCircuitAccess:
|
|
|
191
191
|
|
|
192
192
|
@lru_cache(maxsize=16)
|
|
193
193
|
def get_target_cell_ids(self, target: str) -> set[CellId]:
|
|
194
|
-
ids = self._circuit.nodes.ids(target)
|
|
194
|
+
ids = self._circuit.nodes.ids(self.config.impl.node_sets[target])
|
|
195
195
|
return {CellId(x.population, x.id) for x in ids}
|
|
196
196
|
|
|
197
197
|
@lru_cache(maxsize=100)
|
|
@@ -15,7 +15,7 @@ bluecellulab/type_aliases.py,sha256=DvgjERv2Ztdw_sW63JrZTQGpJ0x5uMTFB5hcBHDb0WA,
|
|
|
15
15
|
bluecellulab/utils.py,sha256=SbOOkzw1YGjCKV3qOw0zpabNEy7V9BRtgMLsQJiFRq4,1526
|
|
16
16
|
bluecellulab/verbosity.py,sha256=T0IgX7DrRo19faxrT4Xzb27gqxzoILQ8FzYKxvUeaPM,1342
|
|
17
17
|
bluecellulab/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
bluecellulab/analysis/inject_sequence.py,sha256=
|
|
18
|
+
bluecellulab/analysis/inject_sequence.py,sha256=Ih3wdNRn0-lM-NW8agrMUGS862CEgzn_hl54DFDXyjM,6325
|
|
19
19
|
bluecellulab/cell/__init__.py,sha256=Sbc0QOsJ8E7tSwf3q7fsXuE_SevBN6ZmoCVyyU5zfII,208
|
|
20
20
|
bluecellulab/cell/cell_dict.py,sha256=PVmZsjhZ9jp3HC-8QmdFqp-crAcVMSVeLWujcOPLlpo,1346
|
|
21
21
|
bluecellulab/cell/core.py,sha256=2UtXXd4FA2X5A_7ljjbN4yobpMWD2FWfux67ZFND2rI,31315
|
|
@@ -41,7 +41,7 @@ bluecellulab/circuit/validate.py,sha256=7EUN15u0JFFlLf389jUBqLwDOHyZdfKtoidI-xLU
|
|
|
41
41
|
bluecellulab/circuit/circuit_access/__init__.py,sha256=sgp6m5kP-pq60V1IFGUiSUR1OW01zdxXNNUJmPA8anI,201
|
|
42
42
|
bluecellulab/circuit/circuit_access/bluepy_circuit_access.py,sha256=pUoTw6wXMGZAqjjC3vpdZcm8ex108aEPw0L6fSypx9g,14273
|
|
43
43
|
bluecellulab/circuit/circuit_access/definition.py,sha256=SnKBFEgdXFG-QexYRrGSzVAd7bSj7NwN0IuTsjDOrDY,4435
|
|
44
|
-
bluecellulab/circuit/circuit_access/sonata_circuit_access.py,sha256=
|
|
44
|
+
bluecellulab/circuit/circuit_access/sonata_circuit_access.py,sha256=N5ynUkDotAjAtJgECQoBej0wJTlsU7cJZGF-MyxQhF4,10361
|
|
45
45
|
bluecellulab/circuit/config/__init__.py,sha256=aaoJXRKBJzpxxREo9NxKc-_CCPmVeuR1mcViRXcLrC4,215
|
|
46
46
|
bluecellulab/circuit/config/bluepy_simulation_config.py,sha256=tUyHvzlxFWRxh8rBNvU0FdUqGqJR2G8OXifATQ9W7yw,6974
|
|
47
47
|
bluecellulab/circuit/config/definition.py,sha256=o0751Dd83f8TWGw95EAQ8coJrYGasdshrIrXViF5lzg,2774
|
|
@@ -62,9 +62,9 @@ bluecellulab/stimulus/factory.py,sha256=XDbnqCuMCh1RdZLKvlRucMj3wkXDqy6mEda_Oh6Y
|
|
|
62
62
|
bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HAwuk,192
|
|
63
63
|
bluecellulab/synapse/synapse_factory.py,sha256=3y15LlaBoNJiU2KUeTkh70pyU5OYf6xQIMSBmmMPMak,6987
|
|
64
64
|
bluecellulab/synapse/synapse_types.py,sha256=4gne-hve2vq1Lau-LAVPsfLjffVYqAYBW3kCfC7_600,16871
|
|
65
|
-
bluecellulab-2.6.
|
|
66
|
-
bluecellulab-2.6.
|
|
67
|
-
bluecellulab-2.6.
|
|
68
|
-
bluecellulab-2.6.
|
|
69
|
-
bluecellulab-2.6.
|
|
70
|
-
bluecellulab-2.6.
|
|
65
|
+
bluecellulab-2.6.19.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
|
|
66
|
+
bluecellulab-2.6.19.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
|
|
67
|
+
bluecellulab-2.6.19.dist-info/METADATA,sha256=IEr-rd-kfUVgbtQtMun0hl4zAWn7IRGySnn041OYpzQ,7054
|
|
68
|
+
bluecellulab-2.6.19.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
69
|
+
bluecellulab-2.6.19.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
|
|
70
|
+
bluecellulab-2.6.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|