Skip to content

Support pose estimation objects anywhere in the nwbfile - #17

Merged
pauladkisson merged 5 commits into
mainfrom
pose_location
Feb 24, 2026
Merged

Support pose estimation objects anywhere in the nwbfile#17
pauladkisson merged 5 commits into
mainfrom
pose_location

Conversation

@pauladkisson

@pauladkisson pauladkisson commented Feb 17, 2026

Copy link
Copy Markdown
Member

Fixes #14

@h-mayorquin h-mayorquin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. I think this is a critical fix, we can merge it now and then add the tests or if you prefer the other way around.

# Get only PoseEstimation objects (not Skeletons or other types)
cameras = {}
for name, obj in pose_module.data_interfaces.items():
for obj in nwbfile.objects.values():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the edge case of a user that writes pose estimation in two different modules with the same name there will be a collision right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is true...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an assertion to check that case. I don't think it's likely, so maybe we can just cross that bridge when we come to it, or if you have a better idea, let me know.

Comment thread src/nwb_video_widgets/_utils.py Outdated
cameras = {}
for name, obj in pose_module.data_interfaces.items():
for obj in nwbfile.objects.values():
if type(obj).__name__ == "PoseEstimation":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about obj.neurodata_type == "PoseEstimation" or isinstance(obj, PoseEstimation)

I will try to make a push for:
NeurodataWithoutBorders/pynwb#1737

When I have some time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@pauladkisson

Copy link
Copy Markdown
Member Author

This is good. I think this is a critical fix, we can merge it now and then add the tests or if you prefer the other way around.

Yeah, I think I would prefer the other way around, so that I can add some dedicated tests for pose estimation located in different places like in the behavior processing module.

@pauladkisson
pauladkisson marked this pull request as ready for review February 24, 2026 17:45
@pauladkisson
pauladkisson merged commit 83f1644 into main Feb 24, 2026
10 checks passed
@pauladkisson
pauladkisson deleted the pose_location branch February 24, 2026 18:09
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.

Feature request: support for pose estimation objects stored in any location

2 participants