Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 19d3c7b
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Thu Aug 1 15:09:34 2019 +0200

    fixed min requirements (NeuralEnsemble#235)

    * fixed min requirements

    * travis install libopenmpi-dev

    * added .coveragerc omit=elephant/test* rule not to count test files as source code

commit 36e6096
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Wed Jul 31 16:55:47 2019 +0200

    Integrated GPFA (NeuralEnsemble#233)

    * Rename neural_trajectory to gpfa and refactor the codes accordingly

    * Remove codes related to the (not fully implemented) cross-validation feature

    * added tqdm as an extra requirement

    * push coverage only for requirements-extras test

    * gpfa verbose flag; added licence in the docs

    * Fixed and extended documentation, removed misleading function outputs.

commit d6822d6
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Tue Jul 23 16:35:45 2019 +0300

    Acknowledgments (NeuralEnsemble#241)

    * acknowledgments

    * removed reference file AUTHORS.txt

    * recursive-exclude . *~

commit 6fd3a5b
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Mon Jul 22 23:14:36 2019 +0300

    Release v0.6.3 (NeuralEnsemble#240)

    * Release v0.6.3

    * Update doc/reference/waveform_features.rst

    Co-Authored-By: Michael Denker <m.denker@fz-juelich.de>

commit c013e39
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Sun Jul 21 09:18:03 2019 +0300

    elephant dir packages are back (NeuralEnsemble#239)

    * reverted removed imports of elephant's internal packages; download fim during the setup

    * download fim from tools/fim_manager.py

    * dummy tools/__init__.py to support py2

    * include requirements in MANIFEST back

    * fixed spade licence typo

    * included waveform_features module; removed tools; don't donwload fim at setup while macking a tarball with 'sdist' command

    travis not fixed downloading fim

    * skip time consuming test_spade_cpp if not HAVE_FIM

    * travis pip install generated tarball

    * recursive-include elephant *.py

commit 3c30574
Author: Danylo Ulianych <dizcza@gmail.com>
Date:   Wed Jul 10 18:21:37 2019 +0200

    Butterworth supports sosfiltfilt filter_function (NeuralEnsemble#234)

    * Butterworth supports sosfiltfilt filter_function

    * higher order filters comment
  • Loading branch information
dizcza committed Aug 1, 2019
1 parent c8789ba commit 2c49122
Show file tree
Hide file tree
Showing 62 changed files with 2,033 additions and 206 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .coveragerc to control coverage.py
[report]
omit = elephant/test/*
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ nosetests.xml
.pydevproject
.settings
*.tmp*
.idea
.idea/
venv/
env/
.pytest_cache/

# Compiled source #
Expand Down
17 changes: 8 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@ matrix:
before_install: sudo apt install -y libopenmpi-dev openmpi-bin
before_script: pip install -r requirements-extras.txt
script: mpiexec -n 1 nosetests --with-coverage --cover-package=elephant
after_success: coveralls || echo "coveralls failed"

- name: "conda 3.7"
python: 3.7
env: DISTRIB="conda"

exclude:
- name: "pip 3.6 requirements min version"
# excluded due to unmet dependencies in neo, quantities, and scipy
- name: "pip 3.6 requirements-extras min version"
python: 3.6
env: DISTRIB="pip"
before_install:
- sudo apt install libblas-dev liblapack-dev libatlas-base-dev gfortran
- sed -i 's/>=/==/g' requirements.txt
- sudo apt install -y libopenmpi-dev openmpi-bin
- sudo apt install -y libblas-dev liblapack-dev libatlas-base-dev gfortran
- sed -i 's/>=/==/g' requirements*.txt
before_script: pip install -r requirements-extras.txt


install:
Expand All @@ -73,12 +74,10 @@ install:

- pip -V
- pip install coverage coveralls nose
- pip install .
- python setup.py install
- python -c "from elephant.spade import HAVE_FIM; assert HAVE_FIM"
- pip list
- python --version

script:
nosetests --with-coverage --cover-package=elephant

after_success:
coveralls || echo "coveralls failed"
1 change: 0 additions & 1 deletion AUTHORS.txt

This file was deleted.

12 changes: 7 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
include README.rst
recursive-include elephant *.py
include requirements*.txt
include README.md
include LICENSE.txt
include AUTHORS.txt
include elephant/VERSION
include elephant/current_source_density_src/README.md
include elephant/current_source_density_src/test_data.mat
include elephant/neural_trajectory_src/README.md
include elephant/spade_src/LICENCE
recursive-include elephant/spade_src *.so *.pyd
include elephant/test/spike_extraction_test_data.txt
recursive-include doc *

# special care for the files, used in setup.py
include elephant/spade_src/fim_manager.py
prune doc/_build
recursive-exclude . *~
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Elephant - Electrophysiology Analysis Toolkit

Elephant is a package for the analysis of neurophysiological data, based on Neo.

## Code status

![](https://travis-ci.org/NeuralEnsemble/elephant.png?branch=master "Unit Test Status")
![](https://coveralls.io/repos/NeuralEnsemble/elephant/badge.png "Unit Test Coverage")
![](https://requires.io/github/NeuralEnsemble/elephant/requirements.png?branch=master "Requirements Status")
![](https://readthedocs.org/projects/elephant/badge/?version=latest "Documentation Status")

#### Copyright

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

#### License

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

#### Acknowledgments

See [acknowledgments](doc/acknowledgments.rst).
23 changes: 0 additions & 23 deletions README.rst

This file was deleted.

5 changes: 5 additions & 0 deletions doc/acknowledgments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
***************
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).
6 changes: 3 additions & 3 deletions doc/developers_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ Python 2.7 and 3.2-3.5.


Making a release (maintainers only)
----------------
-----------------------------------

.. TODO: discuss branching/tagging policy.
.. Add a section in /doc/releases/<version>.rst for the release.
.. Add a section in /doc/release_notes.rst for the release.
1. Increment the Elephant package version in :file:`elephant/VERSION`, if necessary.

2. Check that the copyright statement (in :file:`LICENCE.txt`, :file:`README.md`, and :file:`doc/conf.py`) is correct.

3. If there is a new module do not forget to add the modulename to the :file:`doc/module.rst` and make a file with a short description in :file:`doc/reference/<modulename>.rst`.
3. If there is a new module do not forget to add the modulename to the :file:`doc/modules.rst` and make a file with a short description in :file:`doc/reference/<modulename>.rst`.

To build a source package::

Expand Down
3 changes: 2 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Table of Contents
modules
developers_guide
authors
release_notes
release_notes
acknowledgements



Expand Down
2 changes: 1 addition & 1 deletion doc/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Function Reference by Module
reference/sta
reference/statistics
reference/unitary_event_analysis

reference/waveform_features
6 changes: 6 additions & 0 deletions doc/reference/waveform_features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=====================================================================================================
`waveform_features` - Functions for computing waveform features like signal-to-noise ratio, etc.
=====================================================================================================

.. automodule:: elephant.waveform_features
:members:
22 changes: 22 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
Release Notes
*************

Elephant 0.6.3 release notes
============================
July 22nd 2019

The release v0.6.3 is mostly about improving maintenance.

New functions
-------------
* `waveform_features` module
* Waveform signal-to-noise ratio (https://github.com/NeuralEnsemble/elephant/pull/219).
* Added support for Butterworth `sosfiltfilt` - numerically stable (in particular, higher order) filtering (https://github.com/NeuralEnsemble/elephant/pull/234).

Buf fixes
---------
* Fixed neo version typo in requirements file (https://github.com/NeuralEnsemble/elephant/pull/218)
* Fixed broken docs (https://github.com/NeuralEnsemble/elephant/pull/230, https://github.com/NeuralEnsemble/elephant/pull/232)
* Fixed issue with 32-bit arch (https://github.com/NeuralEnsemble/elephant/pull/229)

Other changes
-------------
* Added issue templates (https://github.com/NeuralEnsemble/elephant/pull/226)
* Single VERSION file (https://github.com/NeuralEnsemble/elephant/pull/231)

Elephant 0.6.2 release notes
============================
Expand Down
2 changes: 1 addition & 1 deletion elephant/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.2
0.6.3
29 changes: 28 additions & 1 deletion elephant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,37 @@
"""
Elephant is a package for the analysis of neurophysiology data, based on Neo.
:copyright: Copyright 2014-2019 by the Elephant team, see AUTHORS.txt.
:copyright: Copyright 2014-2019 by the Elephant team, see `doc/authors.rst`.
:license: Modified BSD, see LICENSE.txt for details.
"""

from . import (statistics,
spike_train_generation,
spike_train_correlation,
unitary_event_analysis,
cubic,
spectral,
kernels,
spike_train_dissimilarity,
spike_train_surrogates,
signal_processing,
current_source_density,
change_point_detection,
phase_analysis,
sta,
conversion,
neo_tools,
spade,
cell_assembly_detection,
waveform_features)

try:
from . import pandas_bridge
from . import asset
except ImportError:
# requirements-extras are missing
pass


def _get_version():
import os
Expand Down
2 changes: 1 addition & 1 deletion elephant/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
An example is the representation of a spike train as a sequence of 0-1 values
(binned spike train).
:copyright: Copyright 2014-2016 by the Elephant team, see AUTHORS.txt.
:copyright: Copyright 2014-2016 by the Elephant team, see `doc/authors.rst`.
:license: BSD, see LICENSE.txt for details.
"""

Expand Down
4 changes: 2 additions & 2 deletions elephant/cubic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
>>> alpha = 0.05 # significance level of the tests used
>>> xi, p_val, k = cubic(data, ximax=100, alpha=0.05, errorval=4.):
:copyright: Copyright 2016 by the Elephant team, see AUTHORS.txt.
:copyright: Copyright 2016 by the Elephant team, see `doc/authors.rst`.
:license: BSD, see LICENSE.txt for details.
'''
# -*- coding: utf-8 -*-
Expand Down Expand Up @@ -203,7 +203,7 @@ def _kstat(data):
Returns
-----
kappa : numpy.ndarray
moments : list
The first three unbiased cumulants of the population count
'''
if len(data) == 0:
Expand Down
2 changes: 1 addition & 1 deletion elephant/current_source_density_src/KCSD.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate(self, ele_pos, pots):
if ele_pos.shape[0] < 1+ele_pos.shape[1]: #Dim+1
raise Exception("Number of electrodes must be at least :",
1+ele_pos.shape[1])
if utils.check_for_duplicated_electrodes(ele_pos) is False:
if utils.contains_duplicated_electrodes(ele_pos):
raise Exception("Error! Duplicated electrode!")

def sanity(self, true_csd, pos_csd):
Expand Down
8 changes: 5 additions & 3 deletions elephant/current_source_density_src/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ def patch_quantities():
lastdefinition = definition
return

def check_for_duplicated_electrodes(elec_pos):

def contains_duplicated_electrodes(elec_pos):
"""Checks for duplicate electrodes
Parameters
----------
elec_pos : np.array
Returns
-------
has_duplicated_elec : Boolean
"""
unique_elec_pos = np.unique(elec_pos, axis=0)
has_duplicated_elec = unique_elec_pos.shape == elec_pos.shape
unique_elec_pos = set(map(tuple, elec_pos))
has_duplicated_elec = len(unique_elec_pos) < len(elec_pos)
return has_duplicated_elec


Expand Down

0 comments on commit 2c49122

Please sign in to comment.