bluecellulab 2.5.7__py3-none-any.whl → 2.5.9__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
@@ -290,8 +290,7 @@ def detect_spike_step_subprocess(
290
290
 
291
291
  time = cell.get_time()
292
292
  voltage = cell.get_soma_voltage()
293
- time_step = time[np.where((time > inj_start) & (time < inj_stop))]
294
- voltage_step = voltage[np.where((time_step > inj_start) & (time_step < inj_stop))]
293
+ voltage_step = voltage[np.where((time > inj_start) & (time < inj_stop))]
295
294
  spike_detected = detect_spike(voltage_step)
296
295
 
297
296
  cell.delete()
@@ -317,8 +316,11 @@ def search_threshold_current(
317
316
  inj_stop: float,
318
317
  min_current: float,
319
318
  max_current: float,
319
+ current_precision: float = 0.01,
320
320
  ):
321
321
  """Search current necessary to reach threshold."""
322
+ if abs(max_current - min_current) < current_precision:
323
+ return max_current
322
324
  med_current = min_current + abs(min_current - max_current) / 2
323
325
  logger.info("Med current %d" % med_current)
324
326
 
@@ -328,18 +330,18 @@ def search_threshold_current(
328
330
  )
329
331
  logger.info("Spike threshold detection at: %f nA" % med_current)
330
332
 
331
- if abs(max_current - min_current) < .01:
332
- return max_current
333
- elif spike_detected:
333
+ if spike_detected:
334
334
  return search_threshold_current(template_name, morphology_path,
335
335
  template_format, emodel_properties,
336
336
  hyp_level, inj_start, inj_stop,
337
- min_current, med_current)
337
+ min_current, med_current,
338
+ current_precision)
338
339
  else:
339
340
  return search_threshold_current(template_name, morphology_path,
340
341
  template_format, emodel_properties,
341
342
  hyp_level, inj_start, inj_stop,
342
- med_current, max_current)
343
+ med_current, max_current,
344
+ current_precision)
343
345
 
344
346
 
345
347
  def check_empty_topology() -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bluecellulab
3
- Version: 2.5.7
3
+ Version: 2.5.9
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=UVHzml-BB83m5Qr-YGkjR9kB-vSW8mM0Owh2j95yIaU,27
10
10
  bluecellulab/psection.py,sha256=EgAS8IS9DcYv2xOkNISgfg_CfRc0nDfRFjvgQhyi9eY,6328
11
11
  bluecellulab/psegment.py,sha256=rBryDYHC_uDK9itfXXrFZ0DL9F6WgRICL0j5EHN56QM,3125
12
12
  bluecellulab/rngsettings.py,sha256=Dlt34dc4AoWyxCCzUK3Jlui90VCK20xHg6gD_OJzPIw,4237
13
- bluecellulab/tools.py,sha256=tS0lth0La-HE13EXsfXlPro1O2lAaEBSL4ZdvMsy6jw,11083
13
+ bluecellulab/tools.py,sha256=JrAfMVozfucwcyGklweMvEM7uGnTnWIDmk4eqI-43Es,11169
14
14
  bluecellulab/type_aliases.py,sha256=DvgjERv2Ztdw_sW63JrZTQGpJ0x5uMTFB5hcBHDb0WA,441
15
15
  bluecellulab/utils.py,sha256=fgqjgy3xzyL0zu-qjCPJdHp6PEAHADCzlr2FqyBmzHI,2012
16
16
  bluecellulab/verbosity.py,sha256=T0IgX7DrRo19faxrT4Xzb27gqxzoILQ8FzYKxvUeaPM,1342
@@ -61,9 +61,9 @@ bluecellulab/stimulus/factory.py,sha256=AOby3Sp2g8BJsRccz3afazfCyysyWIgLtcliWlye
61
61
  bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HAwuk,192
62
62
  bluecellulab/synapse/synapse_factory.py,sha256=YkvxbdGF-u-vxYdbRNTlX-9AtSC_3t_FQRFhybwzgrk,6805
63
63
  bluecellulab/synapse/synapse_types.py,sha256=4gne-hve2vq1Lau-LAVPsfLjffVYqAYBW3kCfC7_600,16871
64
- bluecellulab-2.5.7.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
65
- bluecellulab-2.5.7.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
66
- bluecellulab-2.5.7.dist-info/METADATA,sha256=Mbr84D7rKgGfoZt5tWY7CCyXlOrV4o-8vhu39r3CzVs,7025
67
- bluecellulab-2.5.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
68
- bluecellulab-2.5.7.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
69
- bluecellulab-2.5.7.dist-info/RECORD,,
64
+ bluecellulab-2.5.9.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
65
+ bluecellulab-2.5.9.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
66
+ bluecellulab-2.5.9.dist-info/METADATA,sha256=zDUbQYoAFBVjKO3yIkbYZvBC0sUA_8nO3TbECj-qFM4,7025
67
+ bluecellulab-2.5.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
68
+ bluecellulab-2.5.9.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
69
+ bluecellulab-2.5.9.dist-info/RECORD,,