modified code to handle photband because it is a two-part value