IMplementation of the diversity metric based on the quadratic mean