bluecellulab 2.6.15__tar.gz → 2.6.17__tar.gz

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.

Files changed (100) hide show
  1. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/PKG-INFO +1 -1
  2. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/analysis/inject_sequence.py +6 -2
  3. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/core.py +20 -21
  4. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/simulation_access.py +1 -1
  5. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/stimulus/circuit_stimulus_definitions.py +0 -2
  6. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab.egg-info/PKG-INFO +1 -1
  7. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.compile_mod.sh +0 -0
  8. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.gitattributes +0 -0
  9. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.github/dependabot.yml +0 -0
  10. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.github/workflows/release.yml +0 -0
  11. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.github/workflows/test.yml +0 -0
  12. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.gitignore +0 -0
  13. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.gitlab-ci.yml +0 -0
  14. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.readthedocs.yml +0 -0
  15. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/.zenodo.json +0 -0
  16. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/AUTHORS.txt +0 -0
  17. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/CHANGELOG.rst +0 -0
  18. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/LICENSE +0 -0
  19. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/MANIFEST.in +0 -0
  20. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/Makefile +0 -0
  21. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/README.rst +0 -0
  22. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/__init__.py +0 -0
  23. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/analysis/__init__.py +0 -0
  24. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/__init__.py +0 -0
  25. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/ballstick/__init__.py +0 -0
  26. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/ballstick/emodel.hoc +0 -0
  27. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/ballstick/morphology.asc +0 -0
  28. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/cell_dict.py +0 -0
  29. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/injector.py +0 -0
  30. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/plotting.py +0 -0
  31. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/random.py +0 -0
  32. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/recording.py +0 -0
  33. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/section_distance.py +0 -0
  34. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/serialized_sections.py +0 -0
  35. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/sonata_proxy.py +0 -0
  36. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/stimuli_generator.py +0 -0
  37. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/cell/template.py +0 -0
  38. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/__init__.py +0 -0
  39. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/circuit_access/__init__.py +0 -0
  40. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/circuit_access/bluepy_circuit_access.py +0 -0
  41. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/circuit_access/definition.py +0 -0
  42. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/circuit_access/sonata_circuit_access.py +0 -0
  43. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/config/__init__.py +0 -0
  44. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/config/bluepy_simulation_config.py +0 -0
  45. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/config/definition.py +0 -0
  46. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/config/sections.py +0 -0
  47. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/config/sonata_simulation_config.py +0 -0
  48. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/format.py +0 -0
  49. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/iotools.py +0 -0
  50. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/node_id.py +0 -0
  51. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/synapse_properties.py +0 -0
  52. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit/validate.py +0 -0
  53. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/circuit_simulation.py +0 -0
  54. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/connection.py +0 -0
  55. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/dendrogram.py +0 -0
  56. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/exceptions.py +0 -0
  57. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/graph.py +0 -0
  58. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/hoc/Cell.hoc +0 -0
  59. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/hoc/RNGSettings.hoc +0 -0
  60. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/hoc/TDistFunc.hoc +0 -0
  61. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/hoc/TStim.hoc +0 -0
  62. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/hoc/fileUtils.hoc +0 -0
  63. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/importer.py +0 -0
  64. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/neuron_interpreter.py +0 -0
  65. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/plotwindow.py +0 -0
  66. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/psection.py +0 -0
  67. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/psegment.py +0 -0
  68. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/rngsettings.py +0 -0
  69. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/simulation/__init__.py +0 -0
  70. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/simulation/neuron_globals.py +0 -0
  71. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/simulation/parallel.py +0 -0
  72. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/simulation/simulation.py +0 -0
  73. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/stimulus/__init__.py +0 -0
  74. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/stimulus/factory.py +0 -0
  75. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/synapse/__init__.py +0 -0
  76. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/synapse/synapse_factory.py +0 -0
  77. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/synapse/synapse_types.py +0 -0
  78. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/tools.py +0 -0
  79. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/type_aliases.py +0 -0
  80. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/utils.py +0 -0
  81. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab/verbosity.py +0 -0
  82. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab.egg-info/SOURCES.txt +0 -0
  83. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab.egg-info/dependency_links.txt +0 -0
  84. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab.egg-info/requires.txt +0 -0
  85. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/bluecellulab.egg-info/top_level.txt +0 -0
  86. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/Makefile +0 -0
  87. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/images/voltage-readme.png +0 -0
  88. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/make.bat +0 -0
  89. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/requirements_docs.txt +0 -0
  90. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/_static/.gitkeep +0 -0
  91. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/api.rst +0 -0
  92. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/changelog.rst +0 -0
  93. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/compiling-mechanisms.rst +0 -0
  94. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/conf.py +0 -0
  95. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/index.rst +0 -0
  96. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/list_of_stim.rst +0 -0
  97. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/docs/source/logo/BlueCelluLabBanner.jpg +0 -0
  98. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/pyproject.toml +0 -0
  99. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/setup.cfg +0 -0
  100. {bluecellulab-2.6.15 → bluecellulab-2.6.17}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bluecellulab
