soft-matter / trackpy

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

Ghost particles being found in frames where there is nothing #633

Closed stevenvanuytsel closed 4 years ago

stevenvanuytsel commented 4 years ago

Hi,

Rather than an actual issue, this is a question for the developers as I'm not quite sure what is going on. I am trying to track moving particles in a 10,000 frame-long tif stack. My particles are visible until they are blocked by a piece of DNA translocating through it, and then I need to analyze the kinetics of this process. I interactively provide a diameter and minmass to trackpy by judging the output of tp.annotate on a frame where there are particles (they are a lot brighter than the background). However, when I then locate the features in all frames, trackpy finds ghost particles in frames where there is nothing. Upon double-checking in imageJ, the positions where trackpy finds these particles are of the same intensity as the surrounding noise. Therefore, my kinetics analysis, which is based on the frames column, does not make sense as trackpy loses the particle but then re-finds it in a position where there is nothing. The signal, mass and raw_mass of these found particles are > 10-fold lower than where the particles are not blocked and correctly found. I've scoured through the source code but for the life of me can't work out how minmass is being used to spit out mass, raw_mass and signal, and which is then being used to localise the particles. Would I need to provide an additional threshold when tracking the particles or ... ? I would greatly appreciate it if I could get some help on this.

Thanks, Steven

stevenvanuytsel commented 4 years ago

I'm very sorry for opening an issue on this as it's not really a trackpy issue (except for maybe the enigma of what is actually being used to localise particles). I don't quite know how else to reach the developing team, so I thought I'd post it here.

tacaswell commented 3 years ago

@stevenvanuytsel It has been a while sense I looked at this code, if I recall correctly each frame gets internally normalized based on the intensity of pixels in that frame. If you have a frame with no features, we are going to massively scale up the noise and "find" features.

I suggest using pandas to filter out the "ghost" particles before you pass the results off to linking.