Forming optical packets, a diffusion approximation model