Application of optical properties in water purification quality testing