Photon Source init code