-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added the ability to set a custom stub cell value instead of np.nan
#74
Added the ability to set a custom stub cell value instead of np.nan
#74
Conversation
I tested this (after porting to v2.0-dev), and it resolves the float-coercion problem in #62. By definition, the lists of segmentation IDs and feature IDs are separate, so I agree segmentation is a separate discussion. Is "stub" a term in the public API, or a term internal to the implementation? For symmetry with other kwargs, I think I'd prefer something like |
Also, thinking about metadata: it would be good to capture the user's chosen stub/unassigned number as an attribute. I could propose how to do that for xarray, but not sure if iris supports such metadata. I'm very interested in having the metadata. When working with a combined dataset (features, the feature mask, and cells) one would need to know which ID to ignore, and this function seems like the right place to add that metadata so it can be used appropriately downstream. While the user knows the ID when creating the dataset, that information is lost when those data are saved to an archive apart from the software. |
"stub" is indeed used in the public API (see The issue with metadata here is actually with pandas rather than iris, as in v1.x, the feature/tracking data comes out as a pandas DataFrame. Pandas has the I (or someone else) will need to port this to v2.x, but I'm hesitant to make any ports until we get to v1.5. |
I've moved this to the v1.3 milestone to match the issue (#62). |
Per our discussion last week, waiting on #78 to be merged before merging this. |
I've updated the formatting per #78 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy for this to be merged
Now that #89 has been merged, I need to update this PR to avoid the conflicts. |
I've updated it to avoid the conflict and I will re-request a review to keep with good practices before merging. |
This should resolve (most of) #62. Rather than set the stub/non-tracked cells as
np.nan
,tobac.tracking.linking_trackpy
now acceptsstub_set_number
as a parameter for the value ofcell
to set the stub/non-tracked cells to, with a default value of -1.