Skip to content

Commit d6bbaf4

Browse files
authored
release notes of v0.7.0 and deprecation warnings (#300)
1 parent c818613 commit d6bbaf4

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
# Add any paths that contain custom static files (such as style sheets) here,
162162
# relative to this directory. They are copied after the builtin static files,
163163
# so a file named "default.css" will overwrite the builtin "default.css".
164-
html_static_path = ['_static']
164+
# html_static_path = ['_static']
165165

166166
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
167167
# using the given strftime format.

doc/release_notes.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,52 @@
22
Release Notes
33
*************
44

5+
Elephant 0.7.0 release notes
6+
============================
7+
8+
Breaking changes
9+
----------------
10+
* [gpfa] GPFA dimensionality reduction method is rewritten in easy-to-use scikit-learn class style format (https://github.com/NeuralEnsemble/elephant/pull/287):
11+
12+
.. code-block:: python
13+
14+
gpfa = GPFA(bin_size=20*pq.ms, x_dim=8)
15+
results = gpfa.fit_transform(spiketrains, returned_data=['xorth', 'xsm'])
16+
17+
New tutorials
18+
-------------
19+
* GPFA dimensionality reduction method: https://elephant.readthedocs.io/en/latest/tutorials/gpfa.html
20+
* Unitary Event Analysis of coordinated spiking activity: https://elephant.readthedocs.io/en/latest/tutorials/unitary_event_analysis.html
21+
* (Introductory) statistics module: https://elephant.readthedocs.io/en/latest/tutorials/statistics.html
22+
23+
Deprecations
24+
------------
25+
* **Python 2.7 support will be dropped on Dec 31, 2020.** Please switch to Python 3.6, 3.7, or 3.8.
26+
* [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.
27+
* [pandas bridge] pandas\_bridge module is deprecated and will be deleted in v0.8.0.
28+
29+
New features
30+
------------
31+
* New documentation style, guidelines, tutorials, and more (https://github.com/NeuralEnsemble/elephant/pull/294).
32+
* Python 3.8 support (https://github.com/NeuralEnsemble/elephant/pull/282).
33+
* [spike train generation] Added `refractory_period` flag in `homogeneous_poisson_process()` (https://github.com/NeuralEnsemble/elephant/pull/292) and `inhomogeneous_poisson_process()` (https://github.com/NeuralEnsemble/elephant/pull/295) functions. The default is `refractory_period=None`, meaning no refractoriness.
34+
* [spike train correlation] `cross_correlation_histogram()` supports different t_start and t_stop of input spiketrains.
35+
* [waveform features] `waveform_width()` function extracts the width (trough-to-peak TTP) of a waveform (https://github.com/NeuralEnsemble/elephant/pull/279).
36+
* [signal processing] Added `scaleopt` flag in `pairwise_cross_correlation()` to mimic the behavior of Matlab's `xcorr()` function (https://github.com/NeuralEnsemble/elephant/pull/277). The default is `scaleopt=unbiased` to be consistent with the previous versions of Elephant.
37+
* [spike train surrogates] Joint-ISI dithering method via `JointISI` class (https://github.com/NeuralEnsemble/elephant/pull/275).
38+
39+
Bug fixes
40+
---------
41+
* [spike train correlation] Fix CCH Border Correction (https://github.com/NeuralEnsemble/elephant/pull/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.
42+
* [phase analysis] `spike_triggered_phase()` incorrect behavior when the spike train and the analog signal had different time units (https://github.com/NeuralEnsemble/elephant/pull/270).
43+
44+
Performance
45+
-----------
46+
* [spade] SPADE x7 speedup (https://github.com/NeuralEnsemble/elephant/pull/280, https://github.com/NeuralEnsemble/elephant/pull/285, https://github.com/NeuralEnsemble/elephant/pull/286). Moreover, SPADE is now able to handle all surrogate types that are available in Elephant, as well as more types of statistical corrections.
47+
* [conversion] Fast & memory-efficient `covariance()` and Pearson `corrcoef()` (https://github.com/NeuralEnsemble/elephant/pull/274). Added flag `fast=True` by default in both functions.
48+
* [conversion] Use fast fftconvolve instead of np.correlate in `cross_correlation_histogram()` (https://github.com/NeuralEnsemble/elephant/pull/273).
49+
50+
551
Elephant 0.6.4 release notes
652
============================
753

elephant/spike_train_generation.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,20 @@ def interval_generator_refractory(size):
412412
return spiketrain
413413

414414

415+
def homogeneous_poisson_process_with_refr_period(rate,
416+
refr_period=2. * pq.ms,
417+
t_start=0.0 * pq.ms,
418+
t_stop=1000.0 * pq.ms,
419+
as_array=False):
420+
warnings.warn("homogeneous_poisson_process_with_refr_period() function is "
421+
"deprecated and will be deleted in v0.8.0 release. Use "
422+
"homogeneous_poisson_process(refractory_period=...) instead",
423+
DeprecationWarning)
424+
return homogeneous_poisson_process(rate=rate, t_start=t_start,
425+
t_stop=t_stop, as_array=as_array,
426+
refractory_period=refr_period)
427+
428+
415429
def inhomogeneous_poisson_process(rate, as_array=False,
416430
refractory_period=None):
417431
"""

elephant/test/test_spike_train_generation.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,25 @@ def test_invalid(self):
288288
# no units provided for refractory_period
289289
self.assertRaises(ValueError, hpp, rate=rate, refractory_period=2)
290290

291+
def test_deprecated_homogeneous_poisson_process_with_refr_period(self):
292+
# TODO: remove in v0.8.0
293+
rate = 10 * Hz
294+
t_start = 17 * ms
295+
t_stop = 2 * s
296+
refractory_period = 3 * ms
297+
np.random.seed(28)
298+
spiketrain = stgen.homogeneous_poisson_process(
299+
rate=rate, t_start=t_start, t_stop=t_stop,
300+
refractory_period=refractory_period)
301+
np.random.seed(28)
302+
spiketrain_depr = stgen.homogeneous_poisson_process_with_refr_period(
303+
rate=rate, refr_period=refractory_period, t_start=t_start,
304+
t_stop=t_stop
305+
)
306+
assert_array_almost_equal(spiketrain_depr.times, spiketrain.times)
307+
self.assertAlmostEqual(spiketrain_depr.t_start, spiketrain.t_start)
308+
self.assertAlmostEqual(spiketrain_depr.t_stop, spiketrain.t_stop)
309+
291310

292311
class InhomogeneousPoissonProcessTestCase(unittest.TestCase):
293312
def setUp(self):

0 commit comments

Comments
 (0)