Skip to content

Add a subject reference to PoseEstimation and deprecate it on Skeleton - #66

Open
h-mayorquin wants to merge 1 commit into
rly:mainfrom
h-mayorquin:pose_subject_row
Open

Add a subject reference to PoseEstimation and deprecate it on Skeleton#66
h-mayorquin wants to merge 1 commit into
rly:mainfrom
h-mayorquin:pose_subject_row

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

I have been thinking about adding multi-subject support for the pose estimation interfaces in neuroconv. Currently the subject specifier in this extension is on the Skeleton (see #51), but I think it does not work very well here because two subjects of the session might have exactly the same skeleton. In this PR I am moving the subject specifier from the Skeleton (which is now deprecated) to the PoseEstimation container, which is where I think it makes sense.

The alternative here is the "parent-container-as-subject-identity" pattern of the current ndx-multisubjects, which does not clash with this, though it does mean the identity depends on where an object sits rather than on the object itself, so anything that resolves objects by name at a known level has to learn the nesting. Meanwhile, enabling this means that we can link to the SubjectsTable of that extension, or allow users to roll their own outside of that scope. What do you think?

The deprecation follows the convention already in the repository: the subject argument in Skeleton raises a DeprecationWarning when a user sets it, reading an existing file that has it stays silent through _in_construct_mode, and the spec doc carries the DEPRECATED. prefix pointing at the replacement. That is what nodes and edges got in #33 and what original_videos, labeled_videos and dimensions got in #57, so this lands beside them rather than being stricter than its neighbours. Say if you would rather it refused outright.

This should close #51.

A Skeleton describes a morphology and may be shared, so it cannot name the animal once a file describes several. PoseEstimation gains an optional subject region over any DynamicTable, so it points at the SubjectsTable of ndx-multisubjects when that is present without ndx-pose depending on it. The Skeleton link warns on write and stays silent on read, following rly#33 and rly#57.
@CodyCBakerPhD

Copy link
Copy Markdown

Note that there is a related blocker upstream with ndx-multisubjects: NeurodataWithoutBorders/pynwb#2219

We've been discussing with Oliver and Ryan for a while how to go about a fix

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.

Clarify skeleton use in the context of multiple vs single subject

2 participants