Skip to content

Commit

Permalink
Add restriction to fetch1_dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Sep 21, 2023
1 parent f76666f commit 4e6b29f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/spyglass/common/common_behav.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ def fetch_nwb(self, *attrs, **kwargs) -> list:
"""
Returns a condatenated list of nwb objects from RawPosition.PosObject
"""
return self.PosObject().fetch_nwb(*attrs, **kwargs)
return (
self.PosObject()
.restrict(self.restriction) # Avoids fetch_nwb on whole table
.fetch_nwb(*attrs, **kwargs)
)

def fetch1_dataframe(self):
"""Returns a dataframe with all RawPosition.PosObject items.
Expand Down

0 comments on commit 4e6b29f

Please sign in to comment.