Skip to content

Releases: NeuralEnsemble/elephant

Release 0.9.0

13 Nov 11:46
8e465fd
Compare
Choose a tag to compare

This release is titled to accompany the 2nd Elephant User Workshop

Viziphant

Meet Viziphant, the visualization of Elephant analysis methods, at https://viziphant.readthedocs.io/en/latest/. This package provides support to easily plot and visualize the output of Elephant functions in a few lines of code.

Provenance tracking

Provenance is becoming a separate direction in Elephant. Many things are still to come, and we started with annotating time_histogram, instantaneous_rate and cross_correlation_histogram outputs to carry the information about the parameters these functions used. This allowed Viziphant, the visualization of Elephant analyses, to look for the .annotations dictionary of the output of these function to "understand" how the object has been generated and label the plot axes accordingly.

New functionality and features

  • Time-domain pairwise and conditional pairwise Granger causality measures (#332, #359)
  • Spike contrast function that measures the synchrony of spike trains (#354; thanks to @Broxy7 for bringing this in Elephant).
  • Revised local variability LvR (#346) as an alternative to the LV measure.
  • Three surrogate methods: Trial-shifting, Bin Shuffling, ISI dithering (#343).
  • Added a new function to generate spike trains: inhomogeneous_gamma_process (#339).
  • The output of instantaneous_rate function is now a 2D matrix of shape (time, len(spiketrains)) (#363). Not only can the users assess the averaged instantaneous rate (rates.mean(axis=1)) but also explore how much the instantaneous rate deviates from trial to trial (rates.std(axis=1)) (originally asked in #363).

Python 3 only

  • Python 2.7 and 3.5 support is dropped. You can still however enjoy the features of Elephant v0.9.0 with Python 2.7 or 3.5 by installing Elephant from this commit pip install git+https://github.com/NeuralEnsemble/elephant@295c6bd7fea196cf9665a78649fafedab5840cfa#egg=elephant[extras]
  • Added Python 3.9 support.

Optimization

  • You have been asking for direct numpy support for years. Added _t_start, _t_stop, and _bin_size attributes of BinnedSpikeTrain are guaranteed to be of the same units and hence are unitless (#378). It doesn't mean though that you need to care about units on your own: t_start, t_stop, and bin_size properties are still quantities with units. The .rescale() method of a BinnedSpikeTrain rescales the internal units to new ones in-place. The following Elephant functions are optimized with unitless BinnedSpikeTrain:
    • cross_correlation_histogram
    • bin_shuffling (one of the surrogate methods)
    • spike_train_timescale
  • X4 faster binning and overall BinnedSpikeTrain object creation (#368).
  • instantaneous_rate function is vectorized to work with a list of spike train trials rather than computing them in a loop (previously, for spiketrain in spiketrains; do compute instantaneous_rate(spiketrain); done), which brought X25 speedup (#362; thanks to @gyyang for the idea and original implementation).
  • Memory-efficient zscore function (#372).
  • Don't sort the input array in ISI function (#371), which reduces function algorithmic time complexity from O(N logN) to linear O(N). Now, when the input time array is not sorted, a warning is shown.
  • Vectorized Current Source Density generate_lfp function (#358).

Breaking changes

  • mpi4py package is removed from the extra requirements to allow pip install elephant[extras] on machines without MPI installed system-wide. Refer to MPI support installation page in elephant.
  • BinnedSpikeTrain (#368, #377):
    • previously, when t_start/stop, if set manually, was outside of the shared time interval, only the shared [t_start_shared=max(t_start), t_stop_shared=min(t_stop)] interval was implicitly considered without any warnings. Now an error is thrown with a description on how to fix it.
    • removed lst_input, input_spiketrains, matrix_columns, matrix_rows (in favor of the new attribute - shape), tolerance, is_spiketrain, is_binned attributes from BinnedSpikeTrain class. Part of them are confusing (e.g., is_binned was just the opposite of is_spiketrain, but one can erroneously think that it's data is clipped to 0 and 1), and part of them - lst_input, input_spiketrains input data - should not have been saved as attributes of an object in the first place because the input spike trains are not used after the sparse matrix is created.
    • now the users can directly access .sparse_matrix attribute of BinnedSpikeTrain to do efficient (yet unsafe in general) operations. For this reason, to_sparse_array() function, which does not make a copy, as one could think of, is deprecated.
  • instantaneous_rate function (#362):
    • in case of multiple input spike trains, the output of the instantaneous rate function is (always) a 2D matrix of shape (time, len(spiketrains)) instead of a pseudo 1D array (previous behavior) of shape (time, 1) that contained the instantaneous rate summed across input spike trains;
    • in case of multiple input spike trains, the user needs to manually provide the input kernel instead of auto, which is set by default, for the reason that it's currently not clear how to estimate the common kernel for a set of spike trains. If you have an idea how to do this, we`d appreciate if you let us know by getting in touch with us.

Other changes

  • waveform_snr function now directly takes a 2D or 3D waveforms matrix rather than a spike train (deprecated behavior).
  • Added a warning in fanofactor function when the input spiketrains vary in their durations (#341).
  • SPADE: New way to count patterns for multiple testing (#347)
  • GPFA renamed 'xsm' -> 'latent_variable' and 'xorth' -> 'latent_variable_orth'

Bug fixes

  • Instantaneous rate arrays were not centered at the origin for spike trains that are symmetric at t=0 with center_kernel=True option (#362).
  • The number of discarded spikes that fall into the last bin of a BinnedSpikeTrain object was incorrectly calculated (#368).
  • Fixed index selection in spike_triggered_phase (#382)
  • Fixed surrogates bugs:
    • joint-ISI and shuffle ISI output spike trains were not sorted in time (#364);
    • surrogates get arbitrary sampling_rate (#353), which relates to the provenance tracking issue;

Release 0.8.0

07 Aug 13:05
fe7b86d
Compare
Choose a tag to compare

New features

  • The parallel module is a new experimental module (#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 (#297).
  • Added cdf and icdf functions in Kernel class to correctly estimate the median index, needed for instantaneous_rate function in statistics.py (#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 (#313).
  • Added an optional tolerance argument, set to 1e-8 by default, to BinnedSpikeTrain class that accounts for rounding errors in the binning process of the input data (#305).

New tutorials

Optimization

  • Optimized ASSET runtime by a factor of 10 and more (#259, #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 (#316).
  • Deprecated pandas_bridge module has been removed from a list of auto imports in elephant/__init__.py but can be still easily accessed by from elephant import pandas_bridge.

Release 0.7.0

03 Mar 12:19
67a035e
Compare
Choose a tag to compare

Breaking changes

  • GPFA dimensionality reduction method is rewritten in easy-to-use scikit-learn class style format (#287):
     gpfa = GPFA(bin_size=20*pq.ms, x_dim=8)
     results = gpfa.fit_transform(spiketrains, returned_data=['xorth', 'xsm'])

New tutorials

Deprecations

  • Python 2.7 support will be dropped on Dec 31, 2020. Please switch to Python 3.6, 3.7, or 3.8.
  • [spike train generation] homogeneous_poisson_process_with_refr_period(), introduced in v0.6.4, is deprecated and will be deleted in v0.8.0. Use homogeneous_poisson_process(refractory_period=...) instead.
  • [pandas bridge] pandas_bridge module is deprecated and will be deleted in v0.8.0.

New features

  • New documentation style, guidelines, tutorials, and more (#294).
  • Python 3.8 support (#282).
  • [spike train generation] Added refractory_period flag in homogeneous_poisson_process() (#292) and inhomogeneous_poisson_process() (#295) functions. The default is refractory_period=None, meaning no refractoriness.
  • [spike train correlation] cross_correlation_histogram() supports different t_start and t_stop of input spiketrains (#291).
  • [waveform features] waveform_width() function extracts the width (trough-to-peak TTP) of a waveform (#279).
  • [signal processing] Added scaleopt flag in pairwise_cross_correlation() to mimic the behavior of Matlab's xcorr() function (#277). The default is scaleopt=unbiased to be consistent with the previous versions of Elephant.
  • [spike train surrogates] Joint-ISI dithering method via JointISI class (#275).

Bug fixes

  • [spike train correlation] Fix CCH Border Correction (#298). Now, the border correction in cross_correlation_histogram() correctly reflects the number of bins used for the calculation at each lag. The correction factor is now unity at full overlap.
  • [phase analysis] spike_triggered_phase() incorrect behavior when the spike train and the analog signal had different time units (#270).

Performance

  • [spade] SPADE x7 speedup (#280, #285, #286). Moreover, SPADE is now able to handle all surrogate types that are available in Elephant, as well as more types of statistical corrections.
  • [conversion] Fast & memory-efficient covariance() and Pearson corrcoef() (#274). Added flag fast=True by default in both functions.
  • [conversion] Use fast fftconvolve instead of np.correlate in cross_correlation_histogram() (#273).

Release 0.6.4

31 Oct 15:10
5dfa042
Compare
Choose a tag to compare

This release has been made for the 1st Elephant User Workshop.

Main features

  • neo v0.8.0 compatible

New modules

  • GPFA - Gaussian-process factor analysis - dimensionality reduction method for neural trajectory visualization (#233). Note: the API could change in the future.

Buf fixes

  • [signal processing] Keep array_annotations in the output of signal processing functions (#258).
  • [SPADE] Fixed the calculation of the duration of a pattern in the output (#254).
  • [statistics] Fixed automatic kernel selection yields incorrect values (#246).

Improvements

  • Vectorized spike_time_tiling_coefficient() function - got rid of a double for-loop (#244)
  • Reduced the number of warnings during the tests (#238).
  • Removed unused debug code in spade/fast_fca.py (#249).
  • Improved doc string of covariance() and corrcoef() (#260).

Release 0.6.3

23 Jul 08:56
Compare
Choose a tag to compare

The release v0.6.3 is mostly about improving maintenance.

New functions

  • waveform_features module
    • Waveform signal-to-noise ratio (#219).
  • Added support for Butterworth sosfiltfilt - numerically stable (in particular, higher order) filtering (#234).

Buf fixes

  • Fixed neo version typo in requirements file (#218)
  • Fixed broken docs (#230, #232)
  • Fixed issue with 32-bit arch (#229)

Other changes

  • Added issue templates (#226)
  • Single VERSION file (#231)

Release 0.6.2

23 Apr 17:44
b0f328e
Compare
Choose a tag to compare

Elephant 0.6.2 release notes

April 23rd 2019

New functions

  • signal_processing module
    • New functions to calculate the area under a time series and the derivative of a time series.

Other changes

  • Added support to initialize binned spike train representations with a matrix
  • Multiple bug fixes

Release 0.6.1

01 Apr 12:23
009e80f
Compare
Choose a tag to compare

Elephant 0.6.1 release notes

April 1st 2019

New functions

  • signal_processing module
    • New function to calculate the cross-correlation function for analog signals.
  • spade module
    • Spatio-temporal spike pattern detection now includes the option to assess significance also based on time-lags of patterns, in addition to patterns size and frequency (referred to as 3D pattern spectrum).

Other changes

  • This release fixes a number of compatibility issues in relation to API breaking changes in the Neo library.
  • Fixed error in STTC calculation (spike time tiling coefficient)
  • Minor bug fixes

Release 0.6.0

12 Oct 17:04
Compare
Choose a tag to compare

Elephant 0.6.0 release notes

October 12th, 2018

New functions

  • cell_assembly_detection module
    • New function to detect higher-order correlation structures such as patterns in parallel spike trains based on Russo et al, 2017.
  • wavelet_transform() function in signal_prosessing.py module
    • Function for computing wavelet transform of a given time series based on Le van Quyen et al. (2001)

Other changes

  • Switched to multiple requirements.txt files which are directly read into the setup.py
  • instantaneous_rate() accepts now list of spiketrains
  • Minor bug fixes

Release 0.5.0

10 Apr 16:49
Compare
Choose a tag to compare

Elephant 0.5.0 release notes

April 10th 2018

New functions

  • change_point_detection module:
    • New function to detect changes in the firing rate
  • spike_train_correlation module:
    • New function to calculate the spike time tiling coefficient
  • phase_analysis module:
    • New function to extract spike-triggered phases of an AnalogSignal
  • unitary_event_analysis module:
    • Added new unit test to the UE function to verify the method based on data of a recent [Re]Science publication

Other changes

  • Minor bug fixes

Release 0.4.3

02 Mar 15:32
Compare
Choose a tag to compare

Elephant 0.4.3 release notes

March 2nd 2018

Other changes

  • Bug fixes in spade module:
    • Fixed an incompatibility with the latest version of an external library