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

New version 0.7 #333

Merged
merged 229 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
26c2b25
inital commit for signal proc - complex morelet and fft v0
kippfreud Jun 6, 2024
f080d4f
basic pywavelets functionality matched
kippfreud Jun 26, 2024
9aa05ac
different wavelet definition
kippfreud Jun 27, 2024
4af8d90
wavlet workaround fixed, tutorial added
kippfreud Jun 27, 2024
01c5435
tutorial cleaning
kippfreud Jun 28, 2024
027878e
linting
kippfreud Jun 28, 2024
18b3bc1
more linting
kippfreud Jun 28, 2024
ebdbe67
json removal
kippfreud Jun 28, 2024
75d3a46
basic tests added
kippfreud Jun 28, 2024
334e785
remove unused import
kippfreud Jul 1, 2024
a3ab81c
minor notebook changes
kippfreud Jul 2, 2024
80c12d7
spectogram now takes tdsframe
kippfreud Jul 2, 2024
c1a5a26
review changes
kippfreud Jul 3, 2024
dfe6e41
updated function names in test
kippfreud Jul 3, 2024
3a9173a
updated tests
kippfreud Jul 3, 2024
cfb6066
expanded test coverage
kippfreud Jul 3, 2024
a3d30ea
Fixing kwargs
gviejo Jul 5, 2024
cc2cdfa
fixed tsgroup
gviejo Jul 7, 2024
4148d6d
notebook various changes
kippfreud Jul 8, 2024
19c9183
compute_wavelet_transform can now handle TsdTensor
kippfreud Jul 8, 2024
c59e010
update convolve
gviejo Jul 10, 2024
2d60698
Update
gviejo Jul 10, 2024
9b0bc02
New convolution
gviejo Jul 12, 2024
2f3b457
linting
gviejo Jul 12, 2024
3ad7b5a
adding tests for utils
gviejo Jul 12, 2024
63f52b2
PR comment changes
kippfreud Jul 12, 2024
4d154dd
Merge pull request #308 from pynapple-org/convolve_update
gviejo Jul 12, 2024
dda072f
filterbank changes
kippfreud Jul 12, 2024
600400b
using nap.convolve, and other review changes
kippfreud Jul 12, 2024
d0c0ddd
fixed test
kippfreud Jul 12, 2024
9c53af5
unused import removed
kippfreud Jul 12, 2024
f6b11d3
added lazy loading option for nwb loading function
vigji Jul 15, 2024
2b4bc86
logspacing
kippfreud Jul 15, 2024
8660aff
added pickling support for tsgroup
BalzaniEdoardo Jul 15, 2024
0c59fba
linters
BalzaniEdoardo Jul 15, 2024
e66c428
Merge pull request #315 from pynapple-org/pickling_tsgroup
gviejo Jul 15, 2024
c5f8cfb
npz refactoring and lazy loading
vigji Jul 16, 2024
358892e
small impros
vigji Jul 16, 2024
769205e
Merge remote-tracking branch 'upstream/dev'
vigji Jul 16, 2024
c566989
blaked
vigji Jul 16, 2024
9079ddc
fixed tests
vigji Jul 16, 2024
295dfac
Moved class method to base class
vigji Jul 17, 2024
ae2aa3e
Final cleanup and load_file test in lazy_load
vigji Jul 17, 2024
d68f348
Comment removed
vigji Jul 17, 2024
d469536
linting
vigji Jul 17, 2024
ed2726a
isorted black
vigji Jul 17, 2024
5ed5b76
Added option for closing an open file
vigji Jul 17, 2024
f110d1e
better tests, finished notebook 1
kippfreud Jul 17, 2024
b00bf23
linting
kippfreud Jul 17, 2024
81a076e
phase preference notebook added
kippfreud Jul 17, 2024
ebdb64c
remove unused import
kippfreud Jul 17, 2024
0f17883
simplified compute_wavelet_transform, added tests
kippfreud Jul 17, 2024
5af389d
removed time zeroing for doc examples
kippfreud Jul 17, 2024
072fbe3
minor changes, wavelet API v0
kippfreud Jul 17, 2024
ffdc3d9
linting
kippfreud Jul 17, 2024
804565e
removed file from test
vigji Jul 17, 2024
b302e7d
ignore folder generated during tests
vigji Jul 17, 2024
1be64e3
Update pynapple/io/interface_npz.py
vigji Jul 17, 2024
dbea5ac
Update pynapple/io/interface_npz.py
vigji Jul 17, 2024
797bb0a
blacked
vigji Jul 17, 2024
7cd48f2
Merge branch 'main' of https://github.com/iurillilab/pynapple
vigji Jul 17, 2024
8cc3210
neurosuite
vigji Jul 17, 2024
6063c5b
phy
vigji Jul 17, 2024
4ef312c
cnmfe
vigji Jul 17, 2024
3d91320
all tests fixed after refactoring
vigji Jul 17, 2024
894ff90
complete pathlib transition
vigji Jul 17, 2024
54d8cb6
better wavelet API notebook
kippfreud Jul 18, 2024
3d1ab70
removed tkagg
kippfreud Jul 18, 2024
5df9ff0
linting
kippfreud Jul 18, 2024
c942a79
linting
kippfreud Jul 18, 2024
ef9dc1a
Merge pull request #313 from iurillilab/main
gviejo Jul 18, 2024
04e9d8a
wavelet api tutorial improved, generate_filterbank returns TdsFrame
kippfreud Jul 19, 2024
c49d767
welch removed
kippfreud Jul 19, 2024
917f932
welch import removed
kippfreud Jul 19, 2024
10e47fb
review comments addressed
kippfreud Jul 19, 2024
fa7952e
removing welch tests
kippfreud Jul 19, 2024
cac44ff
fixed broked phase notebook
kippfreud Jul 19, 2024
b0bb20f
better comments on phase notebook
kippfreud Jul 19, 2024
c66fc87
required test fixes
vigji Jul 22, 2024
408f7f2
Merge pull request #316 from iurillilab/os-removal
gviejo Jul 23, 2024
496fbe3
PR comments addressed, tests added
kippfreud Jul 29, 2024
647bbfc
unused import removed
kippfreud Jul 29, 2024
057d655
REmoved neurosuite nwb saving of intervals
gviejo Jul 29, 2024
17017eb
Test
gviejo Jul 29, 2024
a5a6295
added get_slice func
BalzaniEdoardo Jul 29, 2024
99e0e47
added comment
BalzaniEdoardo Jul 30, 2024
9dae2d0
improved test and docstring
BalzaniEdoardo Jul 30, 2024
e43434f
linted
BalzaniEdoardo Jul 30, 2024
9cf959e
renamed test
BalzaniEdoardo Jul 30, 2024
e90091c
speed up closest
BalzaniEdoardo Jul 30, 2024
fecd8bd
added an n_points
BalzaniEdoardo Jul 30, 2024
b01394b
linted
BalzaniEdoardo Jul 30, 2024
5e50daa
added tests for public
BalzaniEdoardo Jul 30, 2024
edb5229
improved docstrings
BalzaniEdoardo Jul 30, 2024
a60a1b1
intervalset chunking
gviejo Jul 30, 2024
8d867b2
add warnings
gviejo Jul 30, 2024
993831e
added examples
BalzaniEdoardo Jul 30, 2024
0a351e0
fix test public
BalzaniEdoardo Jul 30, 2024
0e6665d
fix example
BalzaniEdoardo Jul 30, 2024
e63ffe8
removing integrate->conv->diff pipeline
kippfreud Jul 30, 2024
41905f1
pulling upstream dev
kippfreud Jul 30, 2024
5f07ddc
Merge pull request #322 from pynapple-org/309_get_index
gviejo Jul 30, 2024
154ee3d
Update tests/test_interval_set.py
gviejo Jul 30, 2024
9722d21
Update pynapple/core/interval_set.py
gviejo Jul 30, 2024
e8d51a5
Update
gviejo Jul 30, 2024
c08a4f0
added temp path in lazy loading
BalzaniEdoardo Jul 30, 2024
bf8d45c
fixed tests
BalzaniEdoardo Jul 30, 2024
e9edec4
Merge pull request #324 from pynapple-org/fix_write_issue_windows
gviejo Jul 31, 2024
47e0876
changing pandas test
gviejo Jul 31, 2024
6c176ea
update
gviejo Jul 31, 2024
c5f986f
Merge branch 'dev' into iset_splitting
gviejo Jul 31, 2024
81695c3
update
gviejo Jul 31, 2024
070f3e6
added dtype for count
BalzaniEdoardo Jul 31, 2024
b9c4251
update
gviejo Jul 31, 2024
e94a526
update
gviejo Jul 31, 2024
eaada2e
Update
gviejo Jul 31, 2024
1068c61
Update
gviejo Jul 31, 2024
67954af
linted
BalzaniEdoardo Jul 31, 2024
0fe97ad
Update
gviejo Jul 31, 2024
7d9eb6f
Merge pull request #323 from pynapple-org/iset_splitting
gviejo Jul 31, 2024
16a3bc6
pulling dev
kippfreud Jul 31, 2024
059d2c4
Adding new notebook for psd
gviejo Jul 31, 2024
2fc09b5
Merge branch 'signal_processing' of https://github.com/kippfreud/pyna…
gviejo Jul 31, 2024
eec4740
Adding mean psd notebook
gviejo Jul 31, 2024
82dfc43
pushing some failing tests
gviejo Aug 1, 2024
0fcbdfd
start edit test
BalzaniEdoardo Aug 1, 2024
0d55b17
added slice mode restrict
BalzaniEdoardo Aug 1, 2024
6c3d6e5
Adding tests for mean PSD
gviejo Aug 1, 2024
c8a5fc4
linting
gviejo Aug 1, 2024
283a097
fixed public method
BalzaniEdoardo Aug 1, 2024
8419631
fixed public method
BalzaniEdoardo Aug 2, 2024
a19f05d
linted
BalzaniEdoardo Aug 2, 2024
1150c08
improved docstrings
BalzaniEdoardo Aug 2, 2024
0d13470
isorted
BalzaniEdoardo Aug 2, 2024
65a1a1a
param name changes
kippfreud Aug 2, 2024
d7283b4
pulling guillaume changes
kippfreud Aug 2, 2024
b16c7c8
fixed notebooks
gviejo Aug 2, 2024
c816da4
Adding filtering.py
gviejo Aug 2, 2024
e719740
guillaume changes
kippfreud Aug 2, 2024
127b07b
Propagating dtype to numba
gviejo Aug 2, 2024
5b7b42c
Merge branch 'dev' into dtype_count
gviejo Aug 2, 2024
cc6da20
Merge pull request #325 from pynapple-org/dtype_count
gviejo Aug 2, 2024
74d9061
better tests
kippfreud Aug 5, 2024
73ee4de
one added case for tests
kippfreud Aug 5, 2024
a5b4f3b
Updating tutorial_signal_processing notebool
gviejo Aug 5, 2024
b1540ea
more concise plotting code in docs
kippfreud Aug 5, 2024
05a5996
signal processing tests to 100% coverage
kippfreud Aug 5, 2024
05e29b6
coverage actually to 100%
kippfreud Aug 6, 2024
d723b8a
changes to notebooks
kippfreud Aug 6, 2024
8d78bb5
doc plot neatening
kippfreud Aug 6, 2024
7fee0d6
Update tutorial_signal_processing.py and tests
gviejo Aug 6, 2024
c32276b
Fixing conflicts
gviejo Aug 6, 2024
265be7f
Missing test for sig processing
gviejo Aug 7, 2024
8885714
More update on wavelets
gviejo Aug 7, 2024
2793e1c
change title
gviejo Aug 7, 2024
3ad5ad9
Merge remote-tracking branch 'origin/change_slice_api' into filtering
BalzaniEdoardo Aug 7, 2024
ebe5e76
improved filtering
BalzaniEdoardo Aug 7, 2024
bc20031
added regressoin test
BalzaniEdoardo Aug 7, 2024
77dab5f
added unit testing
BalzaniEdoardo Aug 7, 2024
86ca588
test dytpe
BalzaniEdoardo Aug 7, 2024
098de14
removed simple test
BalzaniEdoardo Aug 7, 2024
287523e
improved tests
BalzaniEdoardo Aug 7, 2024
5d3a340
Updating tests
gviejo Aug 8, 2024
5fab4dc
check that fft of wavelet is correct gaussian
kippfreud Aug 8, 2024
252d63b
mergin test changes
kippfreud Aug 8, 2024
a761f6e
linting
kippfreud Aug 8, 2024
bda5892
removed bad import
kippfreud Aug 8, 2024
9e5672a
Changed get method
gviejo Aug 8, 2024
86fa38e
Merge pull request #326 from pynapple-org/change_slice_api
gviejo Aug 8, 2024
33fd98f
Merge branch 'dev' into signal_processing
gviejo Aug 8, 2024
9651077
updating
gviejo Aug 8, 2024
ee558e5
addressing comments, slight notebook improvements
kippfreud Aug 9, 2024
0e8268b
merging changes
kippfreud Aug 9, 2024
861042a
suggested changes and wavelet arange rounding fix
kippfreud Aug 9, 2024
0896026
allow IntervalSet creation with iterable of tuples
eschombu Jun 24, 2024
8f21e99
Merge pull request #300 from kippfreud/signal_processing
gviejo Aug 9, 2024
fc6f731
make IntervalSet(start_end_pairs) initialization clearer and more robust
eschombu Aug 9, 2024
4592241
accept iterable of Ts-compatible objects for TsGroup
eschombu Jun 25, 2024
ce6f373
ensure expected data dict ordering in TsGroup
eschombu Jun 25, 2024
64ffdc0
black formatting
eschombu Aug 9, 2024
43d4e7f
Merge pull request #305 from eschombu/tsgroup-from-iter
gviejo Aug 12, 2024
e3bf7cc
Merge pull request #304 from eschombu/interval-tuples
gviejo Aug 13, 2024
fca58a6
Merge branch 'dev' into filtering
gviejo Aug 13, 2024
d1851a9
do not run actions on draft PR
BalzaniEdoardo Aug 15, 2024
b6f8724
linted
BalzaniEdoardo Aug 15, 2024
3467a85
added tests
BalzaniEdoardo Aug 15, 2024
9a1ed8a
switch to sos filter
BalzaniEdoardo Aug 15, 2024
b1916bf
removed unused import
BalzaniEdoardo Aug 15, 2024
f669f95
linted
BalzaniEdoardo Aug 15, 2024
6c5d88a
few changes
gviejo Aug 15, 2024
4b34f23
Merge branch 'filtering' of github.com:pynapple-org/pynapple into fil…
gviejo Aug 15, 2024
009477a
Update pynapple/process/filtering.py
BalzaniEdoardo Aug 16, 2024
0d21879
Update pynapple/process/filtering.py
BalzaniEdoardo Aug 16, 2024
292ee29
changed to sampling_frequency
BalzaniEdoardo Aug 16, 2024
58e3ca1
linting
gviejo Aug 16, 2024
58a9554
Adding tests and notebook for filtering module
gviejo Sep 1, 2024
4b12da6
Fixing notebooks
gviejo Sep 2, 2024
eb93976
Fixing sinc
gviejo Sep 2, 2024
4cb76ce
added exception
BalzaniEdoardo Sep 6, 2024
e9468b0
added test exception
BalzaniEdoardo Sep 6, 2024
9774346
fixes lowpass and highpass by normalizing
BalzaniEdoardo Sep 6, 2024
55105f2
fix tests
BalzaniEdoardo Sep 6, 2024
2c9a194
fix highpass
BalzaniEdoardo Sep 6, 2024
c3a681a
fix highpass
BalzaniEdoardo Sep 6, 2024
affd113
fix bandstop
BalzaniEdoardo Sep 6, 2024
031cae4
fix bandpass
BalzaniEdoardo Sep 7, 2024
bb9ed18
added a parameter for spectral density
BalzaniEdoardo Sep 7, 2024
d96087e
edited tutorial
BalzaniEdoardo Sep 7, 2024
8300626
Update
gviejo Sep 9, 2024
c19d785
linted
BalzaniEdoardo Sep 9, 2024
ef948f0
removed repeated code. Simplified validate
BalzaniEdoardo Sep 9, 2024
d76aa3d
Update
gviejo Sep 9, 2024
900c4b5
nan fix
BalzaniEdoardo Sep 9, 2024
bbf6298
fix all nans
BalzaniEdoardo Sep 9, 2024
6af28c0
added description of bands. Fixed typing
BalzaniEdoardo Sep 11, 2024
6309c92
adding jax compatibility
gviejo Sep 11, 2024
6bb18bb
Merge branch 'filtering' of github.com:pynapple-org/pynapple into fil…
gviejo Sep 11, 2024
5f3eb77
improved flow
BalzaniEdoardo Sep 11, 2024
1309dab
Merge branch 'filtering' of github.com:pynapple-org/pynapple into fil…
gviejo Sep 12, 2024
d4d4941
Fix tests for pynajax
gviejo Sep 12, 2024
764d6b6
Updating
gviejo Sep 12, 2024
a86090c
Update
gviejo Sep 12, 2024
526fb96
Merge pull request #329 from pynapple-org/filtering
gviejo Sep 12, 2024
6da301b
firt commit
gviejo Sep 13, 2024
e5ee5b2
More updates
gviejo Sep 13, 2024
bedb89f
Changing version number
gviejo Sep 13, 2024
79855e0
Cleaning
gviejo Sep 13, 2024
fa20751
Merge pull request #332 from pynapple-org/bump_0.7
gviejo Sep 13, 2024
abec0c6
Merge branch 'main' into dev
gviejo Sep 13, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
branches: [ main ]
pull_request:
branches: [ main, dev ]
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
lint:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
*.npz
*.nwb
*.pickle
*.py.md5
*.npz
#*.npz
/docs/generated/gallery/*.md
/docs/generated/gallery/*.ipynb
/docs/generated/gallery/*.py
/docs/generated/gallery/*.zip

/tests/npzfilestest

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
11 changes: 0 additions & 11 deletions MANIFEST.in

This file was deleted.

11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ pynapple is a light-weight python library for neurophysiological data analysis.
New release :fire:
------------------

### pynapple >= 0.7

Pynapple now implements signal processing. For example, to filter a 1250 Hz sampled time series between 10 Hz and 20 Hz:

```python
nap.apply_bandpass_filter(signal, (10, 20), fs=1250)
```
New functions includes power spectral density and Morlet wavelet decomposition. See the [documentation](https://pynapple-org.github.io/pynapple/reference/process/) for more details.

### pynapple >= 0.6

Starting with 0.6, [`IntervalSet`](https://pynapple-org.github.io/pynapple/reference/core/interval_set/) objects are behaving as immutable numpy ndarray. Before 0.6, you could select an interval within an `IntervalSet` object with:
Expand All @@ -45,8 +54,6 @@ With pynapple>=0.6, the slicing is similar to numpy and it returns an `IntervalS
new_intervalset = intervalset[0]
```

See the [documentation](https://pynapple-org.github.io/pynapple/reference/core/interval_set/) for more details.

### pynapple >= 0.4

Starting with 0.4, pynapple rely on the [numpy array container](https://numpy.org/doc/stable/user/basics.dispatch.html) approach instead of Pandas for the time series. Pynapple builtin functions will remain the same except for functions inherited from Pandas.
Expand Down
5 changes: 3 additions & 2 deletions docs/AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ Development Lead
----------------

- Guillaume Viejo <[email protected]>
- Edoardo Balzani <[email protected]>


Contributors
------------

- Edoardo Balzani <[email protected]>
- Adrien Peyrache
- Dan Levenstein
- Sofia Skromne Carrasco
- Davide Spalla
- Luigi Petrucco
- Luigi Petrucco
- ... [and many more!](https://github.com/pynapple-org/pynapple/graphs/contributors)
24 changes: 23 additions & 1 deletion docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,29 @@ Another postdoc in the lab, Francesco Battaglia, then made major contributions t
Around 2016-2017, Luke Sjulson started *TSToolbox2*, still in Matlab and which includes some important changes.

In 2018, Francesco started neuroseries, a Python package built on Pandas. It was quickly adopted in Adrien's lab, especially by Guillaume Viejo, a postdoc in the lab. Gradually, the majority of the lab was using it and new functions were constantly added.
In 2021, Guillaume and other trainees in Adrien's lab decided to fork from neuroseries and started *pynapple*. The core of pynapple is largely built upon neuroseries. Some of the original changes to TSToolbox made by Luke were included in this package, especially the *time_support* property of all ts/tsd objects.
In 2021, Guillaume and other trainees in Adrien's lab decided to fork from neuroseries and started *pynapple*.
The core of pynapple is largely built upon neuroseries. Some of the original changes to TSToolbox made by Luke were included in this package, especially the *time_support* property of all ts/tsd objects.

Since 2023, the development of pynapple is lead by [Guillaume Viejo](https://www.simonsfoundation.org/people/guillaume-viejo/)
and [Edoardo Balzani](https://www.simonsfoundation.org/people/edoardo-balzani/) at the Center for Computational Neuroscience
of the Flatiron institute.



0.7.0 (2024-09-16)
------------------

- Morlet wavelets spectrogram with utility for plotting the wavelets.
- (Mean) Power spectral density. Returns a Pandas DataFrame.
- Convolve function works for any dimension of time series and any dimensions of kernel.
- `dtype` in count function
- `get_slice`: public method with a simplified API, argument start, end, time_units. returns a slice that matches behavior of Base.get.
- `_get_slice`: private method, adds the argument "mode" this can be: "after_t", "before_t", "closest_t", "restrict".
- `split` method for IntervalSet. Argument is `interval_size` in time unit.
- Changed os import to pathlib.
- Fixed pickling issue. TsGroup can now be saved as pickle.
- TsGroup can be created from an iterable of Ts/Tsd objects.
- IntervalSet can be created from (start, end) pairs

0.6.6 (2024-05-28)
------------------
Expand Down
Loading
Loading