diff --git a/forest/jasmine/data2mobmat.py b/forest/jasmine/data2mobmat.py index 31ceaf95..cadcd0bf 100644 --- a/forest/jasmine/data2mobmat.py +++ b/forest/jasmine/data2mobmat.py @@ -179,6 +179,10 @@ def collapse_data( # Filter out rows where the GPS accuracy is beyond # the provided accuracy_limit data = data[data.accuracy < accuracy_limit] + if data.shape[0] == 0: + raise ValueError( + f"No GPS record with accuracy less than {accuracy_limit}." + ) # Get the start and end timestamps in seconds t_start = sorted(np.array(data.timestamp))[0] / 1000