How to use spectrophotometry to detect the environment?