Crystal field analysis of Dy and Tm implanted silicon for photonic and quantum technologies.