Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.13.2a2 #133

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'scikit-digital-health',
'c',
version: '0.13.2a1',
version: '0.13.2a2',
license: 'MIT',
meson_version: '>=1.1',
)
Expand Down
24 changes: 14 additions & 10 deletions src/skdh/activity/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,19 +1023,13 @@ def predict(
"""
super().predict()

# get "pointers" to the results values
self.r_sig_ent = results[self.name[0]]
self.r_samp_ent = results[self.name[1]]
self.r_perm_ent = results[self.name[2]]
self.r_pss = results[self.name[3]]
self.r_spec_flat = results[self.name[4]]
self.r_spec_ent = results[self.name[5]]
self.r_sparc = results[self.name[6]]
self.i = i

# compute values for the data we have
wlen = int(self.wlen_min * (60 / epoch_s))
skip = int(wlen * self.wskip_p)
# if we dont have any data to run on
if wlen > accel_metric.size:
return

# get a windowed view of the acceleration metric
metric_w = get_windowed_view(accel_metric, wlen, skip, ensure_c_contiguity=True)

Expand All @@ -1044,6 +1038,16 @@ def predict(

self.vals.append(feats)

# get "pointers" to the results values
self.r_sig_ent = results[self.name[0]]
self.r_samp_ent = results[self.name[1]]
self.r_perm_ent = results[self.name[2]]
self.r_pss = results[self.name[3]]
self.r_spec_flat = results[self.name[4]]
self.r_spec_ent = results[self.name[5]]
self.r_sparc = results[self.name[6]]
self.i = i

def reset_cached(self):
super().reset_cached()

Expand Down
2 changes: 1 addition & 1 deletion src/skdh/sleep/sleep.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def predict(
# finalize plotting
self._finalize_plots()

return {"sleep": sleep_idx}
return sleep, {"sleep": sleep_idx}

def _setup_day_plot(self, iday, source_file, date_str, start_dt):
if self.f is not None:
Expand Down