diff --git a/aeon/dj_pipeline/__init__.py b/aeon/dj_pipeline/__init__.py index 3e4b3150..1225020a 100644 --- a/aeon/dj_pipeline/__init__.py +++ b/aeon/dj_pipeline/__init__.py @@ -40,7 +40,7 @@ def fetch_stream(query, drop_pk=True, round_microseconds=True): Args: query (datajoint.Query): A query object containing data from a Stream table drop_pk (bool, optional): Drop primary key columns. Defaults to True. - round_microseconds (bool, optional): Round timestamps to microseconds. Defaults to False. + round_microseconds (bool, optional): Round timestamps to microseconds. Defaults to True. (this is important as timestamps in mysql is only accurate to microseconds) """ df = (query & "sample_count > 0").fetch(format="frame").reset_index() diff --git a/aeon/dj_pipeline/analysis/block_analysis.py b/aeon/dj_pipeline/analysis/block_analysis.py index 996500e1..21e30653 100644 --- a/aeon/dj_pipeline/analysis/block_analysis.py +++ b/aeon/dj_pipeline/analysis/block_analysis.py @@ -251,6 +251,7 @@ def make(self, key): if encoder_df.empty: encoder_df["distance_travelled"] = 0 else: + # -1 is for placement of magnetic encoder, where wheel movement actually decreases encoder encoder_df["distance_travelled"] = -1 * analysis_utils.distancetravelled(encoder_df.angle) encoder_df = encoder_df.resample(f"{freq}ms").first() @@ -327,7 +328,7 @@ def make(self, key): ) pos_df = fetch_stream(pos_query)[block_start:block_end] pos_df["likelihood"] = np.nan - # keep only rows with area between 0 and 1000 + # keep only rows with area between 0 and 1000 - likely artifacts otherwise pos_df = pos_df[(pos_df.area > 0) & (pos_df.area < 1000)] else: pos_query = (