From b9850d8c3e35290858e4ef0b2f05f66b0f7397b2 Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Sat, 10 Oct 2015 20:45:09 +0200 Subject: spike sync filtering, cython sim ann Added function for filtering out events based on a threshold for the spike sync values. Usefull for focusing on synchronous events during directionality analysis. Also added cython version of simulated annealing for performance. --- setup.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index c130fbd..ce35773 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,8 @@ else: if os.path.isfile("pyspike/cython/cython_add.c") and \ os.path.isfile("pyspike/cython/cython_profiles.c") and \ os.path.isfile("pyspike/cython/cython_distances.c") and \ - os.path.isfile("pyspike/cython/cython_directionality.c"): + os.path.isfile("pyspike/cython/cython_directionality.c") and \ + os.path.isfile("pyspike/cython/cython_simulated_annealing.c"): use_c = True else: use_c = False @@ -41,7 +42,9 @@ if use_cython: # Cython is available, compile .pyx -> .c Extension("pyspike.cython.cython_distances", ["pyspike/cython/cython_distances.pyx"]), Extension("pyspike.cython.cython_directionality", - ["pyspike/cython/cython_directionality.pyx"]) + ["pyspike/cython/cython_directionality.pyx"]), + Extension("pyspike.cython.cython_simulated_annealing", + ["pyspike/cython/cython_simulated_annealing.pyx"]) ] cmdclass.update({'build_ext': build_ext}) elif use_c: # c files are there, compile to binaries @@ -53,7 +56,9 @@ elif use_c: # c files are there, compile to binaries Extension("pyspike.cython.cython_distances", ["pyspike/cython/cython_distances.c"]), Extension("pyspike.cython.cython_directionality", - ["pyspike/cython/cython_directionality.c"]) + ["pyspike/cython/cython_directionality.c"]), + Extension("pyspike.cython.cython_simulated_annealing", + ["pyspike/cython/cython_simulated_annealing.c"]) ] # neither cython nor c files available -> automatic fall-back to python backend @@ -93,7 +98,8 @@ train similarity', package_data={ 'pyspike': ['cython/cython_add.c', 'cython/cython_profiles.c', 'cython/cython_distances.c', - 'cython/cython_directionality.c'], + 'cython/cython_directionality.c', + 'cython/cython_simulated_annealing.c'], 'test': ['Spike_testdata.txt'] } ) -- cgit v1.2.3