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

@@ -4,11 +4,9 @@ try:
4
4
  except ImportError:
5
5
  efel = None
6
6
  from itertools import islice
7
- from itertools import repeat
8
7
  import logging
9
8
  from matplotlib.collections import LineCollection
10
9
  import matplotlib.pyplot as plt
11
- from multiprocessing import Pool
12
10
  import neuron
13
11
  import numpy as np
14
12
  import pathlib
@@ -97,20 +95,15 @@ def compute_plot_iv_curve(cell,
97
95
  for amp in list_amp
98
96
  ]
99
97
 
100
- with Pool(len(steps)) as p:
101
- recordings = p.starmap(
102
- run_stimulus,
103
- zip(
104
- repeat(cell.template_params),
105
- steps,
106
- repeat(injecting_section),
107
- repeat(injecting_segment),
108
- repeat(True), # cvode
109
- repeat(True), # add_hypamp
110
- repeat(recording_section),
111
- repeat(recording_segment),
112
- )
113
- )
98
+ recordings = []
99
+ for step in steps:
100
+ recording = run_stimulus(cell.template_params,
101
+ step,
102
+ section=injecting_section,
103
+ segment=injecting_segment,
104
+ recording_section=recording_section,
105
+ recording_segment=recording_segment)
106
+ recordings.append(recording)
114
107
 
115
108
  steady_states = []
116
109
  # compute steady state response
@@ -208,24 +201,19 @@ def compute_plot_fi_curve(cell,
208
201
  for amp in list_amp
209
202
  ]
210
203
 
211
- with Pool(len(steps)) as p:
212
- recordings = p.starmap(
213
- run_stimulus,
214
- zip(
215
- repeat(cell.template_params),
216
- steps,
217
- repeat(injecting_section),
218
- repeat(injecting_segment),
219
- repeat(True), # cvode
220
- repeat(True), # add_hypamp
221
- repeat(recording_section),
222
- repeat(recording_segment),
223
- repeat(True), # enable_spike_detection
224
- repeat(threshold_voltage), # threshold_spike_detection
225
- )
226
- )
227
-
228
- spike_count = [len(recording.spike) for recording in recordings]
204
+ spikes = []
205
+ for step in steps:
206
+ recording = run_stimulus(cell.template_params,
207
+ step,
208
+ section=injecting_section,
209
+ segment=injecting_segment,
210
+ recording_section=recording_section,
211
+ recording_segment=recording_segment,
212
+ enable_spike_detection=True,
213
+ threshold_spike_detection=threshold_voltage)
214
+ spikes.append(recording.spike)
215
+
216
+ spike_count = [len(spike) for spike in spikes]
229
217
 
