scikit-diveMove 0.3.2.post2__tar.gz → 0.3.3__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.
- {scikit-diveMove-0.3.2.post2/scikit_diveMove.egg-info → scikit-diveMove-0.3.3}/PKG-INFO +1 -1
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3/scikit_diveMove.egg-info}/PKG-INFO +1 -1
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/__init__.py +1 -1
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/helpers.py +3 -4
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/imu2body.py +5 -5
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/imucalibrate.py +2 -2
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tdr.py +3 -2
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tdrphases.py +6 -3
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_BoutsMLE.py +6 -6
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_imucalibrate.py +18 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/LICENSE +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/MANIFEST.in +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/README.rst +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/pyproject.toml +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/SOURCES.txt +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/dependency_links.txt +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/requires.txt +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/top_level.txt +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/setup.cfg +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/__main__.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/bouts/__init__.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/bouts/bouts.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/bouts/boutsmle.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/bouts/boutsnls.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/calibconfig.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/calibspeed.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/config_examples/ag_mk7_2002_022_config.json +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/core.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/__init__.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/allan.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/ellipsoid.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/imu.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/imutools/vector.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/metadata.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/plotting.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tdrsource.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/__init__.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/ag_mk7_2002_022.nc +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/cats_temperature_calib.nc +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/gertrude/gert_imu_frame.nc +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/gertrude/gert_long_srfc.csv +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/gertrude/magnt_accel_calib.nc +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/samsung_galaxy_s5.nc +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/get_sample_data.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_BoutsNLS.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_TDR.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_TDRPhases.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_TDRSource.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_ZOC.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_calibrate.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_imu2body.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_imu_utils.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/test_vector.py +0 -0
- {scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/zoc.py +0 -0
|
@@ -177,10 +177,9 @@ def _one_dive_stats(x, interval, has_speed=False):
|
|
|
177
177
|
onames = onames_nospeed
|
|
178
178
|
|
|
179
179
|
res_df = pd.DataFrame(res, columns=onames)
|
|
180
|
-
for tcol in
|
|
180
|
+
for tcol in onames[:3]:
|
|
181
181
|
# This is per POSIXct convention in R
|
|
182
|
-
res_df
|
|
183
|
-
unit="s")
|
|
182
|
+
res_df[tcol] = pd.to_datetime(res_df[tcol], unit="s")
|
|
184
183
|
|
|
185
184
|
return res_df
|
|
186
185
|
|
|
@@ -252,7 +251,7 @@ def rle_key(x):
|
|
|
252
251
|
2020-01-01 00:02:30+00:00 6
|
|
253
252
|
2020-01-01 00:02:40+00:00 6
|
|
254
253
|
2020-01-01 00:02:50+00:00 6
|
|
255
|
-
Freq:
|
|
254
|
+
Freq: 10s, dtype: int64
|
|
256
255
|
|
|
257
256
|
"""
|
|
258
257
|
xout = x.ne(x.shift()).cumsum()
|
|
@@ -411,14 +411,14 @@ class IMU2Body(IMUBase):
|
|
|
411
411
|
... savgol_parms=(99, 2))
|
|
412
412
|
>>> print(imu) # doctest: +ELLIPSIS
|
|
413
413
|
IMU -- Class IMU2Body object
|
|
414
|
-
Source File
|
|
415
|
-
IMU: <xarray.Dataset>
|
|
414
|
+
Source File ...
|
|
415
|
+
IMU: <xarray.Dataset> ...
|
|
416
416
|
Dimensions: ...
|
|
417
417
|
Coordinates:
|
|
418
418
|
* timestamp (timestamp) datetime64[ns] ...
|
|
419
|
-
* accelerometer (accelerometer)
|
|
420
|
-
* magnetometer (magnetometer)
|
|
421
|
-
* gyroscope (gyroscope)
|
|
419
|
+
* accelerometer (accelerometer) <U1 12B 'x' 'y' 'z'
|
|
420
|
+
* magnetometer (magnetometer) <U1 12B 'x' 'y' 'z'
|
|
421
|
+
* gyroscope (gyroscope) <U1 12B 'x' 'y' 'z'
|
|
422
422
|
Data variables:
|
|
423
423
|
depth (timestamp) float64 ...
|
|
424
424
|
acceleration (timestamp, accelerometer) float64 ...
|
|
@@ -91,10 +91,10 @@ class IMUcalibrate(IMUBase):
|
|
|
91
91
|
>>> print(imucal) # doctest: +ELLIPSIS
|
|
92
92
|
IMU -- Class IMUcalibrate object
|
|
93
93
|
Source File None
|
|
94
|
-
IMU: <xarray.Dataset>
|
|
94
|
+
IMU: <xarray.Dataset> ...
|
|
95
95
|
Dimensions: (timestamp_utc: 268081, axis: 3)
|
|
96
96
|
Coordinates:
|
|
97
|
-
* axis (axis)
|
|
97
|
+
* axis (axis) <U1 12B 'x' 'y' 'z'
|
|
98
98
|
* timestamp_utc (timestamp_utc) datetime64[ns] ...
|
|
99
99
|
Data variables:
|
|
100
100
|
acceleration (timestamp_utc, axis) float64 ...
|
|
@@ -253,7 +253,8 @@ class TDR(TDRPhases):
|
|
|
253
253
|
|
|
254
254
|
postdive_dur = (postdive_ids.reset_index()
|
|
255
255
|
.groupby("postdive_id")
|
|
256
|
-
.apply(lambda x: x.iloc[-1] - x.iloc[0]
|
|
256
|
+
.apply(lambda x: x.iloc[-1] - x.iloc[0],
|
|
257
|
+
include_groups=False))
|
|
257
258
|
|
|
258
259
|
# Enforce UTC, as otherwise rpy2 uses our locale in the output of
|
|
259
260
|
# OneDiveStats
|
|
@@ -783,7 +784,7 @@ class TDR(TDRPhases):
|
|
|
783
784
|
>>> tdrX.detect_dive_phases("unimodal", descent_crit_q=0.01,
|
|
784
785
|
... ascent_crit_q=0, knot_factor=20)
|
|
785
786
|
>>> tdrX.extract_dives(diveNo=20) # doctest: +ELLIPSIS
|
|
786
|
-
<xarray.Dataset>
|
|
787
|
+
<xarray.Dataset> ...
|
|
787
788
|
Dimensions: ...
|
|
788
789
|
|
|
789
790
|
"""
|
|
@@ -442,7 +442,8 @@ class TDRPhases(ZOC):
|
|
|
442
442
|
spl_list.append(spl_dict)
|
|
443
443
|
# Spline derivatives
|
|
444
444
|
spl_der = res.pop("spline_deriv")
|
|
445
|
-
spl_der_idx = pd.TimedeltaIndex(
|
|
445
|
+
spl_der_idx = pd.TimedeltaIndex(
|
|
446
|
+
pd.to_timedelta(spl_der[:, 0], unit="s"))
|
|
446
447
|
spl_der = pd.DataFrame({'y': spl_der[:, 1]},
|
|
447
448
|
index=spl_der_idx)
|
|
448
449
|
spl_der_list.append(spl_der)
|
|
@@ -568,10 +569,12 @@ class TDRPhases(ZOC):
|
|
|
568
569
|
"g", "a", "b", "variter"]
|
|
569
570
|
idata = self.get_dives_details("splines")[diveNo]
|
|
570
571
|
if name == "data":
|
|
571
|
-
x = pd.TimedeltaIndex(
|
|
572
|
+
x = pd.TimedeltaIndex(
|
|
573
|
+
pd.to_timedelta(np.array(idata[name][0]), unit="s"))
|
|
572
574
|
odata = pd.Series(np.array(idata[name][1]), index=x)
|
|
573
575
|
elif name == "xy":
|
|
574
|
-
x = pd.TimedeltaIndex(
|
|
576
|
+
x = pd.TimedeltaIndex(
|
|
577
|
+
pd.to_timedelta(np.array(idata["x"]), unit="s"))
|
|
575
578
|
odata = pd.Series(np.array(idata["y"]), index=x)
|
|
576
579
|
elif name in scalars:
|
|
577
580
|
odata = float(idata[name][0])
|
|
@@ -197,12 +197,12 @@ class TestBoutsMLE(ut.TestCase):
|
|
|
197
197
|
_ = xbouts.plot_fit(fit2, ax=ax)
|
|
198
198
|
lines = ax.get_lines()
|
|
199
199
|
self.assertEqual(len(lines), 2)
|
|
200
|
-
plt.close()
|
|
200
|
+
plt.close("all")
|
|
201
201
|
# Without Axes
|
|
202
202
|
_ = xbouts.plot_fit(fit2)
|
|
203
203
|
lines = ax.get_lines()
|
|
204
204
|
self.assertEqual(len(lines), 2)
|
|
205
|
-
plt.close()
|
|
205
|
+
plt.close("all")
|
|
206
206
|
|
|
207
207
|
# Three process
|
|
208
208
|
# -------------
|
|
@@ -219,7 +219,7 @@ class TestBoutsMLE(ut.TestCase):
|
|
|
219
219
|
_ = xbouts.plot_fit(fit2, ax=ax)
|
|
220
220
|
lines = ax.get_lines()
|
|
221
221
|
self.assertEqual(len(lines), 2)
|
|
222
|
-
plt.close()
|
|
222
|
+
plt.close("all")
|
|
223
223
|
|
|
224
224
|
def test_plot_ecdf(self):
|
|
225
225
|
# Two process
|
|
@@ -237,12 +237,12 @@ class TestBoutsMLE(ut.TestCase):
|
|
|
237
237
|
_ = xbouts.plot_ecdf(fit2, ax=ax)
|
|
238
238
|
lines = ax.get_lines()
|
|
239
239
|
self.assertEqual(len(lines), 2)
|
|
240
|
-
plt.close()
|
|
240
|
+
plt.close("all")
|
|
241
241
|
# Without Axes
|
|
242
242
|
_ = xbouts.plot_ecdf(fit2)
|
|
243
243
|
lines = ax.get_lines()
|
|
244
244
|
self.assertEqual(len(lines), 2)
|
|
245
|
-
plt.close()
|
|
245
|
+
plt.close("all")
|
|
246
246
|
|
|
247
247
|
# Three process
|
|
248
248
|
# -------------
|
|
@@ -259,7 +259,7 @@ class TestBoutsMLE(ut.TestCase):
|
|
|
259
259
|
_ = xbouts.plot_ecdf(fit2, ax=ax)
|
|
260
260
|
lines = ax.get_lines()
|
|
261
261
|
self.assertEqual(len(lines), 2)
|
|
262
|
-
plt.close()
|
|
262
|
+
plt.close("all")
|
|
263
263
|
|
|
264
264
|
def test_compare2r(self):
|
|
265
265
|
# Two process
|
|
@@ -85,6 +85,24 @@ class TestIMUcalibrate(ut.TestCase):
|
|
|
85
85
|
len(mag_cal),
|
|
86
86
|
len(depth_cal)]),
|
|
87
87
|
np.array([3, 3, 3, 3]))
|
|
88
|
+
# Repeat with temperature break scenario
|
|
89
|
+
T_brk = 10.0
|
|
90
|
+
acc_cal = imucal.build_tmodels(_ACCEL_NAME, use_axis_order=True,
|
|
91
|
+
win_len=win_len, T_brk=T_brk)
|
|
92
|
+
gyro_cal = imucal.build_tmodels(_OMEGA_NAME,
|
|
93
|
+
use_axis_order=False,
|
|
94
|
+
win_len=win_len, T_brk=T_brk)
|
|
95
|
+
mag_cal = imucal.build_tmodels(_MAGNT_NAME,
|
|
96
|
+
use_axis_order=True,
|
|
97
|
+
win_len=win_len, T_brk=T_brk)
|
|
98
|
+
depth_cal = imucal.build_tmodels("depth",
|
|
99
|
+
use_axis_order=False,
|
|
100
|
+
win_len=win_len, T_brk=T_brk)
|
|
101
|
+
npt.assert_array_equal(np.array([len(acc_cal),
|
|
102
|
+
len(gyro_cal),
|
|
103
|
+
len(mag_cal),
|
|
104
|
+
len(depth_cal)]),
|
|
105
|
+
np.array([3, 3, 3, 3]))
|
|
88
106
|
|
|
89
107
|
def test_plot_var_model(self):
|
|
90
108
|
imucal = self.imucalibrated
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/scikit_diveMove.egg-info/top_level.txt
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
|
|
File without changes
|
|
File without changes
|
{scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/ag_mk7_2002_022.nc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit-diveMove-0.3.2.post2 → scikit-diveMove-0.3.3}/skdiveMove/tests/data/samsung_galaxy_s5.nc
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
|