bluecellulab 2.6.58__py3-none-any.whl → 2.6.59__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/tools.py CHANGED
@@ -26,6 +26,7 @@ import bluecellulab
26
26
  from bluecellulab.cell import Cell
27
27
  from bluecellulab.circuit.circuit_access import EmodelProperties
28
28
  from bluecellulab.exceptions import UnsteadyCellError
29
+ from bluecellulab.simulation.neuron_globals import NeuronGlobals
29
30
  from bluecellulab.simulation.parallel import IsolatedProcess
30
31
  from bluecellulab.utils import CaptureOutput
31
32
  from bluecellulab.type_aliases import NeuronSection
@@ -590,3 +591,37 @@ def resolve_source_nodes(source, source_type, cells, population):
590
591
  node_ids = [node_id for (pop, node_id) in cells.keys() if pop == population]
591
592
  compartment_nodes = None
592
593
  return node_ids, compartment_nodes
594
+
595
+
596
+ def compute_memodel_properties(
597
+ cell,
598
+ spike_threshold_voltage=-30,
599
+ v_init=-80.0,
600
+ celsius=34.0,
601
+ ):
602
+ """Compute the threshold current and the input resistance of the cell.
603
+
604
+ Args:
605
+ cell (Cell): The cell model to compute properties for.
606
+ spike_threshold_voltage (float, optional): Voltage threshold for spike detection. Default is -30 mV.
607
+ v_init (float, optional): Initial membrane potential. Default is -80 mV.
608
+ celsius (float, optional): Temperature in Celsius. Default is 34.0 C.
609
+ """
610
+ # set initial voltage and temperature
611
+ neuron_globals = NeuronGlobals.get_instance()
612
+ neuron_globals.temperature = celsius
613
+ neuron_globals.v_init = v_init
614
+
615
+ # get me-model properties
616
+ holding_current = cell.hypamp if cell.hypamp else 0.0
617
+ rheobase = calculate_rheobase(
618
+ cell=cell, section="soma[0]", segx=0.5, threshold_voltage=spike_threshold_voltage
619
+ )
620
+ rin = calculate_input_resistance(
621
+ template_path=cell.template_params.template_filepath,
622
+ morphology_path=cell.template_params.morph_filepath,
623
+ template_format=cell.template_params.template_format,
624
+ emodel_properties=cell.template_params.emodel_properties,
625
+ )
626
+
627
+ return {"holding_current": holding_current, "rheobase": rheobase, "rin": rin}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluecellulab
3
- Version: 2.6.58
3
+ Version: 2.6.59
4
4
  Summary: Biologically detailed neural network simulations and analysis.
5
5
  Author: Blue Brain Project, EPFL
6
6
  License: Apache2.0
@@ -10,7 +10,7 @@ bluecellulab/plotwindow.py,sha256=ePU-EegZ1Sqk0SoYYiQ6k24ZO4s3Hgfpx10uePiJ5xM,27
10
10
  bluecellulab/psection.py,sha256=FSOwRNuOTyB469BM-jPEf9l1J59FamXmzrQgBI6cnP4,6174
11
11
  bluecellulab/psegment.py,sha256=PTgoGLqM4oFIdF_8QHFQCU59j-8TQmtq6PakiGUQhIo,3138
12
12
  bluecellulab/rngsettings.py,sha256=2Ykb4Ylk3XTs58x1UIxjg8XJqjSpnCgKRZ8avXCDpxk,4237
13
- bluecellulab/tools.py,sha256=Cc-Pv_7ban1EA9aqj8mfnjq-187llqj5WVzuQdesqhc,20395
13
+ bluecellulab/tools.py,sha256=Wj3zEalJuyMzp0btoyWHXsCRpxyg6lNEuJfvmudlQmc,21767
14
14
  bluecellulab/type_aliases.py,sha256=DvgjERv2Ztdw_sW63JrZTQGpJ0x5uMTFB5hcBHDb0WA,441
15
15
  bluecellulab/utils.py,sha256=0NhwlzyLnSi8kziSfDsQf7pokO4qDkMJVAO33kSX4O0,2227
16
16
  bluecellulab/verbosity.py,sha256=T0IgX7DrRo19faxrT4Xzb27gqxzoILQ8FzYKxvUeaPM,1342
@@ -68,9 +68,9 @@ bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HA
68
68
  bluecellulab/synapse/synapse_factory.py,sha256=NHwRMYMrnRVm_sHmyKTJ1bdoNmWZNU4UPOGu7FCi-PE,6987
69
69
  bluecellulab/synapse/synapse_types.py,sha256=zs_yBvGTH4QrbQF3nEViidyq1WM_ZcTSFdjUxB3khW0,16871
70
70
  bluecellulab/validation/validation.py,sha256=X8Pwj2oCPiMjBdMMWj2SwRSbnyZcUjqFo3PGT-6lWho,18465
71
- bluecellulab-2.6.58.dist-info/licenses/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
72
- bluecellulab-2.6.58.dist-info/licenses/LICENSE,sha256=dAMAR2Sud4Nead1wGFleKiwTZfkTNZbzmuGfcTKb3kg,11335
73
- bluecellulab-2.6.58.dist-info/METADATA,sha256=OzN36WwPMe2uppSyBP5xvseDBhpFjou8kce_gnut0mc,8259
74
- bluecellulab-2.6.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- bluecellulab-2.6.58.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
76
- bluecellulab-2.6.58.dist-info/RECORD,,
71
+ bluecellulab-2.6.59.dist-info/licenses/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
72
+ bluecellulab-2.6.59.dist-info/licenses/LICENSE,sha256=dAMAR2Sud4Nead1wGFleKiwTZfkTNZbzmuGfcTKb3kg,11335
73
+ bluecellulab-2.6.59.dist-info/METADATA,sha256=rGUXgmt24dbIO3juu7j9qBOfk4KDaEkC2UQbeeNG3Uw,8259
74
+ bluecellulab-2.6.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ bluecellulab-2.6.59.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
76
+ bluecellulab-2.6.59.dist-info/RECORD,,