Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant definition of node names #17

Open
calebweinreb opened this issue Jul 28, 2023 · 2 comments
Open

Redundant definition of node names #17

calebweinreb opened this issue Jul 28, 2023 · 2 comments

Comments

@calebweinreb
Copy link

In the tutorial, each body part is named in two separate places: once in the PoseEstimationSeries object and then again in the PoseEstimation object (nodes=['front_left_paw', 'front_right_paw']). I think this is kind of awkward. What if the names disagree?

@rly
Copy link
Owner

rly commented Jul 29, 2023

@calebweinreb Good question. The nodes field establishes an ordering to the different PoseEstimationSeries objects, by referring to them by name. Unfortunately, the way that PyNWB and MatNWB currently works with the HDF5 backend does not guarantee an intuitive ordering to items with a group. The order is important for the edges field, which uses the indices of the nodes field. e.g., in your example, to say that there is an edge between 'front_left_paw' and 'front_right_paw', you would set edges=[[0, 1]].

@rly
Copy link
Owner

rly commented Jul 29, 2023

There is potential that the names listed in nodes are not found as the names of objects in PoseEstimationSeries. We should add a check for that in the setter for PoseEstimation.nodes.

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

No branches or pull requests

2 participants