Locating Energy Levels of Lanthanide Ions in Inorganic Ionic Compounds