Skip to content

Commit

Permalink
Merge pull request #172 from pfizer-opensource/development
Browse files Browse the repository at this point in the history
Version 0.16.9
  • Loading branch information
yiorg authored Aug 29, 2024
2 parents 1e40f54 + ce8fbab commit 25d21ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 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.16.8',
version: '0.16.9',
license: 'MIT',
meson_version: '>=1.1',
)
Expand Down
2 changes: 1 addition & 1 deletion src/skdh/io/empatica.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_accel(self, raw_accel_dict, results_dict, key):
Name for the results in `results_dict`.
"""
# sampling frequency
fs = round(raw_accel_dict["samplingFrequency"], decimals=3)
fs = raw_accel_dict["samplingFrequency"]

# timestamp start
ts_start = raw_accel_dict["timestampStart"] / 1e6 # convert to seconds
Expand Down
9 changes: 6 additions & 3 deletions src/skdh/utility/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,21 @@ def fill_data_gaps(time, fs, fill_info, **kwargs):
>>> print(data_rs.keys())
dict_keys(['accel', 'temp'])
"""
# round-about way, but need to prevent start>>>>>>>>>step
time_rs = arange(0, (time[-1] - time[0]) + 0.5 / fs, 1 / fs) + time[0]

# get the first location of gaps in the data - add 1 so that the index reflects
# the first value AFTER the gap
gaps = nonzero(diff(time) > (1.5 / fs))[0] + 1
if gaps.size == 0:
return time, kwargs

# create sequences of data with no gaps
seqs = zeros((gaps.size + 1, 2), dtype=int_)
seqs[1:, 0] = gaps
seqs[:-1, 1] = gaps
seqs[-1, 1] = time.size

# round-about way, but need to prevent start>>>>>>>>>step
time_rs = arange(0, (time[-1] - time[0]) + 0.5 / fs, 1 / fs) + time[0]

# iterate over the datastreams
ret = {}
for name, data in kwargs.items():
Expand Down

0 comments on commit 25d21ab

Please sign in to comment.