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tb*hzU9U|+*$7GSpmS9y=>X?mCM&IT?b-;g>Vl#a5Z__^ojqu
zboL6cGGXR_&o8}hR=}L@y~$s|xH;Uc!0aP8`Rnxldx;OGH@>kH%4_`kp~T>F#U*Y3
z6R*6Q`G4Mm@IOm@2EMV%%*p
zVB8w9(|dE|EQ@tQ@6Go9`xcVJ;ns7%{^`A;csz@2Zy<-+2F2#{h*^~FEEnue*leQ>Nx-a
literal 0
HcmV?d00001
diff --git a/tests/smoke/test_orchestrator_smoke.py b/tests/smoke/test_orchestrator_smoke.py
index 4904e871..6638574f 100644
--- a/tests/smoke/test_orchestrator_smoke.py
+++ b/tests/smoke/test_orchestrator_smoke.py
@@ -47,3 +47,21 @@ def test_orchestrator_different_epoch(
assert isinstance(results.nonwear_epoch, models.Measurement)
assert isinstance(results.sleep_windows_epoch, models.Measurement)
assert isinstance(results.physical_activity_levels, models.Measurement)
+
+
+def test_orchestrator_idle_sleep_mode_run(
+ tmp_path: pathlib.Path,
+ sample_data_gt3x_idle_sleep_mode: pathlib.Path,
+) -> None:
+ """Idle sleep mode path for orchestrator."""
+ results = orchestrator.run(
+ input=sample_data_gt3x_idle_sleep_mode, output=tmp_path / "good_file.csv"
+ )
+
+ assert (tmp_path / "good_file.csv").exists()
+ assert isinstance(results, models.OrchestratorResults)
+ assert isinstance(results.enmo, models.Measurement)
+ assert isinstance(results.anglez, models.Measurement)
+ assert isinstance(results.nonwear_epoch, models.Measurement)
+ assert isinstance(results.sleep_windows_epoch, models.Measurement)
+ assert isinstance(results.physical_activity_levels, models.Measurement)
diff --git a/tests/unit/test_idle_sleep_mode.py b/tests/unit/test_idle_sleep_mode.py
new file mode 100644
index 00000000..69a0ec39
--- /dev/null
+++ b/tests/unit/test_idle_sleep_mode.py
@@ -0,0 +1,78 @@
+"""Testing the idle_sleep_mode functions."""
+
+from datetime import datetime, timedelta
+
+import numpy as np
+import polars as pl
+import pytest
+
+from wristpy.core import models
+from wristpy.processing import idle_sleep_mode_imputation
+
+
+@pytest.mark.parametrize(
+ "sampling_rate, effective_sampling_rate", [(30, 25), (20, 20), (1, 1)]
+)
+def test_idle_sleep_mode_resampling(
+ sampling_rate: int, effective_sampling_rate: int
+) -> None:
+ """Test the idle_sleep_mode function."""
+ num_samples = 10000
+ dummy_date = datetime(2024, 5, 2)
+ dummy_datetime_list = [
+ dummy_date + timedelta(seconds=i / sampling_rate) for i in range(num_samples)
+ ]
+ test_time = pl.Series("time", dummy_datetime_list, dtype=pl.Datetime("ns"))
+ acceleration = models.Measurement(
+ measurements=np.ones((num_samples, 3)), time=test_time
+ )
+
+ filled_acceleration = idle_sleep_mode_imputation.impute_idle_sleep_mode_gaps(
+ acceleration
+ )
+
+ assert (
+ np.mean(
+ filled_acceleration.time.diff()
+ .drop_nulls()
+ .dt.total_nanoseconds()
+ .to_numpy()
+ .astype(dtype=float)
+ )
+ == 1e9 / effective_sampling_rate
+ )
+
+
+def test_idle_sleep_mode_gap_fill() -> None:
+ """Test the idle_sleep_mode gap fill functionality."""
+ num_samples = 10000
+ dummy_date = datetime(2024, 5, 2)
+ dummy_datetime_list = [
+ dummy_date + timedelta(seconds=i) for i in range(num_samples // 2)
+ ]
+ time_gap = dummy_date + timedelta(seconds=(1000))
+ dummy_datetime_list += [
+ time_gap + timedelta(seconds=i) for i in range(num_samples // 2, num_samples)
+ ]
+ test_time = pl.Series("time", dummy_datetime_list, dtype=pl.Datetime("ns"))
+ acceleration = models.Measurement(
+ measurements=np.ones((num_samples, 3)), time=test_time
+ )
+ expected_acceleration = (0, 0, -1)
+
+ filled_acceleration = idle_sleep_mode_imputation.impute_idle_sleep_mode_gaps(
+ acceleration
+ )
+
+ assert len(filled_acceleration.measurements) > len(acceleration.measurements)
+ assert (
+ np.mean(
+ filled_acceleration.time.diff()
+ .drop_nulls()
+ .dt.total_nanoseconds()
+ .to_numpy()
+ .astype(dtype=float)
+ )
+ == 1e9
+ )
+ assert np.all(filled_acceleration.measurements[5010] == expected_acceleration)
diff --git a/tests/unit/test_models.py b/tests/unit/test_models.py
index 24c5eac4..a659f6ee 100644
--- a/tests/unit/test_models.py
+++ b/tests/unit/test_models.py
@@ -42,7 +42,9 @@ def test_watchdata_model() -> None:
lux = models.Measurement(measurements=sensor_data, time=time)
temp = models.Measurement(measurements=sensor_data, time=time)
- watch_data = models.WatchData(acceleration=acceleration, lux=lux, temperature=temp)
+ watch_data = models.WatchData(
+ acceleration=acceleration, lux=lux, temperature=temp, idle_sleep_mode_flag=True
+ )
if watch_data.lux is not None:
assert np.array_equal(watch_data.lux.measurements, sensor_data)
@@ -53,6 +55,7 @@ def test_watchdata_model() -> None:
np.array([1, 2, 3]) * 1000000,
)
assert isinstance(watch_data.battery, type(None))
+ assert watch_data.idle_sleep_mode_flag
def test_measurement_model_time_type() -> None:
diff --git a/tests/unit/test_orchestrator.py b/tests/unit/test_orchestrator.py
index 5161d2c2..f02266a7 100644
--- a/tests/unit/test_orchestrator.py
+++ b/tests/unit/test_orchestrator.py
@@ -148,6 +148,7 @@ def test_run_dir(tmp_path: pathlib.Path, sample_data_gt3x: pathlib.Path) -> None
expected_files = {
tmp_path / "example_actigraph.csv",
tmp_path / "example_geneactiv.csv",
+ tmp_path / "example_actigraph_idle_sleep_mode.csv",
}
results = orchestrator.run(input=input_dir, output=tmp_path, output_filetype=".csv")
diff --git a/tests/unit/test_readers.py b/tests/unit/test_readers.py
index 5ffc4ac5..319b37e9 100644
--- a/tests/unit/test_readers.py
+++ b/tests/unit/test_readers.py
@@ -23,6 +23,7 @@ def test_gt3x_loader(sample_data_gt3x: pathlib.Path) -> None:
assert isinstance(watch_data.battery, models.Measurement)
assert isinstance(watch_data.capsense, models.Measurement)
assert watch_data.temperature is None
+ assert watch_data.idle_sleep_mode_flag is False
def test_geneactiv_bin_loader(sample_data_bin: pathlib.Path) -> None:
@@ -34,6 +35,7 @@ def test_geneactiv_bin_loader(sample_data_bin: pathlib.Path) -> None:
assert isinstance(watch_data.battery, models.Measurement)
assert isinstance(watch_data.temperature, models.Measurement)
assert watch_data.capsense is None
+ assert watch_data.idle_sleep_mode_flag is False
def test_nonexistent_file() -> None: