Code for spectrophotometer