Optical and Electronic Properties of Rare Earth Ions in Glasses