Skip to content

Commit

Permalink
Merge branch 'develop' into oak-optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
hackdna authored Nov 6, 2023
2 parents b0be8a5 + 7e441a7 commit e758866
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion docs/source/oak.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,17 @@ delta = 20
# minimum walking time (in seconds (s))
min_t = 3
```
```

## List of summary statistics

The outputs of the accelerometer module contains gait summary statistics for each specified participant in daily (_gait_daily.csv) or hourly windows (_gait_hourly.csv).

The following variables are created in a csv file for each participant.

| Variable | Type | Description of Variable |
|--------------------------------------- |-------------- |------------------------------------------------------------------------------------------------------------- |
| date | str | Time of observation (_gait_daily.csv format: yyyy-mm-dd; _gait_hourly.csv format: yyyy-mm-dd HH:MM:SS’) |
| walking_time | int | Total walking time (in seconds) |
| steps | int | Total steps taken |
| cadence | float | Average cadence in time window (daily or hourly) |
8 changes: 4 additions & 4 deletions forest/oak/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ def run(study_folder: str, output_folder: str, tz_str: Optional[str] = None,
file_list.sort()

# transform all files in folder to datelike format
if "+00_00.csv" in file_list[0]:
file_dates = [file.replace("+00_00.csv", "") for file in file_list]
else:
file_dates = [file.replace(".csv", "") for file in file_list]
file_dates = [
file.replace(".csv", "").replace("+00_00", "")
for file in file_list
]

# process dates
dates = [datetime.strptime(file, fmt) for file in file_dates]
Expand Down

0 comments on commit e758866

Please sign in to comment.