A material is excited with light whose intensity is modulated according to a modulation signal. The modulation signal includes multiple transitions between at least two intensity levels, with times of at least a first contiguous sequence of the transitions being selected according to an irregular pattern. A response of the material to the excitation is detected.