xarray-behave 0.35.8__tar.gz → 0.37.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/PKG-INFO +25 -23
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/pyproject.toml +12 -12
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/__init__.py +2 -2
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/das.py +6 -3
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/formbuilder.py +1 -1
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/views.py +1 -1
- xarray_behave-0.37.0/tests/test_imports.py +12 -0
- xarray_behave-0.37.0/tests/test_sampstamps.py +34 -0
- xarray-behave-0.35.8/tests/test_imports.py +0 -14
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/.github/workflows/publish.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/.gitignore +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/LICENSE +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/README.md +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/build_env.yml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/conda/xarray-behave/bld.bat +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/conda/xarray-behave/build.sh +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/conda/xarray-behave/meta.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/condarc.yml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/doc/demo.ipynb +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/doc/demo_behavioral_features.ipynb +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/doc/demo_behavioral_features_large_group.ipynb +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/doc/ncb.mplstyle +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/setup.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/annot.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/event_utils.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/__init__.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/app.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/audio_player.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/das_make.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/das_predict.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/das_train.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/envelope_computation.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/export_for_das.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/from_dir.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/from_file.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/from_zarr.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/spec_freq.yaml +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/icon.png +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/table.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/utils.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/view_dialog.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/widgets.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/__init__.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/annotations.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/annotations_manual.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/audio.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/balltracks.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/movieparams.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/poses.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/samplestamps/__init__.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/samplestamps/samplestamps.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/samplestamps/utils.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/timestamps.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/tracks.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/loaders.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/metrics.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/xarray_behave.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/tests/test_annot.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/tests/test_assemble.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/tests/test_assemble_metrics.py +0 -0
- {xarray-behave-0.35.8 → xarray_behave-0.37.0}/tests/test_io.py +0 -0
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: xarray-behave
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.37.0
|
|
4
4
|
Summary: xarray tools for behavioral data.
|
|
5
5
|
Author-email: Jan Clemens <clemensjan@googlemail.com>
|
|
6
|
-
Requires-Python: >3.
|
|
6
|
+
Requires-Python: >3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Classifier: License :: OSI Approved ::
|
|
9
|
-
Requires-Dist:
|
|
10
|
-
Requires-Dist:
|
|
11
|
-
Requires-Dist:
|
|
8
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
|
+
Requires-Dist: defopt==6.3
|
|
10
|
+
Requires-Dist: rich
|
|
11
|
+
Requires-Dist: flammkuchen
|
|
12
12
|
Requires-Dist: h5py
|
|
13
|
+
Requires-Dist: pyyaml
|
|
13
14
|
Requires-Dist: zarr
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist:
|
|
15
|
+
Requires-Dist: numba
|
|
16
|
+
Requires-Dist: xarray
|
|
17
|
+
Requires-Dist: numpy
|
|
18
|
+
Requires-Dist: scipy>1.9
|
|
16
19
|
Requires-Dist: dask
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: pandas
|
|
21
|
+
Requires-Dist: scikit-image
|
|
22
|
+
Requires-Dist: scikit-learn
|
|
23
|
+
Requires-Dist: peakutils
|
|
24
|
+
Requires-Dist: librosa>0.8
|
|
25
|
+
Requires-Dist: sounddevice
|
|
26
|
+
Requires-Dist: soundfile
|
|
19
27
|
Requires-Dist: opencv-python-headless
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist:
|
|
23
|
-
Requires-Dist: qtpy
|
|
24
|
-
Requires-Dist: superqt
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist: scikit-image ; extra == "gui"
|
|
27
|
-
Requires-Dist: pyyaml ; extra == "gui"
|
|
28
|
-
Requires-Dist: defopt ; extra == "gui"
|
|
29
|
-
Requires-Dist: colorcet ; extra == "gui"
|
|
30
|
-
Requires-Dist: peakutils ; extra == "gui"
|
|
28
|
+
Requires-Dist: pyvideoreader
|
|
29
|
+
Requires-Dist: PySide6-Essentials
|
|
30
|
+
Requires-Dist: pyqtgraph>0.12.2
|
|
31
|
+
Requires-Dist: qtpy
|
|
32
|
+
Requires-Dist: superqt
|
|
33
|
+
Requires-Dist: colorcet
|
|
31
34
|
Project-URL: documentation, https://janclemenslab.org/das/
|
|
32
35
|
Project-URL: source, https://github.com/janclemenslab/xarray-behave
|
|
33
|
-
Provides-Extra: gui
|
|
34
36
|
|
|
35
37
|
# xarray-behave
|
|
36
38
|
|
|
@@ -7,20 +7,20 @@ name = "xarray-behave"
|
|
|
7
7
|
authors = [
|
|
8
8
|
{name = "Jan Clemens", email = "clemensjan@googlemail.com"},
|
|
9
9
|
]
|
|
10
|
-
classifiers = ["License :: OSI Approved ::
|
|
10
|
+
classifiers = ["License :: OSI Approved :: Apache Software License"]
|
|
11
11
|
dynamic = ["version", "description"]
|
|
12
|
-
requires-python = ">3.
|
|
13
|
-
dependencies = ['
|
|
14
|
-
'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
requires-python = ">3.9"
|
|
13
|
+
dependencies = ['defopt==6.3', 'rich', 'flammkuchen', 'h5py', 'pyyaml',
|
|
14
|
+
'zarr','numba', 'xarray', 'numpy', 'scipy>1.9',
|
|
15
|
+
'dask', 'pandas', 'scikit-image', 'scikit-learn',
|
|
16
|
+
'peakutils', 'librosa>0.8',
|
|
17
|
+
'sounddevice', 'soundfile',
|
|
18
|
+
'opencv-python-headless', 'pyvideoreader',
|
|
19
|
+
'PySide6-Essentials', 'pyqtgraph>0.12.2', 'qtpy', 'superqt',
|
|
20
|
+
'colorcet',
|
|
21
|
+
]
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
xb = "xarray_behave.gui.app:cli"
|
|
23
|
+
readme = "README.md"
|
|
24
24
|
|
|
25
25
|
[project.urls]
|
|
26
26
|
source = "https://github.com/janclemenslab/xarray-behave"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
|
|
3
|
+
logger = logging.getLogger(__name__)
|
|
4
|
+
|
|
2
5
|
import collections
|
|
3
6
|
from glob import glob
|
|
4
7
|
import os.path
|
|
@@ -11,22 +14,22 @@ import librosa
|
|
|
11
14
|
import scipy
|
|
12
15
|
import h5py
|
|
13
16
|
|
|
17
|
+
from .. import annot, event_utils
|
|
18
|
+
|
|
14
19
|
import das.make_dataset as dsm
|
|
15
20
|
import das.npy_dir
|
|
16
21
|
import das.annot
|
|
17
22
|
|
|
18
|
-
from .. import annot, event_utils
|
|
19
|
-
|
|
20
23
|
import das.make_dataset
|
|
21
24
|
import das.npy_dir
|
|
22
25
|
import das.train
|
|
23
26
|
import das.predict
|
|
24
27
|
import das.block_stratify
|
|
25
28
|
|
|
29
|
+
|
|
26
30
|
import xarray_behave
|
|
27
31
|
|
|
28
32
|
package_dir = xarray_behave.__path__[0]
|
|
29
|
-
logger = logging.getLogger(__name__)
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
def data_loader_wav(filename: str, fs: Optional[float] = None, duration: Optional[float] = None):
|
|
@@ -32,7 +32,7 @@ import yaml
|
|
|
32
32
|
from typing import Any, Dict, List, Optional, Union, Text
|
|
33
33
|
|
|
34
34
|
try:
|
|
35
|
-
import
|
|
35
|
+
import PySide6 # this will force pyqtgraph to use PySide instead of PyQt4/5
|
|
36
36
|
except ImportError:
|
|
37
37
|
pass
|
|
38
38
|
from qtpy import QtWidgets, QtCore, QtGui
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_imports():
|
|
5
|
+
import xarray_behave as xb
|
|
6
|
+
import xarray_behave.event_utils
|
|
7
|
+
import xarray_behave.metrics
|
|
8
|
+
import xarray_behave.loaders
|
|
9
|
+
import xarray_behave.annot
|
|
10
|
+
|
|
11
|
+
from xarray_behave.io import annotations, annotations_manual, audio, balltracks, movieparams, poses, tracks
|
|
12
|
+
from xarray_behave.gui import app, formbuilder, table, utils, views
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
def test_monotonize():
|
|
2
|
+
import numpy as np
|
|
3
|
+
from xarray_behave.io.samplestamps.utils import monotonize, interpolator, ismonotonous
|
|
4
|
+
|
|
5
|
+
inc_strict = np.array([0, 1, 2, 3])
|
|
6
|
+
inc_nonstrict = np.array([0, 1, 2, 2])
|
|
7
|
+
dec_strict = inc_strict[::-1]
|
|
8
|
+
dec_nonstrict = inc_nonstrict[::-1]
|
|
9
|
+
assert ismonotonous(inc_strict, direction="increasing", strict=True) == True
|
|
10
|
+
assert ismonotonous(inc_strict, direction="increasing", strict=False) == True
|
|
11
|
+
assert ismonotonous(inc_nonstrict, direction="increasing", strict=True) == False
|
|
12
|
+
assert ismonotonous(inc_nonstrict, direction="decreasing", strict=False) == False
|
|
13
|
+
assert ismonotonous(dec_strict, direction="decreasing", strict=True) == True
|
|
14
|
+
assert ismonotonous(dec_nonstrict, direction="decreasing", strict=True) == False
|
|
15
|
+
assert ismonotonous(np.array([1]), direction="increasing", strict=True) == True
|
|
16
|
+
assert ismonotonous(np.array([1]), direction="increasing", strict=False) == True
|
|
17
|
+
|
|
18
|
+
x = np.array([0, 1, 2, 2, 1])
|
|
19
|
+
print(f"montonize {x}")
|
|
20
|
+
print(f" strict, inc: {monotonize(x)}")
|
|
21
|
+
assert np.all(monotonize(x) == [0, 1, 2])
|
|
22
|
+
print(f" strict, dec: {monotonize(x, direction='decreasing')}")
|
|
23
|
+
assert np.all(monotonize(x, direction="decreasing") == [0])
|
|
24
|
+
print(f" nonstrict, in: {monotonize(x, strict=False)}")
|
|
25
|
+
assert np.all(monotonize(x, strict=False) == [0, 1, 2, 2])
|
|
26
|
+
|
|
27
|
+
x = np.array([2, 1, 0, 0, 1])
|
|
28
|
+
print(f"montonize {x}")
|
|
29
|
+
print(f" strict, inc: {monotonize(x)}")
|
|
30
|
+
assert np.all(monotonize(x) == [2])
|
|
31
|
+
print(f" strict, dec: {monotonize(x, direction='decreasing')}")
|
|
32
|
+
assert np.all(monotonize(x, direction="decreasing") == [2, 1, 0])
|
|
33
|
+
print(f" nonstrict, dec: {monotonize(x, strict=False, direction='decreasing')}")
|
|
34
|
+
assert np.all(monotonize(x, strict=False, direction="decreasing") == [2, 1, 0, 0])
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def test_imports():
|
|
5
|
-
import xarray_behave as xb
|
|
6
|
-
import xarray_behave.event_utils
|
|
7
|
-
import xarray_behave.metrics
|
|
8
|
-
import xarray_behave.loaders
|
|
9
|
-
import xarray_behave.annot
|
|
10
|
-
|
|
11
|
-
from xarray_behave.io import (annotations, annotations_manual, audio,
|
|
12
|
-
balltracks, movieparams, poses, tracks)
|
|
13
|
-
from xarray_behave.gui import (app, das, formbuilder, table,
|
|
14
|
-
utils, views)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xarray-behave-0.35.8 → xarray_behave-0.37.0}/doc/demo_behavioral_features_large_group.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/envelope_computation.yaml
RENAMED
|
File without changes
|
{xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/gui/forms/export_for_das.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xarray-behave-0.35.8 → xarray_behave-0.37.0}/src/xarray_behave/io/samplestamps/samplestamps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|