3
- Version: 2.6.15
3
+ Version: 2.6.17
4
4
  Summary: Biologically detailed neural network simulations and analysis.
5
5
  Author: Blue Brain Project, EPFL
6
6
  License: Apache2.0
@@ -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
@@ -719,27 +719,26 @@ class Cell(InjectableMixin, PlottableMixin):
719
719
  pre_gid = CellId(
720
720
  source_population, int(synapse.syn_description[SynapseProperty.PRE_GID])
721
721
  )
722
- if self.sonata_proxy.circuit_access.target_contains_cell(stimulus.source, pre_gid):
723
- if pre_gid.id in synapse_spikes:
724
- spikes_of_interest = synapse_spikes[pre_gid.id]
725
- # filter spikes of interest >=stimulus.delay, <=stimulus.duration
726
- spikes_of_interest = spikes_of_interest[
727
- (spikes_of_interest >= stimulus.delay)
728
- & (spikes_of_interest <= stimulus.duration)
729
- ]
730
- connection = bluecellulab.Connection(
731
- synapse,
732
- pre_spiketrain=spikes_of_interest,
733
- pre_cell=None,
734
- stim_dt=self.record_dt,
735
- spike_threshold=spike_threshold,
736
- spike_location=spike_location,
737
- )
738
- logger.debug(
739
- f"Added synapse replay from {pre_gid} to {self.cell_id.id}, {synapse_id}"
740
- )
741
-
742
- self.connections[synapse_id] = connection
722
+ if pre_gid.id in synapse_spikes:
723
+ spikes_of_interest = synapse_spikes[pre_gid.id]
724
+ # filter spikes of interest >=stimulus.delay, <=stimulus.duration
725
+ spikes_of_interest = spikes_of_interest[
726
+ (spikes_of_interest >= stimulus.delay)
727
+ & (spikes_of_interest <= stimulus.duration)
728
+ ]
729
+ connection = bluecellulab.Connection(
730
+ synapse,
731
+ pre_spiketrain=spikes_of_interest,
732
+ pre_cell=None,
733
+ stim_dt=self.record_dt,
734
+ spike_threshold=spike_threshold,
735
+ spike_location=spike_location,
736
+ )
737
+ logger.debug(
738
+ f"Added synapse replay from {pre_gid} to {self.cell_id.id}, {synapse_id}"
739
+ )
740
+
741
+ self.connections[synapse_id] = connection
743
742
 
744
743
  @property
745
744
  def info_dict(self):
@@ -172,7 +172,7 @@ class SonataSimulationAccess:
172
172
 
173
173
 
174
174
  def get_synapse_replay_spikes(f_name: str) -> dict:
175
- """Read the .dat file containing the spike replays."""
175
+ """Read the .h5 file containing the spike replays."""
176
176
  with h5py.File(f_name, 'r') as f:
177
177
  # Access the timestamps and node_ids datasets
178
178
  timestamps = f['/spikes/All/timestamps'][:]
@@ -243,7 +243,6 @@ class Stimulus:
243
243
  delay=stimulus_entry["delay"],
244
244
  duration=stimulus_entry["duration"],
245
245
  spike_file=stimulus_entry["spike_file"],
246
- source=stimulus_entry["source"],
247
246
  )
248
247
  elif pattern == Pattern.SHOT_NOISE:
249
248
  return ShotNoise(
@@ -331,7 +330,6 @@ class RelativeLinear(Stimulus):
331
330
  @dataclass(frozen=True, config=dict(extra="forbid"))
332
331
  class SynapseReplay(Stimulus):
333
332
  spike_file: str
334
- source: str
335
333
 
336
334
  @field_validator("spike_file")
337
335
  @classmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bluecellulab
3
- Version: 2.6.15
3
+ Version: 2.6.17
4
4
  Summary: Biologically detailed neural network simulations and analysis.
5
5
  Author: Blue Brain Project, EPFL
6
6
  License: Apache2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes