Calibration of the polarization of a beam of arbitrary energy in a storage ring