changed photodiode conversion function