From dc4222a65ca46f73ca996eb528554bc717b41d4e Mon Sep 17 00:00:00 2001 From: arnaudon Date: Fri, 1 Dec 2023 11:50:39 +0100 Subject: [PATCH 1/2] Fix: Fix brunel model example --- neurodynex3.egg-info/PKG-INFO | 17 -- neurodynex3.egg-info/SOURCES.txt | 261 ---------------------- neurodynex3.egg-info/dependency_links.txt | 1 - neurodynex3.egg-info/requires.txt | 8 - neurodynex3.egg-info/top_level.txt | 1 - neurodynex3/tools/plot_tools.py | 2 +- neurodynex3/tools/spike_tools.py | 5 +- 7 files changed, 4 insertions(+), 291 deletions(-) delete mode 100644 neurodynex3.egg-info/PKG-INFO delete mode 100644 neurodynex3.egg-info/SOURCES.txt delete mode 100644 neurodynex3.egg-info/dependency_links.txt delete mode 100644 neurodynex3.egg-info/requires.txt delete mode 100644 neurodynex3.egg-info/top_level.txt diff --git a/neurodynex3.egg-info/PKG-INFO b/neurodynex3.egg-info/PKG-INFO deleted file mode 100644 index 77bb69c..0000000 --- a/neurodynex3.egg-info/PKG-INFO +++ /dev/null @@ -1,17 +0,0 @@ -Metadata-Version: 1.2 -Name: neurodynex3 -Version: 1.0.2 -Summary: Python exercises accompanying the book Neuronal Dynamics by Wulfram Gerstner, Werner M. Kistler, Richard Naud and Liam Paninski. -Home-page: https://github.com/martinbarry59/neurodynex3 -Author: LCN-EPFL -Author-email: martin.barry@epfl.ch -License: GPLv2 -Download-URL: https://github.com/martinbarry59/neurodynex3/archive/1.0.0.tar.gz -Description: UNKNOWN -Keywords: compneuro,science,teaching,neuroscience,brian -Platform: UNKNOWN -Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2) -Classifier: Topic :: Scientific/Engineering :: Medical Science Apps. -Classifier: Programming Language :: Python :: 3 -Classifier: Operating System :: OS Independent -Requires-Python: >=3.6 diff --git a/neurodynex3.egg-info/SOURCES.txt b/neurodynex3.egg-info/SOURCES.txt deleted file mode 100644 index f1f1f7e..0000000 --- a/neurodynex3.egg-info/SOURCES.txt +++ /dev/null @@ -1,261 +0,0 @@ -.DS_Store -.gitignore -.travis.yml -LICENSE.txt -MANIFEST.in -README.rst -requirements-deploy.txt -requirements.txt -setup.py -doc/_build/doctrees/contents.doctree -doc/_build/doctrees/environment.pickle -doc/_build/doctrees/index.doctree -doc/_build/doctrees/intro.doctree -doc/_build/doctrees/licence.doctree -doc/_build/doctrees/setup.doctree -doc/_build/doctrees/exercises/adex-model.doctree -doc/_build/doctrees/exercises/brunel-network.doctree -doc/_build/doctrees/exercises/exponential-integrate-and-fire.doctree -doc/_build/doctrees/exercises/hodgkin-huxley.doctree -doc/_build/doctrees/exercises/hopfield-network.doctree -doc/_build/doctrees/exercises/index.doctree -doc/_build/doctrees/exercises/leaky-integrate-and-fire.doctree -doc/_build/doctrees/exercises/neuron-type.doctree -doc/_build/doctrees/exercises/ojas-rule.doctree -doc/_build/doctrees/exercises/passive-cable.doctree -doc/_build/doctrees/exercises/perceptual-decision-making.doctree -doc/_build/doctrees/exercises/phase-plane-analysis.doctree -doc/_build/doctrees/exercises/spatial-working-memory.doctree -doc/_build/doctrees/modules/modules.doctree -doc/_build/doctrees/modules/neurodynex3.adex_model.doctree -doc/_build/doctrees/modules/neurodynex3.brunel_model.doctree -doc/_build/doctrees/modules/neurodynex3.cable_equation.doctree -doc/_build/doctrees/modules/neurodynex3.competing_populations.doctree -doc/_build/doctrees/modules/neurodynex3.doctree -doc/_build/doctrees/modules/neurodynex3.exponential_integrate_fire.doctree -doc/_build/doctrees/modules/neurodynex3.hodgkin_huxley.doctree -doc/_build/doctrees/modules/neurodynex3.hopfield_network.doctree -doc/_build/doctrees/modules/neurodynex3.leaky_integrate_and_fire.doctree -doc/_build/doctrees/modules/neurodynex3.neuron_type.doctree -doc/_build/doctrees/modules/neurodynex3.ojas_rule.doctree -doc/_build/doctrees/modules/neurodynex3.phase_plane_analysis.doctree -doc/_build/doctrees/modules/neurodynex3.test.doctree -doc/_build/doctrees/modules/neurodynex3.tools.doctree -doc/_build/doctrees/modules/neurodynex3.working_memory_network.doctree -doc/_build/html/.buildinfo -doc/_build/html/contents.html -doc/_build/html/genindex.html -doc/_build/html/index.html -doc/_build/html/intro.html -doc/_build/html/licence.html -doc/_build/html/objects.inv -doc/_build/html/py-modindex.html -doc/_build/html/search.html -doc/_build/html/searchindex.js -doc/_build/html/setup.html -doc/_build/html/_images/AdaptiveExponential_Init_burst.png -doc/_build/html/_images/Brunel_SIfast_PSpop.png -doc/_build/html/_images/Brunel_SIfast_PSsingle.png -doc/_build/html/_images/Brunel_SIfast_activity.png -doc/_build/html/_images/Brunel_Spiking_LIF.png -doc/_build/html/_images/Brunel_Synchronization.png -doc/_build/html/_images/DecisionMaking_NetworkStructureAll.png -doc/_build/html/_images/DecisionMaking_NetworkStructureDetail.png -doc/_build/html/_images/DecisionMaking_PhasePlane_3.png -doc/_build/html/_images/HF_CheckerboardAndPatterns.png -doc/_build/html/_images/HF_CheckerboardRecovered2.png -doc/_build/html/_images/HF_LetterAandOverlap.png -doc/_build/html/_images/HH_getting_started.png -doc/_build/html/_images/LIF_getting_started.png -doc/_build/html/_images/Oja_3D.png -doc/_build/html/_images/Oja_cloud.png -doc/_build/html/_images/Oja_setup.png -doc/_build/html/_images/WorkingMemory_Demo.png -doc/_build/html/_images/WorkingMemory_NetworkStructure.png -doc/_build/html/_images/WorkingMemory_PopulationVector2048.png -doc/_build/html/_images/anaconda-prompt.png -doc/_build/html/_images/cable_equation_pulse.png -doc/_build/html/_images/exp_IF_min_current.png -doc/_build/html/_images/passive_cable_ABC.png -doc/_build/html/_images/run-code.png -doc/_build/html/_images/start-notebook.png -doc/_build/html/_modules/index.html -doc/_build/html/_modules/neurodynex3/test.html -doc/_build/html/_modules/neurodynex3/hopfield_network/network.html -doc/_build/html/_modules/neurodynex3/hopfield_network/pattern_tools.html -doc/_build/html/_modules/neurodynex3/test/test_cable_equation.html -doc/_build/html/_modules/neurodynex3/test/test_hopfield.html -doc/_build/html/_modules/neurodynex3/test/test_nagumo.html -doc/_build/html/_modules/neurodynex3/test/test_neuron_type.html -doc/_build/html/_modules/neurodynex3/test/test_oja.html -doc/_build/html/_modules/neurodynex3/test/test_spike_tools.html -doc/_build/html/_sources/contents.rst.txt -doc/_build/html/_sources/index.rst.txt -doc/_build/html/_sources/intro.rst.txt -doc/_build/html/_sources/licence.rst.txt -doc/_build/html/_sources/setup.rst.txt -doc/_build/html/_sources/exercises/adex-model.rst.txt -doc/_build/html/_sources/exercises/brunel-network.rst.txt -doc/_build/html/_sources/exercises/exponential-integrate-and-fire.rst.txt -doc/_build/html/_sources/exercises/hodgkin-huxley.rst.txt -doc/_build/html/_sources/exercises/hopfield-network.rst.txt -doc/_build/html/_sources/exercises/index.rst.txt -doc/_build/html/_sources/exercises/leaky-integrate-and-fire.rst.txt -doc/_build/html/_sources/exercises/neuron-type.rst.txt -doc/_build/html/_sources/exercises/ojas-rule.rst.txt -doc/_build/html/_sources/exercises/passive-cable.rst.txt -doc/_build/html/_sources/exercises/perceptual-decision-making.rst.txt -doc/_build/html/_sources/exercises/phase-plane-analysis.rst.txt -doc/_build/html/_sources/exercises/spatial-working-memory.rst.txt -doc/_build/html/_sources/modules/modules.rst.txt -doc/_build/html/_sources/modules/neurodynex3.adex_model.rst.txt -doc/_build/html/_sources/modules/neurodynex3.brunel_model.rst.txt -doc/_build/html/_sources/modules/neurodynex3.cable_equation.rst.txt -doc/_build/html/_sources/modules/neurodynex3.competing_populations.rst.txt -doc/_build/html/_sources/modules/neurodynex3.exponential_integrate_fire.rst.txt -doc/_build/html/_sources/modules/neurodynex3.hodgkin_huxley.rst.txt -doc/_build/html/_sources/modules/neurodynex3.hopfield_network.rst.txt -doc/_build/html/_sources/modules/neurodynex3.leaky_integrate_and_fire.rst.txt -doc/_build/html/_sources/modules/neurodynex3.neuron_type.rst.txt -doc/_build/html/_sources/modules/neurodynex3.ojas_rule.rst.txt -doc/_build/html/_sources/modules/neurodynex3.phase_plane_analysis.rst.txt -doc/_build/html/_sources/modules/neurodynex3.rst.txt -doc/_build/html/_sources/modules/neurodynex3.test.rst.txt -doc/_build/html/_sources/modules/neurodynex3.tools.rst.txt -doc/_build/html/_sources/modules/neurodynex3.working_memory_network.rst.txt -doc/_build/html/_static/basic.css -doc/_build/html/_static/doctools.js -doc/_build/html/_static/documentation_options.js -doc/_build/html/_static/file.png -doc/_build/html/_static/jquery-3.4.1.js -doc/_build/html/_static/jquery.js -doc/_build/html/_static/language_data.js -doc/_build/html/_static/minus.png -doc/_build/html/_static/plus.png -doc/_build/html/_static/pygments.css -doc/_build/html/_static/searchtools.js -doc/_build/html/_static/underscore-1.3.1.js -doc/_build/html/_static/underscore.js -doc/_build/html/_static/css/badge_only.css -doc/_build/html/_static/css/theme.css -doc/_build/html/_static/fonts/Inconsolata-Bold.ttf -doc/_build/html/_static/fonts/Inconsolata-Regular.ttf -doc/_build/html/_static/fonts/Inconsolata.ttf -doc/_build/html/_static/fonts/Lato-Bold.ttf -doc/_build/html/_static/fonts/Lato-Regular.ttf -doc/_build/html/_static/fonts/RobotoSlab-Bold.ttf -doc/_build/html/_static/fonts/RobotoSlab-Regular.ttf -doc/_build/html/_static/fonts/fontawesome-webfont.eot -doc/_build/html/_static/fonts/fontawesome-webfont.svg -doc/_build/html/_static/fonts/fontawesome-webfont.ttf -doc/_build/html/_static/fonts/fontawesome-webfont.woff -doc/_build/html/_static/fonts/fontawesome-webfont.woff2 -doc/_build/html/_static/fonts/Lato/lato-bold.eot -doc/_build/html/_static/fonts/Lato/lato-bold.ttf -doc/_build/html/_static/fonts/Lato/lato-bold.woff -doc/_build/html/_static/fonts/Lato/lato-bold.woff2 -doc/_build/html/_static/fonts/Lato/lato-bolditalic.eot -doc/_build/html/_static/fonts/Lato/lato-bolditalic.ttf -doc/_build/html/_static/fonts/Lato/lato-bolditalic.woff -doc/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 -doc/_build/html/_static/fonts/Lato/lato-italic.eot -doc/_build/html/_static/fonts/Lato/lato-italic.ttf -doc/_build/html/_static/fonts/Lato/lato-italic.woff -doc/_build/html/_static/fonts/Lato/lato-italic.woff2 -doc/_build/html/_static/fonts/Lato/lato-regular.eot -doc/_build/html/_static/fonts/Lato/lato-regular.ttf -doc/_build/html/_static/fonts/Lato/lato-regular.woff -doc/_build/html/_static/fonts/Lato/lato-regular.woff2 -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -doc/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -doc/_build/html/_static/js/modernizr.min.js -doc/_build/html/_static/js/theme.js -doc/_build/html/exercises/adex-model.html -doc/_build/html/exercises/brunel-network.html -doc/_build/html/exercises/exponential-integrate-and-fire.html -doc/_build/html/exercises/hodgkin-huxley.html -doc/_build/html/exercises/hopfield-network.html -doc/_build/html/exercises/index.html -doc/_build/html/exercises/leaky-integrate-and-fire.html -doc/_build/html/exercises/neuron-type.html -doc/_build/html/exercises/ojas-rule.html -doc/_build/html/exercises/passive-cable.html -doc/_build/html/exercises/perceptual-decision-making.html -doc/_build/html/exercises/phase-plane-analysis.html -doc/_build/html/exercises/setup.html -doc/_build/html/exercises/spatial-working-memory.html -doc/_build/html/modules/modules.html -doc/_build/html/modules/neurodynex3.adex_model.html -doc/_build/html/modules/neurodynex3.brunel_model.html -doc/_build/html/modules/neurodynex3.cable_equation.html -doc/_build/html/modules/neurodynex3.competing_populations.html -doc/_build/html/modules/neurodynex3.exponential_integrate_fire.html -doc/_build/html/modules/neurodynex3.hodgkin_huxley.html -doc/_build/html/modules/neurodynex3.hopfield_network.html -doc/_build/html/modules/neurodynex3.html -doc/_build/html/modules/neurodynex3.leaky_integrate_and_fire.html -doc/_build/html/modules/neurodynex3.neuron_type.html -doc/_build/html/modules/neurodynex3.ojas_rule.html -doc/_build/html/modules/neurodynex3.phase_plane_analysis.html -doc/_build/html/modules/neurodynex3.test.html -doc/_build/html/modules/neurodynex3.tools.html -doc/_build/html/modules/neurodynex3.working_memory_network.html -neurodynex3/.DS_Store -neurodynex3/__init__.py -neurodynex3.egg-info/PKG-INFO -neurodynex3.egg-info/SOURCES.txt -neurodynex3.egg-info/dependency_links.txt -neurodynex3.egg-info/requires.txt -neurodynex3.egg-info/top_level.txt -neurodynex3/adex_model/AdEx.py -neurodynex3/adex_model/__init__.py -neurodynex3/brunel_model/LIF_spiking_network.py -neurodynex3/brunel_model/__init__.py -neurodynex3/cable_equation/__init__.py -neurodynex3/cable_equation/passive_cable.py -neurodynex3/competing_populations/__init__.py -neurodynex3/competing_populations/decision_making.py -neurodynex3/data/alphabet.pickle.gz -neurodynex3/exponential_integrate_fire/__init__.py -neurodynex3/exponential_integrate_fire/exp_IF.py -neurodynex3/hodgkin_huxley/HH.py -neurodynex3/hodgkin_huxley/__init__.py -neurodynex3/hopfield_network/__init__.py -neurodynex3/hopfield_network/demo.py -neurodynex3/hopfield_network/network.py -neurodynex3/hopfield_network/pattern_tools.py -neurodynex3/hopfield_network/plot_tools.py -neurodynex3/leaky_integrate_and_fire/LIF.py -neurodynex3/leaky_integrate_and_fire/__init__.py -neurodynex3/neuron_type/__init__.py -neurodynex3/neuron_type/neurons.py -neurodynex3/ojas_rule/__init__.py -neurodynex3/ojas_rule/oja.py -neurodynex3/phase_plane_analysis/__init__.py -neurodynex3/phase_plane_analysis/fitzhugh_nagumo.py -neurodynex3/test/__init__.py -neurodynex3/test/test_AdEx.py -neurodynex3/test/test_HH.py -neurodynex3/test/test_LIF.py -neurodynex3/test/test_LIF_spiking_network.py -neurodynex3/test/test_cable_equation.py -neurodynex3/test/test_decision_making.py -neurodynex3/test/test_exponential_IF.py -neurodynex3/test/test_hopfield.py -neurodynex3/test/test_nagumo.py -neurodynex3/test/test_neuron_type.py -neurodynex3/test/test_oja.py -neurodynex3/test/test_spike_tools.py -neurodynex3/test/test_working_memory.py -neurodynex3/tools/__init__.py -neurodynex3/tools/input_factory.py -neurodynex3/tools/plot_tools.py -neurodynex3/tools/spike_tools.py -neurodynex3/working_memory_network/__init__.py -neurodynex3/working_memory_network/wm_model.py \ No newline at end of file diff --git a/neurodynex3.egg-info/dependency_links.txt b/neurodynex3.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/neurodynex3.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/neurodynex3.egg-info/requires.txt b/neurodynex3.egg-info/requires.txt deleted file mode 100644 index d522cd1..0000000 --- a/neurodynex3.egg-info/requires.txt +++ /dev/null @@ -1,8 +0,0 @@ -scipy -brian2>=2.0 -matplotlib -mpmath -setuptools -setuptools_scm -mock -nose diff --git a/neurodynex3.egg-info/top_level.txt b/neurodynex3.egg-info/top_level.txt deleted file mode 100644 index 44096f9..0000000 --- a/neurodynex3.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -neurodynex3 diff --git a/neurodynex3/tools/plot_tools.py b/neurodynex3/tools/plot_tools.py index e6160fb..4b1fd86 100644 --- a/neurodynex3/tools/plot_tools.py +++ b/neurodynex3/tools/plot_tools.py @@ -358,5 +358,5 @@ def plot_population_activity_power_spectrum(freq, ps, max_freq, average_At=None, if average_At is None: plt.title("Power Spectrum of population activity A(t).") else: - plt.title("Power Spectrum of population activity A(t). Avg. rate = {}".format(round(average_At, 1))) + plt.title("Power Spectrum of population activity A(t). Avg. rate = {}".format(average_At.round(1))) return f diff --git a/neurodynex3/tools/spike_tools.py b/neurodynex3/tools/spike_tools.py index 7447f82..8598516 100644 --- a/neurodynex3/tools/spike_tools.py +++ b/neurodynex3/tools/spike_tools.py @@ -422,6 +422,7 @@ def get_population_activity_power_spectrum( # normalize ps = ps * delta_t / N_signal # TODO: verify: subtract 1 (N_signal-1)? freqs = np.fft.fftfreq(N_signal, delta_t) - ps = ps[:(N_signal/2)] - freqs = freqs[:(N_signal/2)] + print(N_signal/2) + ps = ps[:int(N_signal/2)] + freqs = freqs[:int(N_signal/2)] return freqs, ps, average_population_rate From 2cc080ff7c0fc78aabf95d762679f7259b1df534 Mon Sep 17 00:00:00 2001 From: arnaudon Date: Fri, 1 Dec 2023 11:51:26 +0100 Subject: [PATCH 2/2] remove print --- neurodynex3/tools/spike_tools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/neurodynex3/tools/spike_tools.py b/neurodynex3/tools/spike_tools.py index 8598516..f6ea55f 100644 --- a/neurodynex3/tools/spike_tools.py +++ b/neurodynex3/tools/spike_tools.py @@ -422,7 +422,6 @@ def get_population_activity_power_spectrum( # normalize ps = ps * delta_t / N_signal # TODO: verify: subtract 1 (N_signal-1)? freqs = np.fft.fftfreq(N_signal, delta_t) - print(N_signal/2) ps = ps[:int(N_signal/2)] freqs = freqs[:int(N_signal/2)] return freqs, ps, average_population_rate