Light emission and energy calculation