From ba14445dd6c645f16cb3e45581044d65088eaf1f Mon Sep 17 00:00:00 2001 From: Shing Chan Date: Wed, 6 Nov 2024 15:46:38 +0000 Subject: [PATCH] feat: add minNonWearDuration argument for estimating non-wear episodes This commit adds a new argument, --minNonWearDuration, to the accProcess.py script. The argument allows the user to specify the minimum non-wear duration in minutes for calculating non-wear time. The default value is set to 60 minutes. --- src/accelerometer/accProcess.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/accelerometer/accProcess.py b/src/accelerometer/accProcess.py index 754d8868..439b6b1e 100644 --- a/src/accelerometer/accProcess.py +++ b/src/accelerometer/accProcess.py @@ -138,6 +138,10 @@ def main(): # noqa: C901 metavar='mg', default=13, type=int, help="""stationary mg threshold (default : %(default)s mg))""") + parser.add_argument('--minNonWearDuration', + metavar='mins', default=60, type=int, + help="""minimum non-wear duration in minutes + (default : %(default)s mins))""") parser.add_argument('--calibrationSphereCriteria', metavar='mg', default=0.3, type=float, help="""calibration sphere threshold (default @@ -326,7 +330,7 @@ def deleteIntermediateFiles(): activityClassification=args.activityClassification, timeZone=args.timeZone, startTime=args.startTime, endTime=args.endTime, epochPeriod=args.epochPeriod, - stationaryStd=args.stationaryStd, + stationaryStd=args.stationaryStd, minNonWearDuration=args.minNonWearDuration, mgCpLPA=args.mgCpLPA, mgCpMPA=args.mgCpMPA, mgCpVPA=args.mgCpVPA, activityModel=args.activityModel, intensityDistribution=args.intensityDistribution,