Wave-particle duality using the Compton effect