soft-matter / trackpy

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

How does TrackPy deal with local background? #578

Closed komodovaran closed 4 years ago

komodovaran commented 4 years ago

I couldn't find anything about it in the docs, so now I'll ask here.

Take an image like this for example: myplot myplot2

There's a higher background near the center (because they're fluorescent particles inside a cell), and the background will also vary depending on the "bleed" from a high local concentration.

How does TrackPy deal with this? The intensity "mass" sounds like just integrating everything inside a circle.

What I'm currently doing is using the track coordinates to draw adjustable masks for each frame to get signal and local background and subtract that. Am I better or worse off by doing this? TrackPy intensities just seem way noisier.

myplot

rbnvrw commented 4 years ago

Hi @komodovaran, I'm assuming your using the locate or batch function of Trackpy. From the documentation (see http://soft-matter.github.io/trackpy/v0.4.2/generated/trackpy.locate.html#trackpy.locate):

Preprocess the image by performing a band pass and a threshold.

This is the only preprocessing that is done as far as I know and it can be controlled using the smoothing_size and threshold keywords.

If you need to do other background corrections, you can implement these yourself using Pipelines (see for example http://soft-matter.github.io/pims/v0.4.1/pipelines.html)

I hope this helps!

rbnvrw commented 4 years ago

I'll close this question now due to inactivity.