From b5c9c9cddcb1cafb9a1081059c02c4f7b804a273 Mon Sep 17 00:00:00 2001 From: Zachary Clement Date: Tue, 9 Jan 2024 20:33:46 -0500 Subject: [PATCH] pep8 fixes --- forest/jasmine/traj2stats.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/forest/jasmine/traj2stats.py b/forest/jasmine/traj2stats.py index ed2d8a92..712fcd76 100644 --- a/forest/jasmine/traj2stats.py +++ b/forest/jasmine/traj2stats.py @@ -1643,6 +1643,13 @@ def gps_stats_main( participant_id, study_folder, "gps", tz_str, time_start, time_end, ) + + if ((data["longitude"].max() > 180) + or (data["longitude"].min() < -180)): + logger.info("Reconciled bad longitude data for user %s", + participant_id) + data["longitude"] = data["longitude"] % 360 - 180 + if data.shape == (0, 0): logger.info("No data available.") continue