Optical excitation or measuring