Example #1
0
print(
    " ======================================== CALCULATING SVMS ======================================== "
)
LA.accelerometer.calculate_svms()
LW.accelerometer.calculate_svms()
RA.accelerometer.calculate_svms()
RW.accelerometer.calculate_svms()
t3 = datetime.datetime.now()
print("Finished Calculating SVMs, Took {} Seconds".format((t3 - t2).seconds))

# Checking for NonWear
print(
    " ======================================== LEFT WRIST NONWEAR ========================================"
)
LW.NonWear()
LW.Check_Temperature()
t4 = datetime.datetime.now()
print("Finished Left Wrist Nonwear, Took {} Seconds".format((t4 - t3).seconds))

print(
    " ======================================== RIGHT WRIST NONWEAR ========================================"
)
RW.NonWear()
RW.Check_Temperature()
t5 = datetime.datetime.now()
print("Finished Right Wrist Nonwear, Took {} Seconds".format(
    (t5 - t4).seconds))

print(
    " ======================================== LEFT ANKLE NONWEAR ========================================"
Example #2
0
                        datetime.datetime(year=2019, month=11, day=19, hour=23, minute=2, second=2)]


# ======================================== COMPARISON OF VAN HEES AND DING ALGORITHMS
S.accelerometer.calculate_svms()

# Using VanHees
S.VanHeesNonWear()
S.Check_Temperature()
VanHeesStarts_NT = S.start_indices
VanHeesEnds_NT = S.end_indices
VanHeesStarts_T = S.non_wear_starts
VanheesEnds_T = S.non_wear_ends

# Using Ding
S.NonWear()
S.Check_Temperature()
DingStarts_NT = S.start_indices
DingEnds_NT = S.end_indices
DingStarts_T = S.non_wear_starts
DingEnds_T = S.non_wear_ends


# ======================================== GRAPHICAL OUTPUT ========================================
sns.set()
fig, ((ax1, ax2), (ax3, ax4), (ax5, ax6)) = plt.subplots(3, 2, figsize=(12, 8), sharex=True)

ax1.plot(TIMES, S.accelerometer.svms)
ax2.plot(TIMES, S.accelerometer.svms)

for i in ACTUAL_NON_WEAR_STARTS: