xarray-behave 0.35.8__tar.gz → 0.36.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.
Files changed (60) hide show
  1. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/PKG-INFO +2 -2
  2. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/pyproject.toml +0 -3
  3. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/__init__.py +1 -1
  4. xarray_behave-0.36.0/tests/test_sampstamps.py +34 -0
  5. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/.github/workflows/publish.yaml +0 -0
  6. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/.gitignore +0 -0
  7. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/LICENSE +0 -0
  8. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/README.md +0 -0
  9. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/build_env.yml +0 -0
  10. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/conda/xarray-behave/bld.bat +0 -0
  11. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/conda/xarray-behave/build.sh +0 -0
  12. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/conda/xarray-behave/meta.yaml +0 -0
  13. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/condarc.yml +0 -0
  14. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/doc/demo.ipynb +0 -0
  15. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/doc/demo_behavioral_features.ipynb +0 -0
  16. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/doc/demo_behavioral_features_large_group.ipynb +0 -0
  17. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/doc/ncb.mplstyle +0 -0
  18. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/setup.py +0 -0
  19. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/annot.py +0 -0
  20. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/event_utils.py +0 -0
  21. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/__init__.py +0 -0
  22. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/app.py +0 -0
  23. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/audio_player.py +0 -0
  24. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/das.py +0 -0
  25. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/formbuilder.py +0 -0
  26. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/das_make.yaml +0 -0
  27. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/das_predict.yaml +0 -0
  28. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/das_train.yaml +0 -0
  29. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/envelope_computation.yaml +0 -0
  30. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/export_for_das.yaml +0 -0
  31. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/from_dir.yaml +0 -0
  32. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/from_file.yaml +0 -0
  33. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/from_zarr.yaml +0 -0
  34. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/forms/spec_freq.yaml +0 -0
  35. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/icon.png +0 -0
  36. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/table.py +0 -0
  37. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/utils.py +0 -0
  38. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/view_dialog.py +0 -0
  39. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/views.py +0 -0
  40. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/gui/widgets.py +0 -0
  41. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/__init__.py +0 -0
  42. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/annotations.py +0 -0
  43. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/annotations_manual.py +0 -0
  44. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/audio.py +0 -0
  45. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/balltracks.py +0 -0
  46. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/movieparams.py +0 -0
  47. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/poses.py +0 -0
  48. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/samplestamps/__init__.py +0 -0
  49. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/samplestamps/samplestamps.py +0 -0
  50. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/samplestamps/utils.py +0 -0
  51. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/timestamps.py +0 -0
  52. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/io/tracks.py +0 -0
  53. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/loaders.py +0 -0
  54. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/metrics.py +0 -0
  55. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/src/xarray_behave/xarray_behave.py +0 -0
  56. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/tests/test_annot.py +0 -0
  57. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/tests/test_assemble.py +0 -0
  58. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/tests/test_assemble_metrics.py +0 -0
  59. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/tests/test_imports.py +0 -0
  60. {xarray-behave-0.35.8 → xarray_behave-0.36.0}/tests/test_io.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: xarray-behave
3
- Version: 0.35.8
3
+ Version: 0.36.0
4
4
  Summary: xarray tools for behavioral data.
5
5
  Author-email: Jan Clemens <clemensjan@googlemail.com>
6
6
  Requires-Python: >3.6
@@ -19,9 +19,6 @@ gui = ['pyside6', 'pyqtgraph>0.12.2', 'pyvideoreader', 'qtpy', 'superqt',
19
19
  'sounddevice', 'scikit-image', 'pyyaml', 'defopt', 'colorcet',
20
20
  'peakutils']
21
21
 
22
- [project.scripts]
23
- xb = "xarray_behave.gui.app:cli"
24
-
25
22
  [project.urls]
26
23
  source = "https://github.com/janclemenslab/xarray-behave"
27
24
  documentation = "https://janclemenslab.org/das/"
@@ -1,6 +1,6 @@
1
1
  """xarray tools for behavioral data."""
2
2
 
3
- __version__ = "0.35.8"
3
+ __version__ = "0.36.0"
4
4
 
5
5
  from .xarray_behave import assemble, assemble_metrics, load, save
6
6
  import os
@@ -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])
File without changes
File without changes
File without changes