scikit-diveMove 0.4.0__tar.gz → 1.0.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 (56) hide show
  1. scikit_divemove-1.0.0/PKG-INFO +28 -0
  2. scikit_divemove-1.0.0/pyproject.toml +85 -0
  3. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/__init__.py +1 -1
  4. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/bouts/bouts.py +1 -0
  5. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/calibspeed.py +1 -4
  6. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/plotting.py +2 -2
  7. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tdr.py +1 -1
  8. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/get_sample_data.py +0 -16
  9. scikit_divemove-0.4.0/MANIFEST.in +0 -2
  10. scikit_divemove-0.4.0/PKG-INFO +0 -867
  11. scikit_divemove-0.4.0/README.rst +0 -168
  12. scikit_divemove-0.4.0/pyproject.toml +0 -51
  13. scikit_divemove-0.4.0/scikit_diveMove.egg-info/PKG-INFO +0 -867
  14. scikit_divemove-0.4.0/scikit_diveMove.egg-info/SOURCES.txt +0 -52
  15. scikit_divemove-0.4.0/scikit_diveMove.egg-info/dependency_links.txt +0 -1
  16. scikit_divemove-0.4.0/scikit_diveMove.egg-info/requires.txt +0 -22
  17. scikit_divemove-0.4.0/scikit_diveMove.egg-info/top_level.txt +0 -1
  18. scikit_divemove-0.4.0/setup.cfg +0 -4
  19. scikit_divemove-0.4.0/skdiveMove/imutools/__init__.py +0 -94
  20. scikit_divemove-0.4.0/skdiveMove/imutools/allan.py +0 -95
  21. scikit_divemove-0.4.0/skdiveMove/imutools/ellipsoid.py +0 -112
  22. scikit_divemove-0.4.0/skdiveMove/imutools/imu.py +0 -470
  23. scikit_divemove-0.4.0/skdiveMove/imutools/imu2body.py +0 -1244
  24. scikit_divemove-0.4.0/skdiveMove/imutools/imucalibrate.py +0 -1021
  25. scikit_divemove-0.4.0/skdiveMove/imutools/vector.py +0 -103
  26. scikit_divemove-0.4.0/skdiveMove/tests/data/cats_temperature_calib.nc +0 -0
  27. scikit_divemove-0.4.0/skdiveMove/tests/data/gertrude/gert_imu_frame.nc +0 -0
  28. scikit_divemove-0.4.0/skdiveMove/tests/data/gertrude/gert_long_srfc.csv +0 -69
  29. scikit_divemove-0.4.0/skdiveMove/tests/data/gertrude/magnt_accel_calib.nc +0 -0
  30. scikit_divemove-0.4.0/skdiveMove/tests/data/samsung_galaxy_s5.nc +0 -0
  31. scikit_divemove-0.4.0/skdiveMove/tests/test_imu2body.py +0 -263
  32. scikit_divemove-0.4.0/skdiveMove/tests/test_imu_utils.py +0 -137
  33. scikit_divemove-0.4.0/skdiveMove/tests/test_imucalibrate.py +0 -199
  34. scikit_divemove-0.4.0/skdiveMove/tests/test_vector.py +0 -38
  35. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/LICENSE +0 -0
  36. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/__main__.py +0 -0
  37. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/bouts/__init__.py +0 -0
  38. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/bouts/boutsmle.py +0 -0
  39. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/bouts/boutsnls.py +0 -0
  40. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/calibconfig.py +0 -0
  41. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/config_examples/ag_mk7_2002_022_config.json +0 -0
  42. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/core.py +0 -0
  43. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/helpers.py +0 -0
  44. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/metadata.py +0 -0
  45. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tdrphases.py +0 -0
  46. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tdrsource.py +0 -0
  47. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/__init__.py +0 -0
  48. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/data/ag_mk7_2002_022.nc +0 -0
  49. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_BoutsMLE.py +0 -0
  50. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_BoutsNLS.py +0 -0
  51. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_TDR.py +0 -0
  52. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_TDRPhases.py +0 -0
  53. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_TDRSource.py +0 -0
  54. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_ZOC.py +0 -0
  55. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/tests/test_calibrate.py +0 -0
  56. {scikit_divemove-0.4.0 → scikit_divemove-1.0.0}/skdiveMove/zoc.py +0 -0
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.4
2
+ Name: scikit-diveMove
3
+ Version: 1.0.0
4
+ Summary: Python interface to R package diveMove
5
+ License: AGPL-3.0-or-later
6
+ License-File: LICENSE
7
+ Keywords: animal behaviour,biology,behavioural ecology,diving,diving behaviour
8
+ Author: Sebastian Luque
9
+ Requires-Python: >=3.11
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Classifier: Topic :: Scientific/Engineering :: Instrument Drivers
17
+ Requires-Dist: bottleneck (>=1.6.0,<2.0.0)
18
+ Requires-Dist: docutils (>=0.22.4,<0.23.0)
19
+ Requires-Dist: matplotlib (>=3.10.8,<4.0.0)
20
+ Requires-Dist: netcdf4 (>=1.7.4,<2.0.0)
21
+ Requires-Dist: numpy (>=2.4.3,<3.0.0)
22
+ Requires-Dist: pandas (>=3.0.1,<4.0.0)
23
+ Requires-Dist: rpy2 (>=3.6.5,<4.0.0)
24
+ Requires-Dist: scipy (>=1.17.1,<2.0.0)
25
+ Requires-Dist: statsmodels (>=0.14.6,<0.15.0)
26
+ Requires-Dist: xarray (>=2026.2.0,<2027.0.0)
27
+ Project-URL: Documentation, https://spluque.github.io/scikit-diveMove
28
+ Project-URL: Repository, https://github.com/spluque/scikit-diveMove
@@ -0,0 +1,85 @@
1
+ [project]
2
+ name = "scikit-diveMove"
3
+ dynamic = []
4
+ description = "Python interface to R package diveMove"
5
+ authors = [
6
+ {name = "Sebastian Luque"}
7
+ ]
8
+ license = {text = "AGPL-3.0-or-later"}
9
+ requires-python = ">=3.11"
10
+ dependencies = [
11
+ "bottleneck (>=1.6.0,<2.0.0)",
12
+ "docutils (>=0.22.4,<0.23.0)",
13
+ "matplotlib (>=3.10.8,<4.0.0)",
14
+ "netcdf4 (>=1.7.4,<2.0.0)",
15
+ "numpy (>=2.4.3,<3.0.0)",
16
+ "pandas (>=3.0.1,<4.0.0)",
17
+ "rpy2 (>=3.6.5,<4.0.0)",
18
+ "scipy (>=1.17.1,<2.0.0)",
19
+ "statsmodels (>=0.14.6,<0.15.0)",
20
+ "xarray (>=2026.2.0,<2027.0.0)"
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 4 - Beta",
24
+ "Programming Language :: Python :: 3",
25
+ "Intended Audience :: Developers",
26
+ "Intended Audience :: Science/Research",
27
+ "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
28
+ "Topic :: Scientific/Engineering",
29
+ "Topic :: Scientific/Engineering :: Instrument Drivers"
30
+ ]
31
+ keywords = ["animal behaviour",
32
+ "biology",
33
+ "behavioural ecology",
34
+ "diving",
35
+ "diving behaviour"
36
+ ]
37
+ version = "1.0.0"
38
+
39
+ [project.urls]
40
+ repository = "https://github.com/spluque/scikit-diveMove"
41
+ documentation = "https://spluque.github.io/scikit-diveMove"
42
+
43
+ [dependency-groups]
44
+ docs = [
45
+ "ipykernel (>=7.2.0,<8.0.0)",
46
+ "myst-nb (>=1.4.0,<2.0.0)",
47
+ "pydata-sphinx-theme (>=0.16.1,<0.17.0)"
48
+ ]
49
+ test = [
50
+ "pytest (>=9.0.2,<10.0.0)",
51
+ "coverage (>=7.13.5,<8.0.0)"
52
+ ]
53
+
54
+ [tool.poetry]
55
+ packages = [ {include = "skdiveMove"} ]
56
+ include = [
57
+ "skdiveMove/tests/data/*.db",
58
+ "skdiveMove/tests/data/*.txt",
59
+ "skdiveMove/tests/data/*.csv",
60
+ "skdiveMove/tests/data/*.nc",
61
+ "skdiveMove/config_examples/*.json"
62
+ ]
63
+
64
+ [tool.poetry.group.docs]
65
+ optional = true
66
+
67
+ [tool.poetry.group.test]
68
+ optional = true
69
+
70
+ [tool.poetry.requires-plugins]
71
+ poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
72
+
73
+ [tool.poetry-dynamic-versioning]
74
+ enable = false
75
+
76
+ [tool.poetry-dynamic-versioning.from-file]
77
+ source = "skdiveMove/__init__.py"
78
+ pattern = "^__version__\\s*=\\s*['\"](?P<version>.+?)['\"]"
79
+
80
+ [build-system]
81
+ requires = [
82
+ "poetry-core>=2.0.0,<3.0.0",
83
+ "poetry-dynamic-versioning>=1.0.0,<2.0.0"
84
+ ]
85
+ build-backend = "poetry_dynamic_versioning.backend"
@@ -88,5 +88,5 @@ from skdiveMove.calibconfig import dump_config_template
88
88
 
