Skip to content

Commit c56ddd2

Browse files
committed
updated markdown.
1 parent 6dc7411 commit c56ddd2

2 files changed

Lines changed: 18 additions & 21 deletions

File tree

tests/sample_data/mims_test_data_code.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The MIMS algorithm consists of 5 main steps:
1515
Each major step has associated test data that was used to validate the wristpy implementation. Test data was gathered using an actigraph device model: wGT3XBT which has a dynamic range of
1616
±8
1717

18-
### 1. Interpolation Test data
18+
### 1. Interpolation test data.
1919

2020
The interpolation test data was generated using the following R script and saved as 'actigraph_interpolation_r_version.csv' :
2121

@@ -27,7 +27,7 @@ interpolate_df <- MIMSunit::interpolate_signal(df = accel_df, method = "spline_n
2727
write.csv(interpolate_df, "actigraph_interpolation_r_version.csv", row.names = FALSE)
2828
```
2929

30-
### 1. Interpolation Test data
30+
### 1. Interpolation test data.
3131

3232
The interpolation test data was generated using the following R script and saved as 'actigraph_interpolation_r_version.csv' :
3333

@@ -39,7 +39,7 @@ interpolate_df <- MIMSunit::interpolate_signal(df = accel_df, method = "spline_n
3939
write.csv(interpolate_df, "actigraph_interpolation_r_version.csv", row.names = FALSE)
4040
```
4141

42-
### 2. Bandpass Filter Test data
42+
### 2. Bandpass Filter test data.
4343

4444
The Bandpass Filter test data was generated using the following R script and saved as 'mims_butterworth_filtered_data.csv' :
4545

@@ -52,7 +52,7 @@ filtered_df <- MIMSunit::iir(interpolate_df, sr = 100, cutoff_freq = c(0.2, 5),
5252
write.csv(filtered_df, "mims_butterworth_filtered_data.csv", row.names = FALSE)
5353
```
5454

55-
### 3. Aggregation Test data
55+
### 3. Aggregation test data.
5656

5757
The Aggregation test data was generated using the following R script and saved as 'aggregation_r_version.csv' :
5858

@@ -65,5 +65,19 @@ aggregated_df <- <- MIMSunit::aggregate_for_mims( interpolate_df, epoch = "1 mi
6565
write.csv(aggredgated_df, "aggregation_r_version.csv", row.names = FALSE)
6666
```
6767

68+
### 4. Full-Run Test Data.
69+
70+
The Full-Run test data was generated using the following R script and saved as 'mims_example_full_run.csv' :
71+
72+
```r
73+
library(MIMSunit)
74+
raw_data <- read.gt3x("~/Github/wristpy/tests/sample_data/example_actigraph.gt3x")
75+
accel_df <- as.data.frame(raw_data)
76+
mims_unit_one_sec <- MIMSunit::mims_unit(df = accel_df, dynamic_range = c(-8, 8), epoch = "1 sec")
77+
output_file <- "~/Documents/mims_example_full_run.csv"
78+
write.csv(mims_unit_one_sec, file = output_file, row.names = FALSE)
79+
```
80+
81+
6882
## References
6983
[1] John D, Tang Q, Albinali F, Intille S. An Open-Source Monitor-Independent Movement Summary for Accelerometer Data Processing. J Meas Phys Behav. 2019 Dec;2(4):268-281. doi: 10.1123/jmpb.2018-0068. PMID: 34308270; PMCID: PMC8301210.

tests/unit/test_metrics.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@
1515
TEST_LENGTH = 100
1616

1717

18-
@pytest.fixture
19-
def create_acceleration() -> pl.DataFrame:
20-
"""Fixture to create a dummy acceleration DataFrame to be used in multiple tests."""
21-
dummy_date = datetime(2024, 5, 2)
22-
dummy_datetime_list = [dummy_date + timedelta(seconds=i) for i in range(1000)]
23-
test_time = pl.Series("time", dummy_datetime_list)
24-
acceleration_polars_df = pl.DataFrame(
25-
{
26-
"X": np.ones(1000),
27-
"Y": np.ones(1000),
28-
"Z": np.ones(1000),
29-
"time": test_time,
30-
}
31-
)
32-
return acceleration_polars_df
33-
34-
3518
@pytest.mark.parametrize(
3619
"x,y,z, expected_enmo",
3720
[

0 commit comments

Comments
 (0)