Skip to content

Commit

Permalink
Merge pull request #133 from pfizer-opensource/development
Browse files Browse the repository at this point in the history
Version 0.13.2a2
  • Loading branch information
LukasAdamowicz authored Dec 12, 2023
2 parents 59f9432 + f7072ea commit 4f8a152
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
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

0 comments on commit 4f8a152

Please sign in to comment.