Here is the logic that I have been using to calculate the transimpedence of PDs. Please let me know if you think anything is wrong.