Particle tracking using IDL -- John C. Crocker and Eric R. Weeks

The radius is calculated in a funny way. The moment of inertia for an object is defined as

I = sum(mass_i * r_i^2) = (total mass)*(Rg)^2
The last term defines the radius of gyration Rg. The sum is over i, each pixel with a given "mass" (its brightness) at a given position r_i, measured from the center of mass of the particle. Rewriting, we get that
(Rg)^2 = sum(mass_i*r_i^2) / (total mass).
However, the calculation that feature does is actually
(Rg)^2 = sum(mass_i*(r_i^2 + 1/6)) / (total mass)
The factor of 1/6 is a mistake, as far as I can tell (Eric). John Crocker wrote in an email to me about the factor of 1/6 that "it's unimportant, and not clearly done correctly." Note also that what is returned is the square of the radius, but throughout the tutorial we always call this "radius". The bottom line is that it is related to the size of the particle, but should not be interpreted as the real radius of gyration. Note also that the same problem occurs in the 3D code (feature3d.pro).

We don't want to change the code since we've been using it this way for many years, although if you want to change the code, look for the line in feature.pro that says: