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

'size' and 'ep' not given per dimension if diameter is the same in all dimensions #716

Open
MaartenBransen opened this issue Dec 6, 2022 · 0 comments

Comments

@MaartenBransen
Copy link

MaartenBransen commented Dec 6, 2022

When specifying the diameter as integer in trackpy.locate (using characterize=True), the resulting dataframe has one 'size' and one 'ep' column.
When specifying the feature_size as tuple the resulting dataframe has columns for the sizes and errors in each dimension ( 'size_x', 'size_y', etc), except when all values in the tuple are the same.

To me there is a semantic difference between

trackpy.locate(data,diameter=15)

and

trackpy.locate(data,diameter=(15,15,15))

and I would the latter to behave identically to for example

trackpy.locate(data,diameter=(15,15,13))

except of course using a smaller size. I usually specify sizes in physical units which are then converted to sizes in pixels for trackpy, and now have to explicitly check that I'm not passing a tuple where all sizes are the same, otherwise my code fails later on because of this edge case. Furthermore, it is now not possible as far as I am aware to calculate sizes per dimension while using a feature size that is the same in all dimensions, forcing me to sometimes use a sub-optimal diameter in one dimension to be able to filter on certain size ratios.

Is this the desired behaviour? It seems to me more logical to always calculate these parameters per dimension when passing a tuple, and for all dimensions simultaneously when passing a single value for diameter.

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

1 participant