Skip to content

Fix fetching position dataframe in SortedSpikesDecodingV1.get_ahead_behind_distance()#1540

Open
calderast wants to merge 2 commits intoLorenFrankLab:masterfrom
calderast:fix-fetch-pos-info
Open

Fix fetching position dataframe in SortedSpikesDecodingV1.get_ahead_behind_distance()#1540
calderast wants to merge 2 commits intoLorenFrankLab:masterfrom
calderast:fix-fetch-pos-info

Conversation

@calderast
Copy link
Contributor

@calderast calderast commented Feb 25, 2026

Description

fetch_position_info returns a tuple of (position_info, position_variable_names), but the .loc here is supposed to operate on just the dataframe. Fix it to grab the position_info dataframe only

position_info = self.fetch_position_info(self.fetch1("KEY")).loc[
time_slice
]

Checklist:

  • N/A. If this PR should be accompanied by a release, I have updated the CITATION.cff
  • N/A. If this PR edits table definitions, I have included an alter snippet for release notes.
  • N/A. If this PR makes changes to position, I ran the relevant tests locally.
  • N/A. If this PR makes user-facing changes, I have added/edited docs/notebooks to reflect the changes
  • I have updated the CHANGELOG.md with PR number and description.

@calderast calderast changed the title fetch_position_info returns a tuple, get dataframe instead Fix fetching position dataframe in SortedSpikesDecodingV1.get_ahead_behind_distance() Feb 25, 2026
@calderast calderast changed the title Fix fetching position dataframe in SortedSpikesDecodingV1.get_ahead_behind_distance() Fix fetching position dataframe in SortedSpikesDecodingV1.get_ahead_behind_distance() Feb 25, 2026
@CBroz1
Copy link
Member

CBroz1 commented Feb 25, 2026

The failing tests might be addressed by merging #1534 and fetching upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants