Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored Spike Contrast method #1

Merged
merged 34 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1405966
faster mean_firing_rate for a typical use case (#331)
dizcza Jun 22, 2020
91c03c4
Timescale function option to return nan if there are few spikes (<=2)…
morales-gregorio Jun 30, 2020
dea2ec4
Build documentation in Travis (#335)
dizcza Jul 27, 2020
e55a6bf
Removed deprecation warnings from 0.7.0 (#306)
dizcza Jul 27, 2020
0779731
don't use nan
dizcza Aug 1, 2020
97482bc
don't pad with zeros
dizcza Aug 1, 2020
4b20fce
bin_shrink_factor parameter
dizcza Aug 1, 2020
89dcdae
precompute edges for _binning_half_overlap
dizcza Aug 1, 2020
352e8fb
deal with spiketrains of length 1
dizcza Aug 4, 2020
7548c0d
return trace optionally
dizcza Aug 4, 2020
9007517
ASSET optimized probability_matrix_analytical and looping in _jsf_uni…
dizcza Aug 5, 2020
9e67193
Naming convention (binsize -> bin_size, etc.) (#316)
dizcza Aug 7, 2020
fe7b86d
Release v0.8.0 (#340)
dizcza Aug 7, 2020
3abf36f
Merge branch 'master' into pr/spike_contrast
dizcza Aug 19, 2020
c41e06b
all quantities
dizcza Aug 19, 2020
277c8de
python2 issues
dizcza Aug 19, 2020
d56246c
python2 issues again
dizcza Aug 19, 2020
63b1f4c
Update acknowledgments.rst
mdenker Aug 28, 2020
4bd2703
added __all__ in elephant modules (#342)
dizcza Aug 31, 2020
82ffa0d
Added a warning in fanofactor function when the input spiketrains var…
dizcza Aug 31, 2020
9529f14
Merge commit 'refs/pull/338/head' of github.com:NeuralEnsemble/elepha…
dizcza Sep 1, 2020
a8aec14
fixed wrong default min_bin units
dizcza Sep 1, 2020
ff1c8a8
naming
dizcza Sep 1, 2020
0dc27b3
download & unzip API
dizcza Sep 1, 2020
af3f7fd
Feature/inhomogeneous gamma (#339)
pbouss Sep 1, 2020
e7448ea
Added information on citing Elephant to documentation, fixed bib entr…
mdenker Sep 7, 2020
9d869b2
Three surrogate methods: Trial-shifting, Bin Shuffling, ISI dithering…
pbouss Sep 7, 2020
6f342aa
SPADE: New way to count patterns for multiple testing (#347)
pbouss Sep 7, 2020
f932dea
spike synchrony doc; take the first 5 networks to run the test
dizcza Sep 7, 2020
ec1919a
renamed test module
dizcza Sep 7, 2020
352f419
group spike train correlation, dissimilarity, and synchrony
dizcza Sep 7, 2020
ed94d54
tutorials: changed wget to curl for platform compatibility (#350)
pbouss Sep 9, 2020
48fc9b0
Time-domain pairwise Granger causality (#332)
rjurkus Sep 10, 2020
f54e254
Merge branch 'master' into pr/spike_contrast
dizcza Sep 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ lib
lib64
# sphinx build directory
doc/_build
doc/reference/toctree/asset/elephant.asset.synchronous*
doc/reference/toctree/parallel
doc/reference/toctree/statistics
doc/reference/toctree/unitary_event_analysis
doc/reference/toctree/*
!doc/reference/toctree/asset/elephant.asset.ASSET.rst
!doc/reference/toctree/kernels
*.h5
# setup.py dist directory
dist
Expand Down
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ matrix:
- name: "conda 2.7"
python: 2.7
env: DISTRIB="conda"
before_install: sed -i 's/conda-forge/conda/g' requirements/environment.yml

- name: "pip 2.7"
python: 2.7
Expand Down Expand Up @@ -41,6 +42,18 @@ matrix:
python: 3.8
env: DISTRIB="pip"

- name: "docs"
python: 3.6
env: DISTRIB="conda"
before_install: sudo apt install -y libopenmpi-dev openmpi-bin
before_script:
- conda install -c conda-forge pandoc
- pip install -r requirements/requirements-docs.txt
- pip install -r requirements/requirements-tutorials.txt
- pip install -r requirements/requirements-extras.txt
- sed -i -E "s/nbsphinx_execute *=.*/nbsphinx_execute = 'always'/g" doc/conf.py
script: cd doc && make html

install:
- if [[ "${DISTRIB}" == "conda" ]];
then
Expand Down
4 changes: 4 additions & 0 deletions CITATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To refer to the Elephant software package in publications, please use
Elephant (RRID:SCR_003833)

To cite Elephant, please see doc/citation.rst.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ recursive-include elephant *.py
include requirements/*
include README.md
include LICENSE.txt
include CITATION.txt
include elephant/VERSION
include elephant/current_source_density_src/README.md
include elephant/current_source_density_src/test_data.mat
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
![](https://coveralls.io/repos/NeuralEnsemble/elephant/badge.png "Unit Test Coverage")
![](https://readthedocs.org/projects/elephant/badge/?version=latest "Documentation Status")
![](https://img.shields.io/pypi/v/elephant)
![](https://img.shields.io/pypi/dd/elephant)
![](https://img.shields.io/pypi/dm/elephant)
[![Gitter](https://badges.gitter.im/python-elephant/community.svg)](https://gitter.im/python-elephant/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

*Elephant* package analyses all sorts of neurophysiological data:
spike trains, LFP, analog signals. The input-output data format is either
[Neo](https://github.com/NeuralEnsemble/python-neo), Quantity or Numpy array.


### More Information

* Documentation: https://elephant.readthedocs.io/en/latest/
Expand All @@ -21,10 +22,18 @@ spike trains, LFP, analog signals. The input-output data format is either

Modified BSD License, see [LICENSE.txt](LICENSE.txt) for details.


#### Copyright

:copyright: 2014-2020 by the [Elephant team](doc/authors.rst).


#### Acknowledgments

See [acknowledgments](doc/acknowledgments.rst).


#### Citation

See [citations](doc/citation.rst).

2 changes: 1 addition & 1 deletion doc/acknowledgments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Acknowledgments
***************

This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270 and No. 785907 (Human Brain Project SGA1 and SGA2).
This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270, No. 785907 and No. 945539 (Human Brain Project SGA1, SGA2 and SGA3).
2 changes: 2 additions & 0 deletions doc/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Do you want to contribute to Elephant? Please refer to the
* Jan Lewen [1]
* Alexander Kleinjohann [1]
* Danylo Ulianych [1]
* Anno Kurth [1]
* Regimantas Jurkus [1]
* Philipp Steigerwald [12]
* Manuel Ciba [12]

Expand Down
73 changes: 67 additions & 6 deletions doc/bib/elephant.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
@article{Gruen02_43,
@misc{Ding06_0608035,
title={Granger Causality: Basic Theory and Application to Neuroscience},
author={Mingzhou Ding and Yonghong Chen and Steven L. Bressler},
year={2006},
eprint={q-bio/0608035},
archivePrefix={arXiv},
primaryClass={q-bio.QM}
}

@article{Granger69_424,
title={Investigating causal relations by econometric models and cross-spectral methods},
author={Granger, Clive WJ},
journal={Econometrica: journal of the Econometric Society},
volume={37},
pages={424--438},
year={1969},
doi={10.2307/1912791}
}

@article{Gruen02_43,
title = {Unitary events in multiple single-neuron spiking activity: I. Detection and significance},
author = {Gr{\"u}n, S. and Diesmann, M. and Aertsen, A.},
year = {2002},
Expand Down Expand Up @@ -49,8 +68,7 @@ @article{Gruen99_67
volume = {94},
number = {1},
pages = {67--79},
doi = {10.1016/s0165-0270(99)00126-0}

doi = {10.1016/s0165-0270(99)00126-0}
}

@article{Riehle97_1950,
Expand All @@ -64,13 +82,56 @@ @article{Riehle97_1950
doi = {10.1126/science.278.5345.1950}
}

@article{torre2016asset,
@article{Seth07_1667,
author = {Seth, A. },
title = {Granger causality},
year = {2007},
journal = {Scholarpedia},
volume = {2},
number = {7},
pages = {1667},
doi = {10.4249/scholarpedia.1667},
note = {revision \#127333}
}

@article{Stella19_104022,
title = {3d-{SPADE}: {S}ignificance evaluation of spatio-temporal patterns of various temporal extents},
author = {Stella, A. and Quaglio, P. and Torre, E. and Gr{\"u}n, S.},
year = {2019},
journal = {Biosystems},
volume = {185},
pages = {104022},
doi = {10.1016/j.biosystems.2019.104022}
}

@article{Torre16_e1004939,
title={ASSET: analysis of sequences of synchronous events in massively parallel spike trains},
author={Torre, Emiliano and Canova, Carlos and Denker, Michael and Gerstein, George and Helias, Moritz and Gr{\"u}n, Sonja},
author={Torre, E. and Canova, C. and Denker, M. and Gerstein, G. and Helias, M. and Gr{\"u}n, S.},
year={2016},
journal={PLoS computational biology},
journal={PLoS Comp. Biol.},
volume={12},
number={7},
pages={e1004939},
doi={10.1371/journal.pcbi.1004939}
}

@article{ciba2018spike,
title={Spike-contrast: A novel time scale independent and multivariate measure of spike train synchrony},
author={Ciba, Manuel and Isomura, Takuya and Jimbo, Yasuhiko and Bahmer, Andreas and Thielemann, Christiane},
year={2018},
journal={Journal of Neuroscience Methods},
volume={293},
pages={136--143},
doi={10.1016/j.jneumeth.2017.09.008}
}

@article{Rostami17_3,
title = {[{Re}] {S}pike synchronization and rate modulation differentially involved in motor cortical function},
author = {Rostami, V. and Ito, J. and Denker, M. and Gr{\"u}n, S.},
year = {2017},
journal = {ReScience},
volume = {3},
number = {1},
pages = {3},
doi = {10.5281/zenodo.583814}
}
34 changes: 34 additions & 0 deletions doc/citation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
***************
Citing Elephant
***************

To refer to the Elephant software package in publications, please use: **Elephant (RRID:SCR_003833)**.


To cite Elephant, please use:

**Denker M, Yegenoglu A, Grün S (2018) Collaborative HPC-enabled workflows on the HBP Collaboratory using the Elephant framework. Neuroinformatics 2018, P19. doi: 10.12751/incf.ni2018.0019**

A BibTeX entry for LaTeX users is:

.. code-block:: bibtex

@conference{elephant18,
author = {Denker, M. and Yegenoglu, A. and Grün, S.},
booktitle = {Neuroinformatics 2018},
title = {{C}ollaborative {HPC}-enabled workflows on the {HBP} {C}ollaboratory using the {E}lephant framework},
pages = {P19},
year = {2018}
doi = {10.12751/incf.ni2018.0019},
url = {https://abstracts.g-node.org/conference/NI2018/abstracts#/uuid/023bec4e-0c35-4563-81ce-2c6fac282abd},
}


Further publications directly related to Elephant development
:cite:`citations-Rostami17_3,citations-Stella19_104022` (see
`doc/bib/elephant.bib` for full BibTeX entries).

.. bibliography:: bib/elephant.bib
:labelprefix: citations-
:keyprefix: citations-
:style: unsrt
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Table of Contents
release_notes
get_in_touch
acknowledgments
citation



Expand Down
9 changes: 7 additions & 2 deletions doc/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Function Reference by Module
:maxdepth: 1

reference/asset
reference/causality
reference/cell_assembly_detection
reference/change_point_detection
reference/conversion
Expand All @@ -20,11 +21,15 @@ Function Reference by Module
reference/signal_processing
reference/spade
reference/spectral
reference/spike_train_correlation
reference/spike_train_dissimilarity
reference/spike_train_generation
reference/spike_train_surrogates
reference/sta
reference/statistics
reference/unitary_event_analysis
reference/waveform_features


.. toctree::
:maxdepth: 2

reference/_spike_train_processing
11 changes: 11 additions & 0 deletions doc/reference/_spike_train_processing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
======================
Spike train processing
======================


.. toctree::
:maxdepth: 1

spike_train_correlation
spike_train_dissimilarity
spike_train_synchrony
5 changes: 5 additions & 0 deletions doc/reference/causality.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
==================
Causality measures
==================

.. automodule:: elephant.causality.granger
6 changes: 3 additions & 3 deletions doc/reference/spike_train_dissimilarity.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=======================================
Spike train dissimilarity and synchrony
=======================================
=========================
Spike train dissimilarity
=========================


.. automodule:: elephant.spike_train_dissimilarity
Expand Down
14 changes: 14 additions & 0 deletions doc/reference/spike_train_synchrony.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
=====================
Spike train synchrony
=====================

.. automodule:: elephant.spike_train_synchrony


References
----------

.. bibliography:: ../bib/elephant.bib
:labelprefix: syn
:keyprefix: synchrony-
:style: unsrt
28 changes: 28 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
Release Notes
*************

Elephant 0.8.0 release notes
============================

New features
------------
* The `parallel` module is a new experimental module (https://github.com/NeuralEnsemble/elephant/pull/307) to run python functions concurrently. Supports native (pythonic) ProcessPollExecutor and MPI. Not limited to Elephant functional.
* Added an optional `refractory_period` argument, set to None by default, to `dither_spikes` function (https://github.com/NeuralEnsemble/elephant/pull/297).
* Added `cdf` and `icdf` functions in Kernel class to correctly estimate the median index, needed for `instantaneous_rate` function in statistics.py (https://github.com/NeuralEnsemble/elephant/pull/313).
* Added an optional `center_kernel` argument, set to True by default (to behave as in Elephant <0.8.0 versions) to `instantaneous_rate` function in statistics.py (https://github.com/NeuralEnsemble/elephant/pull/313).

New tutorials
-------------
* Analysis of Sequences of Synchronous EvenTs (ASSET) tutorial: https://elephant.readthedocs.io/en/latest/tutorials/asset.html
* Parallel module tutorial: https://elephant.readthedocs.io/en/latest/tutorials/parallel.html

Optimization
------------
* Optimized ASSET runtime by a factor of 10 and more (https://github.com/NeuralEnsemble/elephant/pull/259, https://github.com/NeuralEnsemble/elephant/pull/333).

Python 2.7 and 3.5 deprecation
------------------------------
Python 2.7 and 3.5 are deprecated and will not be maintained by the end of 2020. Switch to Python 3.6+.

Breaking changes
----------------
* Naming convention changes (`binsize` -> `bin_size`, etc.) in almost all Elephant functions (https://github.com/NeuralEnsemble/elephant/pull/316).


Elephant 0.7.0 release notes
============================

Expand Down
9 changes: 6 additions & 3 deletions doc/style_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ throughout Elephant.

.. code-block:: python

def pair_of_signals_example(spiketrain_i, spiketrain_j):
# Add '_i' and '_j' suffixes to a pair of signals, spiketrains or any
# other variables that come in pairs.

def perfect_naming_of_parameters(spiketrains, spiketrain, reference_spiketrain,
target_spiketrain, signal, signals, max_iterations,
min_threshold, n_bins, n_surrogates, bin_size, max_size,
Expand Down Expand Up @@ -119,9 +123,8 @@ throughout Elephant.
Therefore, do not use terms as `n` or `n_surr`, that are not
immediately understood.
bin_size : pq.Quantity or int
Separate the words by underscore. Do not use `binsize`. Old functions
which use `binsize` will be gradually refactored to conform to the new
convention.
Separate the words by underscore. Do not use `bin_size`. Old functions
which use `binsize` are deprecated.
max_size : float
Another example showing that words should be separated by underscores.
This intersects with the naming convention for a maximum value.
Expand Down
Loading