Skip to content

Commit

Permalink
fix: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 committed Nov 5, 2024
1 parent ebecb00 commit b0952eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aeon/dj_pipeline/analysis/block_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def make(self, key):
use_blob_position = True

# Patch data - TriggerPellet, DepletionState, Encoder (distancetravelled)
# For wheel data, downsample to 10Hz
final_encoder_hz = 10
# For wheel data, downsample to 50Hz
final_encoder_hz = 50
freq = 1 / final_encoder_hz * 1e3 # in ms

maintenance_period = get_maintenance_periods(key["experiment_name"], block_start, block_end)
Expand Down
4 changes: 4 additions & 0 deletions aeon/dj_pipeline/subject.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ def make(self, key):


def get_pyrat_data(endpoint: str, params: dict = None, **kwargs):
"""
Get data from PyRat API.
See docs at: https://swc.pyrat.cloud/api/v3/docs (production)
"""
base_url = "https://swc.pyrat.cloud/api/v3/"
pyrat_system_token = os.getenv("PYRAT_SYSTEM_TOKEN")
pyrat_user_token = os.getenv("PYRAT_USER_TOKEN")
Expand Down
4 changes: 4 additions & 0 deletions aeon/dj_pipeline/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def make(self, key):
stream_reader = getattr(getattr(devices_schema, device_name), "Pose")

# special ingestion case for social0.2 full-pose data (using Pose reader from social03)
# fullpose for social0.2 has a different "pattern" for non-fullpose, hence the Pose03 reader
if key["experiment_name"].startswith("social0.2"):
from aeon.io import reader as io_reader
stream_reader = getattr(getattr(devices_schema, device_name), "Pose03")
Expand Down Expand Up @@ -198,6 +199,9 @@ def make(self, key):
# FIXME: the logic below to get "anchor_part" is not robust, it relies on the ordering of the unique parts
# but if there are missing frames for the actual anchor part, it will be missed
# and another part will be incorrectly chosen as "anchor_part"
# (2024-10-31) - we recently discovered that the parts are not sorted in the same order across frames
# - further exacerbating the flaw in the logic below
# best is to find a robust way to get the anchor part info from the config file for this chunk
anchor_part = np.unique(identity_position.part)[0]

for part in set(identity_position.part.values):
Expand Down

0 comments on commit b0952eb

Please sign in to comment.