New neuroscience packages: py-bmtk, py-neurotools (#34464)
* Add py-bmtk and py-neurotools * py-bmtk: version bump * [@spackbot] updating style on behalf of heerener * Maybe the copyright needs to be extended to 2022 for the check to pass * Process review remarks * Update var/spack/repos/builtin/packages/py-neurotools/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
		
							
								
								
									
										28
									
								
								var/spack/repos/builtin/packages/py-bmtk/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								var/spack/repos/builtin/packages/py-bmtk/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | |||||||
|  | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other | ||||||
|  | # Spack Project Developers. See the top-level COPYRIGHT file for details. | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
|  | 
 | ||||||
|  | from spack.package import * | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class PyBmtk(PythonPackage): | ||||||
|  |     """The Brain Modeling Toolkit""" | ||||||
|  | 
 | ||||||
|  |     homepage = "https://github.com/AllenInstitute/bmtk" | ||||||
|  |     pypi = "bmtk/bmtk-1.0.5.tar.gz" | ||||||
|  | 
 | ||||||
|  |     version("1.0.7", sha256="11e85098cf3c940a3d64718645f4a24ee13c8a47438ef5d28e054cb27ee01702") | ||||||
|  |     version("1.0.5", sha256="e0cb47b334467a6d124cfb99bbc67cc88f39f0291f4c39929f50d153130642a4") | ||||||
|  | 
 | ||||||
|  |     depends_on("py-setuptools", type="build") | ||||||
|  | 
 | ||||||
|  |     depends_on("py-jsonschema", type=("build", "run")) | ||||||
|  |     depends_on("py-pandas", type=("build", "run")) | ||||||
|  |     depends_on("py-numpy", type=("build", "run")) | ||||||
|  |     depends_on("py-six", type=("build", "run")) | ||||||
|  |     depends_on("py-h5py", type=("build", "run")) | ||||||
|  |     depends_on("py-matplotlib", type=("build", "run")) | ||||||
|  |     depends_on("py-scipy", type=("build", "run")) | ||||||
|  |     depends_on("py-scikit-image", type=("build", "run")) | ||||||
|  |     depends_on("py-sympy", type=("build", "run")) | ||||||
| @@ -0,0 +1,22 @@ | |||||||
|  | diff --git a/src/stgen.py b/src/stgen.py | ||||||
|  | index b818ea5..3cb45e6 100644 | ||||||
|  | --- a/src/stgen.py | ||||||
|  | +++ b/src/stgen.py | ||||||
|  | @@ -227,7 +227,7 @@ class StGen: | ||||||
|  |              number = min(5+numpy.ceil(2*n),100) | ||||||
|  |  | ||||||
|  |          if number > 0: | ||||||
|  | -            isi = self.rng.exponential(1.0/rate, number)*1000.0 | ||||||
|  | +            isi = self.rng.exponential(1.0/rate, int(number)) * 1000.0 | ||||||
|  |              if number > 1: | ||||||
|  |                  spikes = numpy.add.accumulate(isi) | ||||||
|  |              else: | ||||||
|  | @@ -301,7 +301,7 @@ class StGen: | ||||||
|  |              number = min(5+numpy.ceil(2*n),100) | ||||||
|  |  | ||||||
|  |          if number > 0: | ||||||
|  | -            isi = self.rng.gamma(a, b, number)*1000.0 | ||||||
|  | +            isi = self.rng.gamma(a, b, int(number))*1000.0 | ||||||
|  |              if number > 1: | ||||||
|  |                  spikes = numpy.add.accumulate(isi) | ||||||
|  |              else: | ||||||
							
								
								
									
										25
									
								
								var/spack/repos/builtin/packages/py-neurotools/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								var/spack/repos/builtin/packages/py-neurotools/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other | ||||||
|  | # Spack Project Developers. See the top-level COPYRIGHT file for details. | ||||||
|  | # | ||||||
|  | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
|  | 
 | ||||||
|  | from spack.package import * | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class PyNeurotools(PythonPackage): | ||||||
|  |     """A collection of tools for representing and anlyzing neuroscientific | ||||||
|  |     data.""" | ||||||
|  | 
 | ||||||
|  |     homepage = "http://neuralensemble.org/NeuroTools" | ||||||
|  |     pypi = "neurotools/NeuroTools-0.3.1.tar.gz" | ||||||
|  | 
 | ||||||
|  |     version("0.3.1", sha256="a459420fc0e9ff6b59af28716ddb0c75d11a63b8db80a5f4844e0d7a90c2c653") | ||||||
|  | 
 | ||||||
|  |     depends_on("py-setuptools", type="build") | ||||||
|  |     depends_on("py-scipy", type=("build", "run")) | ||||||
|  |     depends_on("py-numpy", type=("build", "run")) | ||||||
|  |     depends_on("py-matplotlib", type=("build", "run")) | ||||||
|  |     depends_on("py-tables", type=("build", "run")) | ||||||
|  |     depends_on("py-pyaml", type=("build", "run")) | ||||||
|  | 
 | ||||||
|  |     patch("neurotools-0.3.1.patch", when="@0.3.1") | ||||||
		Reference in New Issue
	
	Block a user
	 Erik Heeren
					Erik Heeren