Hi, I work in laser measurement and calibration. There is no secret sauce; you take a physical phenomenon that translates optical power or energy into an electrical signal, measure that signal, then find the sensitivity value of that phenomenon and account for any other effects such as ambient temperature, fill factor, linearity, parasitics etc. and then prove that your calculations are correct by comparing them with NIST/PTB.