230
218
  plot_fi_curve(list_amp,
231
219
  spike_count,
@@ -438,68 +438,38 @@ def run_validations(
438
438
  )
439
439
 
440
440
  logger.debug("Running validations...")
441
- from bluecellulab.utils import NestedPool
442
- with NestedPool(processes=8) as pool:
443
- # Validation 1: Spiking Test
444
- spiking_test_result_future = pool.apply_async(
445
- spiking_test,
446
- (cell.template_params, rheobase, out_dir, spike_threshold_voltage)
447
- )
448
-
449
- # Validation 2: Depolarization Block Test
450
- depolarization_block_result_future = pool.apply_async(
451
- depolarization_block_test,
452
- (cell.template_params, rheobase, out_dir)
453
- )
441
+ # Validation 1: Spiking Test
442
+ spiking_test_result = spiking_test(
443
+ cell.template_params, rheobase, out_dir, spike_threshold_voltage
444
+ )
454
445
 
455
- # Validation 3: Backpropagating AP Test
456
- bpap_result_future = pool.apply_async(
457
- bpap_test,
458
- (cell.template_params, rheobase, out_dir)
459
- )
446
+ # Validation 2: Depolarization Block Test
447
+ depolarization_block_result = depolarization_block_test(
448
+ cell.template_params, rheobase, out_dir
449
+ )
460
450
 
461
- # Validation 4: Postsynaptic Potential Test
462
- # We have to wait for ProbAMPANMDA_EMS to be present in entitycore to implement this test
451
+ # Validation 3: Backpropagating AP Test
452
+ bpap_result = bpap_test(cell.template_params, rheobase, out_dir)
463
453
 
464
- # Validation 5: AIS Spiking Test
465
- ais_spiking_test_result_future = pool.apply_async(
466
- ais_spiking_test,
467
- (cell.template_params, rheobase, out_dir, spike_threshold_voltage)
468
- )
454
+ # Validation 4: Postsynaptic Potential Test
455
+ # We have to wait for ProbAMPANMDA_EMS to be present in entitycore to implement this test
469
456
 
470
- # Validation 6: Hyperpolarization Test
471
- hyperpolarization_result_future = pool.apply_async(
472
- hyperpolarization_test,
473
- (cell.template_params, rheobase, out_dir)
474
- )
457
+ # Validation 5: AIS Spiking Test
458
+ ais_spiking_test_result = ais_spiking_test(
459
+ cell.template_params, rheobase, out_dir, spike_threshold_voltage
460
+ )
475
461
 
476
- # Validation 7: Rin Test
477
- rin_result_future = pool.apply_async(
478
- rin_test,
479
- (rin,)
480
- )
462
+ # Validation 6: Hyperpolarization Test
463
+ hyperpolarization_result = hyperpolarization_test(cell.template_params, rheobase, out_dir)
481
464
 
482
- # # Validation 8: IV Test
483
- iv_test_result_future = pool.apply_async(
484
- iv_test,
485
- (cell.template_params, rheobase, out_dir, spike_threshold_voltage)
486
- )
465
+ # Validation 7: Rin Test
466
+ rin_result = rin_test(rin)
487
467
 
488
- # # Validation 9: FI Test
489
- fi_test_result_future = pool.apply_async(
490
- fi_test,
491
- (cell.template_params, rheobase, out_dir, spike_threshold_voltage)
492
- )
468
+ # Validation 8: IV Test
469
+ iv_test_result = iv_test(cell.template_params, rheobase, out_dir, spike_threshold_voltage)
493
470
 
494
- # Wait for all validations to complete
495
- spiking_test_result = spiking_test_result_future.get()
496
- depolarization_block_result = depolarization_block_result_future.get()
497
- bpap_result = bpap_result_future.get()
498
- ais_spiking_test_result = ais_spiking_test_result_future.get()
499
- hyperpolarization_result = hyperpolarization_result_future.get()
500
- rin_result = rin_result_future.get()
501
- iv_test_result = iv_test_result_future.get()
502
- fi_test_result = fi_test_result_future.get()
471
+ # Validation 9: FI Test
472
+ fi_test_result = fi_test(cell.template_params, rheobase, out_dir, spike_threshold_voltage)
503
473
 
504
474
  return {
505
475
  "memodel_properties": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluecellulab
3
- Version: 2.6.53
3
+ Version: 2.6.54
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=0NhwlzyLnSi8kziSfDsQf7pokO4qDkMJVAO33kSX4O0,2227
16
16
  bluecellulab/verbosity.py,sha256=T0IgX7DrRo19faxrT4Xzb27gqxzoILQ8FzYKxvUeaPM,1342
17
17
  bluecellulab/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- bluecellulab/analysis/analysis.py,sha256=OCx6_7jX1yPRAGNhOyu4y6HRuCbKJFG-NLDAqLl2qFQ,21758
18
+ bluecellulab/analysis/analysis.py,sha256=rZdM7AjjCLFoW7x0d_R6oQPLAasz_R6UxSVgcKTUJW0,21646
19
19
  bluecellulab/analysis/inject_sequence.py,sha256=uU6Q6y0ErMDDEgdsTZBXCJ4LgwkATY7G8Fa6mmjpL98,12523
20
20
  bluecellulab/analysis/plotting.py,sha256=PqRoaZz33ULMw8A9YnZXXrxcUd84M_dwlYMTFhG7YT4,3999
21
21
  bluecellulab/analysis/utils.py,sha256=eMirP557D11BuedgSqjripDxOq1haIldNbnYNetV1bg,121
@@ -67,10 +67,10 @@ bluecellulab/stimulus/stimulus.py,sha256=a_hKJUtZmIgjiFjbJf6RzUPokELqn0IHCgIWGw5
67
67
  bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HAwuk,192
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
- bluecellulab/validation/validation.py,sha256=EN9HMty70VPwnEPhWUmN5F-MGWbMN3uU0DmNnjL0ucw,18209
71
- bluecellulab-2.6.53.dist-info/licenses/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
72
- bluecellulab-2.6.53.dist-info/licenses/LICENSE,sha256=dAMAR2Sud4Nead1wGFleKiwTZfkTNZbzmuGfcTKb3kg,11335
73
- bluecellulab-2.6.53.dist-info/METADATA,sha256=7O-2OmI89TVrP7DYO10sMKqBwCDz53pvdPnuDqQ965o,8259
74
- bluecellulab-2.6.53.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- bluecellulab-2.6.53.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
76
- bluecellulab-2.6.53.dist-info/RECORD,,
70
+ bluecellulab/validation/validation.py,sha256=-wNn76QndoYPrC0C2cKEG3gw3ytPv7uTQ8UFj6xtT_0,17066
71
+ bluecellulab-2.6.54.dist-info/licenses/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
72
+ bluecellulab-2.6.54.dist-info/licenses/LICENSE,sha256=dAMAR2Sud4Nead1wGFleKiwTZfkTNZbzmuGfcTKb3kg,11335
73
+ bluecellulab-2.6.54.dist-info/METADATA,sha256=4sgl5RPxGJsw20GxT8VvsWlisoqoT6G1L4CRxKJX8UU,8259
74
+ bluecellulab-2.6.54.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ bluecellulab-2.6.54.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
76
+ bluecellulab-2.6.54.dist-info/RECORD,,