Measuring depth of modulation