bluecellulab 2.6.16__py3-none-any.whl → 2.6.18__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.

@@ -37,6 +37,7 @@ def run_stimulus(
37
37
  stimulus: Stimulus,
38
38
  section: str,
39
39
  segment: float,
40
+ cvode: bool = True,
40
41
  ) -> Recording:
41
42
  """Creates a cell and stimulates it with a given stimulus.
42
43
 
@@ -45,6 +46,7 @@ def run_stimulus(
45
46
  stimulus: The input stimulus to inject into the cell.
46
47
  section: Name of the section of cell where the stimulus is to be injected.
47
48
  segment: The segment of the section where the stimulus is to be injected.
49
+ cvode: True to use variable time-steps. False for fixed time-steps.
48
50
 
49
51
  Returns:
50
52
  The voltage-time recording at the specified location.
@@ -61,7 +63,7 @@ def run_stimulus(
61
63
  current_vector = neuron.h.Vector()
62
64
  current_vector.record(iclamp._ref_i)
63
65
  simulation = Simulation(cell)
64
- simulation.run(stimulus.stimulus_time)
66
+ simulation.run(stimulus.stimulus_time, cvode=cvode)
65
67
  current = np.array(current_vector.to_python())
66
68
  voltage = cell.get_voltage_recording(neuron_section, segment)
67
69
  time = cell.get_time()
@@ -78,6 +80,7 @@ def apply_multiple_stimuli(
78
80
  section_name: str | None = None,
79
81
  segment: float = 0.5,
80
82
  n_processes: int | None = None,
83
+ cvode: bool = True,
81
84
  ) -> StimulusRecordings:
82
85
  """Apply multiple stimuli to the cell on isolated processes.
83
86
 
@@ -91,6 +94,7 @@ def apply_multiple_stimuli(
91
94
  If None, the stimuli are applied at the soma[0] of the cell.
92
95
  segment: The segment of the section where the stimuli are applied.
93
96
  n_processes: The number of processes to use for running the stimuli.
97
+ cvode: True to use variable time-steps. False for fixed time-steps.
94
98
 
95
99
  Returns:
96
100
  A dictionary where the keys are the names of the stimuli and the values
@@ -140,7 +144,7 @@ def apply_multiple_stimuli(
140
144
  else:
141
145
  raise ValueError("Unknown stimulus name.")
142
146
 
143
- task_args.append((cell.template_params, stimulus, section_name, segment))
147
+ task_args.append((cell.template_params, stimulus, section_name, segment, cvode))
144
148
 
145
149
  with IsolatedProcess(processes=n_processes) as pool:
146
150
  # 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: SimulationConfig = simulation_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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bluecellulab
3
- Version: 2.6.16
3
+ Version: 2.6.18
4
4
  Summary: Biologically detailed neural network simulations and analysis.
5
5
  Author: Blue Brain Project, EPFL
6
6
  License: Apache2.0
@@ -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=K3166jDTikEMMfRPJvuqfC6VPdUfyK7Ua7_M9Tr6uZg,5738
18
+ bluecellulab/analysis/inject_sequence.py,sha256=6_OuUtUjmSvhCj5_mX-8ZnUpv5jXUHHYDYPUcV2m0eE,5958
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=c0MMJuoT6_dRW8O5HSRS5hHv1zDKdW0sBR-DaP0F1bk,10351
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.16.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
66
- bluecellulab-2.6.16.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
67
- bluecellulab-2.6.16.dist-info/METADATA,sha256=MQKPZ5_GTCnARQeb7CjYBHAOGsJ--Cv_n-vTzjbDcKE,7054
68
- bluecellulab-2.6.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
69
- bluecellulab-2.6.16.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
70
- bluecellulab-2.6.16.dist-info/RECORD,,
65
+ bluecellulab-2.6.18.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
66
+ bluecellulab-2.6.18.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
67
+ bluecellulab-2.6.18.dist-info/METADATA,sha256=qRtydITfTVimJQmOLizHxMlxNIteEBD1-W9FWWXMr74,7054
68
+ bluecellulab-2.6.18.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
69
+ bluecellulab-2.6.18.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
70
+ bluecellulab-2.6.18.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5