Optical spectroscopy of rare-earth doped ternary lead based halides