89
89
  __author__ = "Sebastian Luque <spluque@gmail.com>"
90
90
  __license__ = "AGPLv3"
91
- __version__ = "0.4.0"
91
+ __version__ = "1.0.0"
92
92
  __all__ = ["TDR", "calibrate", "dump_config_template"]
@@ -189,6 +189,7 @@ def _plot_bec(bec_x, bec_y, ax, xytext, horizontalalignment="left"):
189
189
  fmtstr = "bec_{0} = {1:.3f}"
190
190
  if bec_x.size == 1:
191
191
  bec_x = bec_x.item()
192
+ bec_y = bec_y.item()
192
193
  ax.annotate(fmtstr.format(0, bec_x),
193
194
  (bec_x, bec_y), xytext=xytext,
194
195
  textcoords="offset points",
@@ -18,8 +18,7 @@ logger = logging.getLogger(__name__)
18
18
  logger.addHandler(logging.NullHandler())
19
19
 
20
20
 
21
- def calibrate_speed(x, tau, contour_level, z=0, bad=[0, 0],
22
- plot=True, ax=None):
21
+ def calibrate_speed(x, tau, contour_level, plot=True, ax=None):
23
22
  """Calibration based on kernel density estimation
24
23
 
25
24
  Parameters
@@ -28,8 +27,6 @@ def calibrate_speed(x, tau, contour_level, z=0, bad=[0, 0],
28
27
  DataFrame with depth rate and speed
29
28
  tau : float
30
29
  contour_level : float
31
- z : float, optional
32
- bad : array_like, optional
33
30
  plot : bool, optional
34
31
  Whether to plot calibration results.
35
32
  ax : matplotlib.Axes, optional
@@ -33,8 +33,8 @@ def _night(times, sunrise_time, sunset_time):
33
33
  sunsets = pd.date_range(start=tmin + sunset_time,
34
34
  end=tmax + sunset_time,
35
35
  freq="1D")
36
- tmin1 = (times.min() + pd.Timedelta(1, unit="d")).strftime("%Y-%m-%d ")
37
- tmax1 = (times.max() + pd.Timedelta(1, unit="d")).strftime("%Y-%m-%d ")
36
+ tmin1 = (times.min() + pd.Timedelta(1, unit="D")).strftime("%Y-%m-%d ")
37
+ tmax1 = (times.max() + pd.Timedelta(1, unit="D")).strftime("%Y-%m-%d ")
38
38
  sunrises = pd.date_range(start=tmin1 + sunrise_time,
39
39
  end=tmax1 + sunrise_time,
40
40
  freq="1D")
@@ -150,7 +150,7 @@ class TDR(TDRPhases):
150
150
  curspeed), axis=1)
151
151
  qfit, ax = speedcal.calibrate_speed(kde_data, tau=tau,
152
152
  contour_level=contour_level,
153
- z=z, bad=bad, **kwargs)
153
+ **kwargs)
154
154
  self.speed_calib_fit = qfit
155
155
  logger.info("Finished calibrating speed")
156
156
 
@@ -7,7 +7,6 @@ from skdiveMove.tdr import TDR
7
7
  from skdiveMove.tdrsource import TDRSource
8
8
  from skdiveMove.tdrphases import TDRPhases
9
9
  from skdiveMove.zoc import ZOC
10
- from skdiveMove.imutools import IMU2Body
11
10
 
12
11
 
13
12
  def diveMove2skd(oclass="TDR", **kwargs):
@@ -44,18 +43,3 @@ def diveMove2skd(oclass="TDR", **kwargs):
44
43
  .format(oclass)))
45
44
 
46
45
  return tdrX
47
-
48
-
49
- def _nc2imu2body():
50
- """Get example data into a IMU2Body instance
51
-
52
- Convenience function for tests and examples.
53
-
54
- """
55
- ncfname = "gert_imu_frame.nc"
56
- icdf = (rsrc.files("skdiveMove") / "tests" /
57
- "data" / "gertrude" / ncfname)
58
- icsv = (rsrc.files("skdiveMove") / "tests" /
59
- "data" / "gertrude" / "gert_long_srfc.csv")
60
-
61
- return IMU2Body.from_csv_nc(icsv, icdf, imu_filename=ncfname)
@@ -1,2 +0,0 @@
1
- recursive-include skdiveMove/tests/data *.db *.txt *.csv *.nc
2
- recursive-include skdiveMove/config_examples *.json