Skip to content

Commit

Permalink
chore: minor fixes to address PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 committed Oct 30, 2024
1 parent 9078085 commit ebecb00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aeon/dj_pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion aeon/dj_pipeline/analysis/block_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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 = (
Expand Down

0 comments on commit ebecb00

Please sign in to comment.