Implementation
Here I explain how to process particle tracking data in order to calculate the msd moments and assess the heterogeneity of the observed sample. It assumes that you are on an IDL platform, and that you followed the tutorial on the website "Particle tracking using IDL", (see herePointer for a link to this tutorial, although I note in the first part of this page 3 important points to keep in mind when using the tracking procedures). Keep in mind that the procedures explained here are designed to work on tracked array of the form shown in the first sectionPointer. Hopefully, we'll have soon a similar page for Matlab-based tracking.
Notes on particle tracking
When you follow the successive steps described in the website "Particle tracking using IDL" to process your movie, there are several points to keep in mind in order to use efficiently the procedure described in the following parts. In the pre-tracking, which deals with detecting and locating particles in each frame, noise discrimination is performed by selecting valid detections using the morphology of the identified features (using the provided procedures polycut.pro or eclip.pro). In particular, the radius and integrated mass of the brightness profile follows specific variations with the altitude of the particles in the volume of observation of the microscope. When clipping these parameters, be aware that you change the depth of tracking of the setup. Extensive details on this aspect can be found in the article by Savin & Doyle (2008) (available herePointer). If you take several movies from a sample, be sure to use the same clipping parameters in order to compare your results. Next, when you link the position to form the trajectories with track.pro, do not use the memory keyword. This keyword allows you to track a particle that temporally disappears in a single trajectory. It effectively increases the tracking depth of a particle being shortly out of focus. The procedure nbox.pro and msd_moments.pro are not compatible with it. I hope to fix this soon. The procedure msd_moments.pro can be very slow if there are many very short trajectories. I am hoping to fix that as well, but I advise you to use the keyword goodenough wisely in track.pro. This keyword sets the minimum trajectory duration in the tracked array. If you choose this value too high, you might discard important trajectories reporting what I called a "fast" fluid in this website. If you choose it to low, msd_moments.pro will take forever to execute. I found that a good compromise is to use goodenough≈4. Finally, removing the drift from your tracked array, as described using the procedures motion.pro and rm_motion.pro on the website "Particle tracking using IDL", is advised if you have a poor vibrations isolation. In general, a "slow" drift induces a bias in the msd at large lag time and is efficiently removed by using the software described in the website. At the end, please keep in mind the following:

• Be aware that clipping data to discriminate noise can reduce the tracking depth
• Do not set the memory keyword, and set goodenough wisely when using track.pro
• De-drift the tracked array

I assume now that you have a nice clean tracked array t to work the following with.
Calculating the tracking depth
The procedure nbox.pro is used to calculate the number of tracked particles in each frame of the original movie. Thus it gives you the number of particle in the tracking volume as a function of time. To run it on the tracked array t, simply type at the IDL prompt:

IDL> n = nbox(t)

It returns a vector containing as much elements as the number of time steps of the tracked array, each elements giving the number of positions belonging to trajectories for each time ordered time step. However particles detected in the first frame and disappearing within goodenough frames will not appear in the tracked array. As a result, the first goodenough elements (and by symmetry, the last goodenough elements as well) of n are not valid numbers. To get the average number Nb of particle in the volume of tracking, you would then type:

IDL> ng = n[goodenough:n_elements(n)-goodenough] & print,mean(ng)

where goodenough is whatever number you used when you called track.pro. I would advise to adjust the concentration of beads and/or the magnification of your tracking setup to track at least Nb≥100 particles in your field of view at all time. This of course plays a role in having enough spatial sampling in a material to assess accurately its heterogeneity. You can use the average number above to determine the depth of tracking of your setup. If the field of view is xb×yb and the concentration of probes is Cb, then the depth of tracking is given by Nb/(Cb×xb×yb). This method to determine the depth of tracking is very accurate, given that you have a constant density of probes in the tracking volume (see Savin & Doyle (2008) referenced herePointer). To verify the assumption of constant density of particles in the tracking volume, you can calculate coefficient of variation of n by typing:

IDL> print,stddev(ng)/mean(ng)

I typically obtain a value of about 5% for the coefficient of variation when Nb≅100.
Calculating the msd moments
You can run the program msd_moments.pro (it is an IDL function) on the tracked array t by typing:

IDL> m = msd_moments(t)

The procedure accepts several options, most of them being found in the original msd.pro procedure provided in the website "Particle tracking using IDL" linked herePointer. The keywords are:

TimeStep:
Time interval between successive frame/field. Default is 1.
MicPerPix:
Magnification in microns per pixel. If it is single number, the magnification is assumed to be isotropic, otherwise, provide a dim-dimensional vector. Default is 1.
Mydts:
A vector of integer to calculate the output only at these lags.
N_Lag:
The number of lagtime at which the output is calculated. The lags are log-spaced points, and the maximum lag time is chosen such that the displacements sample still contains enough elements to calculate the output values. Useless if Mydts is supplied. Default is 50.
Dim:
The spatial dimensionality of the input tracking array. Default is 2.

The output array m has several columns which are, for Dim=2:

m[0,*]:
The lag time.
m[1,*],m[2,*]:
The average displacement in the x and y direction.
m[3,*],m[4,*]:
The ensemble average msd estimated by M1 in the x and y direction.
m[5,*],m[6,*]:
The ensemble variance of msd estimated by M2 in the x and y direction.
m[7,*],m[8,*]:
The estimate of the variance of M1 in the x and y direction.
m[9,*],m[10,*]:
The estimate of the variance of M2 in the x and y direction.
m[11,*]:
The degree of sampling θ.

For example, a typical use of msd_moments.pro in a system that tracks particle with a magnification of 0.2 μm.pxl-1 and at a temporal sampling of 30 frames per second would be:

IDL> m = msd_moments(t,timestep=1./30,micperpix=0.200)

and to display the average msd M1 in the x direction with 1-sigma error bars:

IDL> plot,m[0,*],m[3,*],/xlog,/ylog,psym=6
IDL> for i=0,n_elements(m[0,*])-1 do $
IDL> oplot,m[0,i]*[1,1],m[3,i]+m[7,i]^0.5*[-1,1]>0

The heterogeneity ratio M2/M12 in the x direction would be plotted using:

IDL> plot,m[0,*],m[5,*]/m[3,*]^2,/xlog,psym=6
IDL> for i=0,n_elements(m[0,*])-1 do $
IDL> oplot,m[0,i]*[1,1],(m[5,i]+m[9,i]^0.5*[-1,1])/m[3,i]^2

Finally the degree of sampling θ that indicates the "detectability" of the sample by particle tracking would be plotted with:

IDL> plot,m[0,*],m[11,*],/xlog,psym=6

A rule of thumb in the heterogeneous systems I have studied so far is that the criteria θ>80% seems to ensure correct results.