soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
442 stars 131 forks source link

Query about link table fields #651

Closed Jeff-Gui closed 3 years ago

Jeff-Gui commented 3 years ago

Hi, I wonder if optional fields other than coordinates & frames in a link table, like signal intensity, roundness etc., should follow some standard format.

Thanks.

nkeim commented 3 years ago

After feature-finding is done (with locate() etc.), I don't think any other function in trackpy uses that information, so the standard format is just what is implemented by the feature-finding functions. All the other functions ignore and/or preserve that information, in case you have a use for it later. If you want to strip it out to save space, should not be any unintended consequences.

Jeff-Gui commented 3 years ago

Just to check if my understanding is correct, only x, y and frame columns are useful in link(), not anything else? (The screenshot is from the walkthrough tutorial). Since I'm using some external source of the object features, it would be helpful to know how much features are allowed to include.

截屏2021-03-09 23 26 13
nkeim commented 3 years ago

That's correct. link() etc. uses the columns in the pos_columns argument, which defaults to ['x', 'y']. Since trackpy is a true n-dimensional tracking code, you can use anything you like as coordinates. For example, if your particles are different sizes, letting trackpy use the size information might help it to resolve ambiguous situations in linking. In that case you would add a rescaled size column so that typical size differences between particles were of a similar magnitude as typical position differences. Then supply pos_columns = ['x', 'y', 'my_rescaled_size']. When linking, trackpy will look within a sphere of radius search_radius in that 3-dimensional space.

Jeff-Gui commented 3 years ago

Thanks! It helps a lot.